You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by wrobs <wr...@redhat.com> on 2015/04/17 00:56:11 UTC

Replacing JMS Component with SJMS

Hi All,

I'm attempting to replace the JMS component in my routes with the SJMS
component, but using the original connectionFactory. 

<bean id="sjms" class="org.apache.camel.component.jms.JmsComponent">
<property name="connectionFactory" ref="jmsQueueConnectionFactory"/>
</bean

<bean id="jmsQueueConnectionFactory"
class="org.springwork.jms.connection.UserCredentialsConnectionFactoryAdapter">
<property name="targetConnectionFactory" ref="MQConnectionFactory"/>
<property name="username" value=secret/>
<property name="password" value=secret/>
</bean>

<bean name="MQConnectionFactory"
class="com.ibm.mq.jms.MQQueueConnectionFactory">
<properties: hostname,port,channel,queueManager,transportType>
</bean>

So theses this connection Factory works perfectly when the component is
*JMS*, but when I switch to *SJMS* the queue manager will not let me connect
to it. That is a particularly confusing behavior because the credentials are
the exact same. the SJMS docs don't appear to have what I need for making
the transition, so has anyone here ever changed from the JMS to the SJMS
component in an existing route?

Thanks,






--
View this message in context: http://camel.465427.n5.nabble.com/Replacing-JMS-Component-with-SJMS-tp5765882.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Replacing JMS Component with SJMS

Posted by yogu13 <yo...@gmail.com>.
Hello,

Please let us know how does you jms endpoint in route looks like ...

Regards,
-Yogesh



--
View this message in context: http://camel.465427.n5.nabble.com/Replacing-JMS-Component-with-SJMS-tp5765882p5765892.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Replacing JMS Component with SJMS

Posted by wrobs <wr...@redhat.com>.
Claus,

You have the right of it. Thanks very much.





--
View this message in context: http://camel.465427.n5.nabble.com/Replacing-JMS-Component-with-SJMS-tp5765882p5765973.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Replacing JMS Component with SJMS

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

The jms component class name is wrong

<bean id="sjms" class="org.apache.camel.component.jms.JmsComponent">
<property name="connectionFactory" ref="jmsQueueConnectionFactory"/>
</bean

That should be the class name from camel-sjms
https://github.com/apache/camel/blob/master/components/camel-sjms/src/main/java/org/apache/camel/component/sjms/SjmsComponent.java

On Fri, Apr 17, 2015 at 12:56 AM, wrobs <wr...@redhat.com> wrote:
> Hi All,
>
> I'm attempting to replace the JMS component in my routes with the SJMS
> component, but using the original connectionFactory.
>
> <bean id="sjms" class="org.apache.camel.component.jms.JmsComponent">
> <property name="connectionFactory" ref="jmsQueueConnectionFactory"/>
> </bean
>
> <bean id="jmsQueueConnectionFactory"
> class="org.springwork.jms.connection.UserCredentialsConnectionFactoryAdapter">
> <property name="targetConnectionFactory" ref="MQConnectionFactory"/>
> <property name="username" value=secret/>
> <property name="password" value=secret/>
> </bean>
>
> <bean name="MQConnectionFactory"
> class="com.ibm.mq.jms.MQQueueConnectionFactory">
> <properties: hostname,port,channel,queueManager,transportType>
> </bean>
>
> So theses this connection Factory works perfectly when the component is
> *JMS*, but when I switch to *SJMS* the queue manager will not let me connect
> to it. That is a particularly confusing behavior because the credentials are
> the exact same. the SJMS docs don't appear to have what I need for making
> the transition, so has anyone here ever changed from the JMS to the SJMS
> component in an existing route?
>
> Thanks,
>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Replacing-JMS-Component-with-SJMS-tp5765882.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/