|
View:
New views
4 Messages
—
Rating Filter:
Alert me
|
|
|
Who can give me a mule jms example?Mule documents are so complex. I can't find a jms example for understanding. Please give me a whole example.
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Who can give me a mule jms example?Hi,
to use the jms,u need to config sth.
1) the brokerURL
2) the endPoint
The code is shown below:
======
<!--JMS connector -->
<jms:activemq-connector name="jmsConnector" brokerURL="tcp://localhost:61616" connectionFactoryJndiName="activeMqConnectionFactory" /> <endpoint name="SwsSam" address="jms://com.sws.sam" />
=======
then u can use it like other endpoint.
for instance:
====
<model name="resulting">
<service name="jms">
<inbound> <inbound-endpoint ref="SwsSam" /> </inbound> <component class="com.sws.ws.log.Logger"></component> <outbound> <pass-through-router> <stdio:outbound-endpoint system="OUT" /> </pass-through-router> </outbound> </model>
</service> =======
This works in my studio,hopeful it wiill be helpful.
regards!
simen.
2009/7/2 zhang yijie <mule.user.relay@...> Mule documents are so complex. I can't find a jms example for understanding. Please give me a whole example. |
|
|
Re: Who can give me a mule jms example?*This is my mule config:*
<jms:activemq-connector acknowledgementMode="AUTO_ACKNOWLEDGE" connectionFactory-ref="jmsConnectionFactory" maxRedelivery="10" name="activemq" specification="1.1" /> <service name="jms"> <inbound> <jms:inbound-endpoint address="jms://test.in" connector-ref="activemq" transformer-refs="JMStransformer" /> </inbound> <pooled-component> <spring-object bean="receiver"></spring-object> </pooled-component> </service> *jmsConnectionFactory is spring reference.* <bean id="jmsConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean"> <property name="jndiName" value="java:comp/env/jms/ConnectionFactory"></property> </bean> *Tomcat JNDI* <Resource name="jms/ConnectionFactory" auth="Container" type="org.apache.activemq.ActiveMQConnectionFactory" description="JMS Connection Factory" factory="org.apache.activemq.jndi.JNDIReferenceFactory" brokerURL="vm://localhost" brokerName="LocalActiveMQBroker" /> When I test it, An Exception is thrown, "org.mule.transport.service.TransportFactoryException: Failed to invoke lifecycle phase "initialise" on object: JmsConnector{this=322bce, started=false, initialised=false, name='connector.jms.0', disposed=false, numberOfConcurrentTransactedReceivers=4, createMultipleTransactedReceivers=true, connected=false, supportedProtocols=[jms], serviceOverrides=null} (org.mule.api.lifecycle.LifecycleException) " JMS and Mule are new for me. I want to write a simple program for studying. Could you help me ? --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
|
Re: Who can give me a mule jms example?Hi,
If you want a simple example for studying, run ActiveMQ on your machine and configure the brokerURL in the JMS connector instead of the connection-Factory-ref HTH A zhang yijie wrote: > *This is my mule config:* > <jms:activemq-connector acknowledgementMode="AUTO_ACKNOWLEDGE" > connectionFactory-ref="jmsConnectionFactory" > maxRedelivery="10" > name="activemq" > specification="1.1" > /> > > <service name="jms"> > <inbound> > <jms:inbound-endpoint address="jms://test.in" > connector-ref="activemq" transformer-refs="JMStransformer" /> > </inbound> > <pooled-component> > <spring-object bean="receiver"></spring-object> > </pooled-component> > </service> > > *jmsConnectionFactory is spring reference.* > <bean id="jmsConnectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean"> > <property name="jndiName" value="java:comp/env/jms/ConnectionFactory"></property> > </bean> > *Tomcat JNDI* > <Resource name="jms/ConnectionFactory" auth="Container" > type="org.apache.activemq.ActiveMQConnectionFactory" description="JMS Connection Factory" > factory="org.apache.activemq.jndi.JNDIReferenceFactory" brokerURL="vm://localhost" > brokerName="LocalActiveMQBroker" /> > > When I test it, An Exception is thrown, > "org.mule.transport.service.TransportFactoryException: Failed to invoke lifecycle phase "initialise" on object: JmsConnector{this=322bce, started=false, initialised=false, name='connector.jms.0', disposed=false, numberOfConcurrentTransactedReceivers=4, createMultipleTransactedReceivers=true, connected=false, supportedProtocols=[jms], serviceOverrides=null} (org.mule.api.lifecycle.LifecycleException) " > > JMS and Mule are new for me. I want to write a simple program for studying. Could you help me ? > > --------------------------------------------------------------------- > To unsubscribe from this list, please visit: > > http://xircles.codehaus.org/manage_email > > > > > -- Antoine Borg, Senior Consultant | Tel: +32 28 504 696 ricston Ltd., BP 2, 1180 Uccle, Brussels, BELGIUM See our full schedule of Mule and Android courses: http://www.ricston.com/courses/schedules/ email: _antoine.borg_@... <mailto:antoine.borg@...> | blog: blog.ricston.com <http://blog.ricston.com> | web: ricston.com <http://www.ricston.com/> --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
| Free embeddable forum powered by Nabble | Forum Help |