« Return to Thread: Who can give me a mule jms example?

Re: Who can give me a mule jms example?

by antoine.borg :: Rate this Message:

Reply to Author | View in Thread

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


 « Return to Thread: Who can give me a mule jms example?