You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Mond Raymond <mo...@gmail.com> on 2010/09/10 14:47:58 UTC
Re: Need help converting a Spring queue definition to a Camel
endpoint
I have this all working nice now:
In the Camel Spring context file:
<bean id="jmsDestinationResolver"
class="org.springframework.jms.support.destination.JndiDestinationResolver"/>
<jee:jndi-lookup id="mqSeriesBaseConnectionFactory"
jndi-name="jms/mqseries"/>
<bean id="mqSeriesConnectionFactory"
class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter"
p:username="${user}"
p:password="${password}"
p:targetConnectionFactory-ref="mqSeriesBaseConnectionFactory"/>
<bean id="mqseries" class="org.apache.camel.component.jms.JmsComponent"
p:connectionFactory-ref="mqSeriesConnectionFactory"
p:useVersion102="true"
p:recoveryInterval="30000"
p:testConnectionOnStartup="true"
p:destinationResolver-ref="jmsDestinationResolver"/>
<bean id="someRoute" class="com.blah.SomeRoute"
p:fromURI="mqseries:mqseriesInQueue"
p:toURI="mqseries:mqseriesOutQueue"/>
<camelContext xmlns="http://camel.apache.org/schema/spring">
<routeBuilder ref="someRoute"/>
</camelContext>
In the Jetty configuration file:
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN"
"http://jetty.mortbay.org/configure.dtd">
<Configure class="org.mortbay.jetty.webapp.WebAppContext">
<Array id="plusConfig" type="java.lang.String">
<Item>org.mortbay.jetty.webapp.WebInfConfiguration</Item>
<Item>org.mortbay.jetty.plus.webapp.EnvConfiguration</Item>
<Item>org.mortbay.jetty.plus.webapp.Configuration</Item>
<Item>org.mortbay.jetty.webapp.JettyWebXmlConfiguration</Item>
<Item>org.mortbay.jetty.webapp.TagLibConfiguration</Item>
</Array>
<New id="plus" class="org.mortbay.jetty.webapp.WebAppContext">
<Set name="ConfigurationClasses">
<Ref id="plusConfig"/>
</Set>
</New>
<New id="mqConnectionFactory"
class="org.mortbay.jetty.plus.naming.Resource">
<Arg>jms/mqseries</Arg>
<Arg>
<New class="com.ibm.mq.jms.MQQueueConnectionFactory">
<Set name="HostName">HOST</Set>
<Set name="Port">NNNN</Set>
<Set name="Channel">CHANNEL</Set>
<Set name="TransportType">1</Set>
<Set name="QueueManager">QM</Set>
</New>
</Arg>
</New>
<New id="mqIncomingQueue"
class="org.mortbay.jetty.plus.naming.Resource">
<Arg>mqseriesInQueue</Arg>
<Arg>
<New class="com.ibm.mq.jms.MQQueue">
<Arg>CHANNEL</Arg>
<Arg>IN_QNAME</Arg>
</New>
</Arg>
</New>
<New id="mqOutgoingQueue"
class="org.mortbay.jetty.plus.naming.Resource">
<Arg>mqseriesOutQueue</Arg>
<Arg>
<New class="com.ibm.mq.jms.MQQueue">
<Arg>CHANNEL</Arg>
<Arg>OUT_QNAME</Arg>
<Set name="targetClient">1</Set>
</New>
</Arg>
</New>
</Configure>
I hope this helps others as I lost a lot of time on this small detail.
Best regards
Ray
--
View this message in context: http://camel.465427.n5.nabble.com/how-to-configure-sending-to-MQseries-tp478478p2834937.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Need help converting a Spring queue definition to a Camel
endpoint
Posted by nakshathri <ma...@happiestminds.com>.
Hello Ray, Thanks for this. I think it will save lots of my time. But one
small information i need. Why do we need jetty configuration file? Can you
please explain. Regards, Manjunath
--
View this message in context: http://camel.465427.n5.nabble.com/how-to-configure-sending-to-MQseries-tp478478p5728222.html
Sent from the Camel - Users mailing list archive at Nabble.com.