You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by JavaRat <fr...@mindwell.se> on 2008/10/06 09:24:00 UTC

Re: Bridging the ActiveMQ with IBM Websphere using Camel

It took us a while too let things sink in and too grasp the problem
correctly. We have been approaching the problem in the wrong way not
understanding camel.

This problem has nothing too do with camel. However it would be very nice to
be able to set a URI as in the case with servicemix-jms where we could
simply type into the destinationName:

<jms:provider service="esb:IBMMQOutbound"
endpoint="mqOutbound"
destinationName="queue:///MyQueueOutBound?targetClient=1"
connectionFactory="#mqConnectionFactory"/>	
	
<bean id="mqConnectionFactory"
class="com.ibm.mq.jms.MQQueueConnectionFactory">
<property name="transportType">
<util:constant static-field="com.ibm.mq.jms.JMSC.MQJMS_CLIENT_NONJMS_MQ"/> 
</property>
<property name="queueManager" value="QMgr"/>
<property name="hostName" value="xxx.xxx.xxx.xxx"/>     
<property name="port" value="1414"/>
</bean>

Something like this would be ideal in our case:

<camelContext id="camel"
xmlns="http://activemq.apache.org/camel/schema/spring">
<route>
<from uri="activemq:myqueueinbound"/>
<to uri="ibmmq:queue:///MyQueueOutBound?targetClient=1"/>
</route>
</camelContext>


However this is not the case. We believe that something like this should
solve the problem if we only figured out the correct spring configuration:

<bean id="ibmmq" class="org.apache.camel.component.jms.JmsComponent">
<property name="connectionFactory">
<bean class="com.ibm.mq.jms.MQQueueConnectionFactory">
<property name="transportType">
<util:constant static-field="com.ibm.mq.jms.JMSC.MQJMS_CLIENT_NONJMS_MQ"/>
</property>
<property name="queueManager" value="QMgr"/>
<property name="hostName" value="xxx.xxx.xxx.xxx"/>    
<property name="port" value="1414"/>
</bean>
</property>
<property name="queue" ref="ibmqueueprop">
</bean>

<bean id="ibmqueueprop" class=" com.ibm.mq.jms.MQDestination">
<property name="targetClient" value="1"/>    
</bean>


If someone finds a solution to this problem please send us a message or post
it here. 
Thanks again Claus for your assistance in this matter!
We will keep this update if we stumble on the solution =)


-- 
View this message in context: http://www.nabble.com/Bridging-the-ActiveMQ-with-IBM-Websphere-using-Camel-tp19623329s22882p19833105.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: Bridging the ActiveMQ with IBM Websphere using Camel

Posted by Claus Ibsen <ci...@silverbullet.dk>.
Hi

I was wondering if you should use a different constant that = JMS.

So this one should be changed:
<property name="transportType">
<util:constant static-field="com.ibm.mq.jms.JMSC.MQJMS_CLIENT_NONJMS_MQ"/>
</property>

To:
<property name="transportType">
<util:constant static-field="com.ibm.mq.jms.JMSC.MQJMS_CLIENT_JMS_MQ"/>
</property>

Notice: That the 2nd is a JMS (there is not a NON). This constant is the "1" I have sent to you in my sample, so it could probably be configured as:
<property name="transportType" value="1"/>


Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk

-----Original Message-----
From: JavaRat [mailto:fredrik.sassenberg@mindwell.se] 
Sent: 6. oktober 2008 09:52
To: camel-user@activemq.apache.org
Subject: RE: Bridging the ActiveMQ with IBM Websphere using Camel


You are correct here Claus, using the parameter:

<property name="transportType">
<util:constant static-field="com.ibm.mq.jms.JMSC.MQJMS_CLIENT_NONJMS_MQ"/>
</property>

seems to make no difference at all and we should remove it. 

Instead we tried using:
<property name="transportType" value="1" />
This unfortunately didn't have an effect on the result. 

Taking a dive into servicemix-jms is the next step for sure here! This might
reveal some answers.

>From what I understand camel JMS is based on
org.springframework.jms.core.JmsTemplate?
We could perhaps make use of this?


-- 
View this message in context: http://www.nabble.com/Bridging-the-ActiveMQ-with-IBM-Websphere-using-Camel-tp19623329s22882p19833403.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: Bridging the ActiveMQ with IBM Websphere using Camel

Posted by JavaRat <fr...@mindwell.se>.
You are correct here Claus, using the parameter:

<property name="transportType">
<util:constant static-field="com.ibm.mq.jms.JMSC.MQJMS_CLIENT_NONJMS_MQ"/>
</property>

seems to make no difference at all and we should remove it. 

Instead we tried using:
<property name="transportType" value="1" />
This unfortunately didn’t have an effect on the result. 

Taking a dive into servicemix-jms is the next step for sure here! This might
reveal some answers.

>From what I understand camel JMS is based on
org.springframework.jms.core.JmsTemplate?
We could perhaps make use of this?


-- 
View this message in context: http://www.nabble.com/Bridging-the-ActiveMQ-with-IBM-Websphere-using-Camel-tp19623329s22882p19833403.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: Bridging the ActiveMQ with IBM Websphere using Camel

Posted by Claus Ibsen <ci...@silverbullet.dk>.
Hi

Just a reminder. We should check how servicemix-jms supports these options.
Is "targetClient" a known option in servicemix-jms? Or does it support setting any arbitrary options, eg. ?mysuperoption=true

We could check the source code, servicemix-jms documentation and ask on the servicemix IRC chat room.

Frederik this option is not possible to set on the MQQueueConnectionFactory?
And why are you using a NON JMS transport type?
<property name="transportType">
<util:constant static-field="com.ibm.mq.jms.JMSC.MQJMS_CLIENT_NONJMS_MQ"/> 
</property>

I think it should be "1" for JMS.


Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk

-----Original Message-----
From: JavaRat [mailto:fredrik.sassenberg@mindwell.se] 
Sent: 6. oktober 2008 09:24
To: camel-user@activemq.apache.org
Subject: Re: Bridging the ActiveMQ with IBM Websphere using Camel


It took us a while too let things sink in and too grasp the problem
correctly. We have been approaching the problem in the wrong way not
understanding camel.

This problem has nothing too do with camel. However it would be very nice to
be able to set a URI as in the case with servicemix-jms where we could
simply type into the destinationName:

<jms:provider service="esb:IBMMQOutbound"
endpoint="mqOutbound"
destinationName="queue:///MyQueueOutBound?targetClient=1"
connectionFactory="#mqConnectionFactory"/>	
	
<bean id="mqConnectionFactory"
[CI] 
class="com.ibm.mq.jms.MQQueueConnectionFactory">
<property name="transportType">
<util:constant static-field="com.ibm.mq.jms.JMSC.MQJMS_CLIENT_NONJMS_MQ"/> 
</property>
<property name="queueManager" value="QMgr"/>
<property name="hostName" value="xxx.xxx.xxx.xxx"/>     
<property name="port" value="1414"/>
</bean>

Something like this would be ideal in our case:

<camelContext id="camel"
xmlns="http://activemq.apache.org/camel/schema/spring">
<route>
<from uri="activemq:myqueueinbound"/>
<to uri="ibmmq:queue:///MyQueueOutBound?targetClient=1"/>
</route>
</camelContext>


However this is not the case. We believe that something like this should
solve the problem if we only figured out the correct spring configuration:

<bean id="ibmmq" class="org.apache.camel.component.jms.JmsComponent">
<property name="connectionFactory">
<bean class="com.ibm.mq.jms.MQQueueConnectionFactory">
<property name="transportType">
<util:constant static-field="com.ibm.mq.jms.JMSC.MQJMS_CLIENT_NONJMS_MQ"/>
</property>
<property name="queueManager" value="QMgr"/>
<property name="hostName" value="xxx.xxx.xxx.xxx"/>    
<property name="port" value="1414"/>
</bean>
</property>
<property name="queue" ref="ibmqueueprop">
</bean>

<bean id="ibmqueueprop" class=" com.ibm.mq.jms.MQDestination">
<property name="targetClient" value="1"/>    
</bean>


If someone finds a solution to this problem please send us a message or post
it here. 
Thanks again Claus for your assistance in this matter!
We will keep this update if we stumble on the solution =)


-- 
View this message in context: http://www.nabble.com/Bridging-the-ActiveMQ-with-IBM-Websphere-using-Camel-tp19623329s22882p19833105.html
Sent from the Camel - Users mailing list archive at Nabble.com.