You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Viswanath Durbha <Vi...@gmail.com> on 2007/11/23 12:59:49 UTC
JMSComponent connecting to WebSphereMQ
Hi,
I'm using ActiveMQ 5.0 snapshot version. I am trying to configure a
JMSComponent to connect to Websphere MQ in my activemq.xml file as follows:
<bean id="webspheremq" class="org.apache.camel.component.jms.JmsComponent">
<property name="connectionFactory">
<bean class="com.ibm.mq.jms.MQQueueConnectionFactory">
<property name="hostName" value="mqhost"/>
<property name="port" value="1417"/>
<property name="queueManager" value="QM1"/>
<property name="channel" value="SYSTEM.DEF.SVRCONN"/>
<property name="transportType" value="1"/>
</bean>
</property>
</bean>
When I try to use this to create a camel route, then I get an exception as
following:
javax.jms.JMSSecurityException: MQJMS2013: invalid security authentication
supplied for MQQueueManager
I guess I have to pass in the userid and password for creating the
connection from the connection factory. How do I do it?
--
View this message in context: http://www.nabble.com/JMSComponent-connecting-to-WebSphereMQ-tf4861290s2354.html#a13911140
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: JMSComponent connecting to WebSphereMQ
Posted by walterhuang <wa...@hotmail.com>.
You can specify MCAUserID of your server connection channel
SYSTEM.DEF.SVRCONN.
Pls check MQ Security manual.
Viswanath Durbha wrote:
>
> Hi,
>
> I'm using ActiveMQ 5.0 snapshot version. I am trying to configure a
> JMSComponent to connect to Websphere MQ in my activemq.xml file as
> follows:
>
> <bean id="webspheremq"
> class="org.apache.camel.component.jms.JmsComponent">
> <property name="connectionFactory">
> <bean class="com.ibm.mq.jms.MQQueueConnectionFactory">
> <property name="hostName" value="mqhost"/>
> <property name="port" value="1417"/>
> <property name="queueManager" value="QM1"/>
> <property name="channel" value="SYSTEM.DEF.SVRCONN"/>
> <property name="transportType" value="1"/>
> </bean>
> </property>
> </bean>
>
> When I try to use this to create a camel route, then I get an exception as
> following:
> javax.jms.JMSSecurityException: MQJMS2013: invalid security authentication
> supplied for MQQueueManager
>
> I guess I have to pass in the userid and password for creating the
> connection from the connection factory. How do I do it?
>
--
View this message in context: http://www.nabble.com/JMSComponent-connecting-to-WebSphereMQ-tp13911140s2354p14469696.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: JMSComponent connecting to WebSphereMQ
Posted by James Strachan <ja...@gmail.com>.
On 26/11/2007, Viswanath Durbha <Vi...@gmail.com> wrote:
>
> Here is the spring xml that I used to configure MQQueueConnectionFactory with
> credentials. The following worked for me.
>
>
> <bean id="webspheremq"
> class="org.apache.camel.component.jms.JmsComponent">
> <property name="connectionFactory" ref="myProxyConnectionFactory"/>
> </bean>
>
> <bean id="myProxyConnectionFactory"
> class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter">
> <property name="targetConnectionFactory" ref="myConnectionFactory"/>
> <property name="username" value="user1"/>
> <property name="password" value="password1"/>
> </bean>
>
> <bean id="myConnectionFactory"
> class="com.ibm.mq.jms.MQQueueConnectionFactory">
> <property name="hostName" value="mqhost"/>
> <property name="port" value="1417"/>
> <property name="queueManager" value="QM1"/>
> <property name="channel" value="SYSTEM.DEF.SVRCONN"/>
> <property name="transportType" value="1"/>
> </bean>
>
> This works for me.
Great stuff thanks!
I was wondering of adding the username / password properties to the
JMSComponent and if they are both specified, then wrapping the
connection factory in the UserCredentialsConnectionFactoryAdapter -
which could avoid others scratching their heads trying to figure out
how to specify those values.
I've raised a JIRA to track it...
https://issues.apache.org/activemq/browse/CAMEL-246
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://open.iona.com
Re: JMSComponent connecting to WebSphereMQ
Posted by Viswanath Durbha <Vi...@gmail.com>.
Here is the spring xml that I used to configure MQQueueConnectionFactory with
credentials. The following worked for me.
<bean id="webspheremq"
class="org.apache.camel.component.jms.JmsComponent">
<property name="connectionFactory" ref="myProxyConnectionFactory"/>
</bean>
<bean id="myProxyConnectionFactory"
class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter">
<property name="targetConnectionFactory" ref="myConnectionFactory"/>
<property name="username" value="user1"/>
<property name="password" value="password1"/>
</bean>
<bean id="myConnectionFactory"
class="com.ibm.mq.jms.MQQueueConnectionFactory">
<property name="hostName" value="mqhost"/>
<property name="port" value="1417"/>
<property name="queueManager" value="QM1"/>
<property name="channel" value="SYSTEM.DEF.SVRCONN"/>
<property name="transportType" value="1"/>
</bean>
This works for me.
Thanks,
Viswanath
James.Strachan wrote:
>
> On 23/11/2007, Viswanath Durbha <Vi...@gmail.com> wrote:
>>
>> Unfortunately. MQQueueConnectionFactory doesn't have properties userName
>> and
>> password. So I had to use an adapter available in spring called
>> UserCredentialsConnectionFactoryAdapter. This is a wrapper around any
>> other
>> JMSConnectionFactory that takes the credentials. So I just defined this
>> connection factory for my JMSComponent and that solved the problem.
>>
>> I will post the XML after the weekend after doing some testing.
>
> Ah great - thanks!
>
> I was wondering what the proper Spring 2 way of dealing with that is!
>
> --
> James
> -------
> http://macstrac.blogspot.com/
>
> Open Source Integration
> http://open.iona.com
>
>
--
View this message in context: http://www.nabble.com/JMSComponent-connecting-to-WebSphereMQ-tf4861290s2354.html#a13946581
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: JMSComponent connecting to WebSphereMQ
Posted by James Strachan <ja...@gmail.com>.
On 23/11/2007, Viswanath Durbha <Vi...@gmail.com> wrote:
>
> Unfortunately. MQQueueConnectionFactory doesn't have properties userName and
> password. So I had to use an adapter available in spring called
> UserCredentialsConnectionFactoryAdapter. This is a wrapper around any other
> JMSConnectionFactory that takes the credentials. So I just defined this
> connection factory for my JMSComponent and that solved the problem.
>
> I will post the XML after the weekend after doing some testing.
Ah great - thanks!
I was wondering what the proper Spring 2 way of dealing with that is!
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://open.iona.com
Re: JMSComponent connecting to WebSphereMQ
Posted by Viswanath Durbha <Vi...@gmail.com>.
Unfortunately. MQQueueConnectionFactory doesn't have properties userName and
password. So I had to use an adapter available in spring called
UserCredentialsConnectionFactoryAdapter. This is a wrapper around any other
JMSConnectionFactory that takes the credentials. So I just defined this
connection factory for my JMSComponent and that solved the problem.
I will post the XML after the weekend after doing some testing.
Thanks,
Vishi
James.Strachan wrote:
>
> Many JMS providers let you customize that on the ConnectionFactory.
>
> BTW the Camel sub project has its own forums/mailing lists...
> http://activemq.apache.org/camel/discussion-forums.html
>
> On 23/11/2007, James Strachan <ja...@gmail.com> wrote:
>> can you configure the user and password on the connection factory?
>>
>> On 23/11/2007, Viswanath Durbha <Vi...@gmail.com> wrote:
>> >
>> > Hi,
>> >
>> > I'm using ActiveMQ 5.0 snapshot version. I am trying to configure a
>> > JMSComponent to connect to Websphere MQ in my activemq.xml file as
>> follows:
>> >
>> > <bean id="webspheremq"
>> class="org.apache.camel.component.jms.JmsComponent">
>> > <property name="connectionFactory">
>> > <bean class="com.ibm.mq.jms.MQQueueConnectionFactory">
>> > <property name="hostName" value="mqhost"/>
>> > <property name="port" value="1417"/>
>> > <property name="queueManager" value="QM1"/>
>> > <property name="channel" value="SYSTEM.DEF.SVRCONN"/>
>> > <property name="transportType" value="1"/>
>> > </bean>
>> > </property>
>> > </bean>
>> >
>> > When I try to use this to create a camel route, then I get an exception
>> as
>> > following:
>> > javax.jms.JMSSecurityException: MQJMS2013: invalid security
>> authentication
>> > supplied for MQQueueManager
>> >
>> > I guess I have to pass in the userid and password for creating the
>> > connection from the connection factory. How do I do it?
>> > --
>> > View this message in context:
>> >
>> http://www.nabble.com/JMSComponent-connecting-to-WebSphereMQ-tf4861290s2354.html#a13911140
>> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>> >
>> >
>>
>>
>> --
>> James
>> -------
>> http://macstrac.blogspot.com/
>>
>> Open Source Integration
>> http://open.iona.com
>>
>
>
> --
> James
> -------
> http://macstrac.blogspot.com/
>
> Open Source Integration
> http://open.iona.com
>
>
--
View this message in context: http://www.nabble.com/JMSComponent-connecting-to-WebSphereMQ-tf4861290s2354.html#a13915246
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Re: JMSComponent connecting to WebSphereMQ
Posted by James Strachan <ja...@gmail.com>.
Many JMS providers let you customize that on the ConnectionFactory.
BTW the Camel sub project has its own forums/mailing lists...
http://activemq.apache.org/camel/discussion-forums.html
On 23/11/2007, James Strachan <ja...@gmail.com> wrote:
> can you configure the user and password on the connection factory?
>
> On 23/11/2007, Viswanath Durbha <Vi...@gmail.com> wrote:
> >
> > Hi,
> >
> > I'm using ActiveMQ 5.0 snapshot version. I am trying to configure a
> > JMSComponent to connect to Websphere MQ in my activemq.xml file as follows:
> >
> > <bean id="webspheremq" class="org.apache.camel.component.jms.JmsComponent">
> > <property name="connectionFactory">
> > <bean class="com.ibm.mq.jms.MQQueueConnectionFactory">
> > <property name="hostName" value="mqhost"/>
> > <property name="port" value="1417"/>
> > <property name="queueManager" value="QM1"/>
> > <property name="channel" value="SYSTEM.DEF.SVRCONN"/>
> > <property name="transportType" value="1"/>
> > </bean>
> > </property>
> > </bean>
> >
> > When I try to use this to create a camel route, then I get an exception as
> > following:
> > javax.jms.JMSSecurityException: MQJMS2013: invalid security authentication
> > supplied for MQQueueManager
> >
> > I guess I have to pass in the userid and password for creating the
> > connection from the connection factory. How do I do it?
> > --
> > View this message in context:
> > http://www.nabble.com/JMSComponent-connecting-to-WebSphereMQ-tf4861290s2354.html#a13911140
> > Sent from the ActiveMQ - User mailing list archive at Nabble.com.
> >
> >
>
>
> --
> James
> -------
> http://macstrac.blogspot.com/
>
> Open Source Integration
> http://open.iona.com
>
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://open.iona.com
Re: JMSComponent connecting to WebSphereMQ
Posted by James Strachan <ja...@gmail.com>.
can you configure the user and password on the connection factory?
On 23/11/2007, Viswanath Durbha <Vi...@gmail.com> wrote:
>
> Hi,
>
> I'm using ActiveMQ 5.0 snapshot version. I am trying to configure a
> JMSComponent to connect to Websphere MQ in my activemq.xml file as follows:
>
> <bean id="webspheremq" class="org.apache.camel.component.jms.JmsComponent">
> <property name="connectionFactory">
> <bean class="com.ibm.mq.jms.MQQueueConnectionFactory">
> <property name="hostName" value="mqhost"/>
> <property name="port" value="1417"/>
> <property name="queueManager" value="QM1"/>
> <property name="channel" value="SYSTEM.DEF.SVRCONN"/>
> <property name="transportType" value="1"/>
> </bean>
> </property>
> </bean>
>
> When I try to use this to create a camel route, then I get an exception as
> following:
> javax.jms.JMSSecurityException: MQJMS2013: invalid security authentication
> supplied for MQQueueManager
>
> I guess I have to pass in the userid and password for creating the
> connection from the connection factory. How do I do it?
> --
> View this message in context:
> http://www.nabble.com/JMSComponent-connecting-to-WebSphereMQ-tf4861290s2354.html#a13911140
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>
>
--
James
-------
http://macstrac.blogspot.com/
Open Source Integration
http://open.iona.com