How to do jndi lookup of MQ connection factory defined in Websphere app Server from Spring -


I am trying to connect to a MQ connection factory defined in Websphere App Server 7.0.

But I could not find the correct connectionfitter interface for MQ to define in spring.

However, when I tried to hardcode the connection details in the spring config file, I was able to connect to the Quoin manager.

Working Code

  

& lt; Bean id = "mqConnectionFactory" class = "com.ibm.mq.jms.MQQueueConnectionFactory" & gt; & Lt; Property Name = "Hostname" & gt; & Lt; Price & gt; 127.0.0.1 & lt; / Pricing & gt; & Lt; / Property & gt; & Lt; Property Name = "Port" & gt; & Lt; Price & gt; 1414 & lt; / Pricing & gt; & Lt; / Property & gt; & Lt; Property Name = "Quoo Manager" & gt; & Lt; Price & gt; MYQM & lt; / Pricing & gt; & Lt; / Property & gt; & Lt; Property Name = "Transport Type" & gt; & Lt; Price & gt; 1 & lt; / Pricing & gt; & Lt; / Property & gt; & Lt; / Bean & gt;

not a work code

  & lt; Bean id = "mqConnectionFactory" class = "org.springframework.jndi.JndiObjectFactoryBean" & gt; & Lt; Property Name = "jndiName" value = "jms / wasqm" /> & Lt; Property name = "Lookupon startup" value = "wrong" /> & Lt; Property name = "cache" value = "true" /> & Lt; Property Name = "ProxyInterface" value = "com.ibm.mq.jms.MQQueueConnectionFactoryFactory" /> & Lt; / Bean & gt;   

While WASQM defined website MQ connection factory

error in non-functioning code

  Org .springframework.beans.factory.BeanCreationException: name defined with 'mqConnectionFactory' error ServletContext resource in making bean [/WEB-INF/config/config-mq.xml]: failed to invite the init method; The nested exception is java.lang.IllegalArgumentException: [com.ibm.mq.jms.MQQueueConnectionFactoryFactory] org.springframework at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean (AbstractAatowar Capable BeanFactory.java1420) is not an interface. Org.springframework.beans.factory.support.AbstractBeanFactory at $ org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean (AbstractAutowireCapableBeanFactory.java:456) at beans.factory.support.AboutAutowireCapableBeanFactory.doCreateBean (AbstractAutowireCapableBeanFactory.java.19 ) on org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean on Org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton (Abotbenfaktrikjawa Month 9 1). ) At caused by org.springframework.beans.factory.support.AbstractBeanFactory.getBean (AbstractBeanFactory.java:190): java.lan G.IllegalArgumentException: [com.ibm.mq.jms.MQQueueConnectionFactoryFactory] is not an interface   

I need help in changing the codes are not working with the right code Spring - 3.0.5 IBM MQ and web application server - 7.0

< div class = "post-text" itemprop = "text">

the right way

  1. Vebspeyr app Create resource Kwoj connection factory server connections (not factory)
  2. Spring Con Connection Ig using javax.jms.QueueConnectionFactory as factory or

      & lt; Bean id = "mqConnectionFactory" class = "org.springframework.jndi.JndiObjectFactoryBean" & gt; & Lt; Property Name = "jndiName" value = "WASQM" /> & Lt; Property name = "Lookupon startup" value = "wrong" /> & Lt; Property name = "cache" value = "true" /> & Lt; Property Name = "ProxyInterface" value = "javax.jms.QueueConnectionFactory" / & gt; & Lt; / Bean & gt;     

    This signaled me.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -