activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Viswanath Durbha <Viswanath.Dur...@gmail.com>
Subject Re: JMSComponent connecting to WebSphereMQ
Date Mon, 26 Nov 2007 09:35:15 GMT

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 <Viswanath.Durbha@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.


Mime
View raw message