【发布时间】:2016-07-03 14:42:09
【问题描述】:
我有标准的 Spring JMS 配置
<bean id="jmsTemplate" class="org.springframework.jms.core.JmsTemplate">
<property name="connectionFactory" ref="connectionFactory" />
<property name="defaultDestination" ref="jmsdestination" />
</bean>
<bean id="connectionFactory" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="jms/MQAuditQueueConnectionFactory" />
</bean>
<bean id="jmsDestinationResolver" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName" value="jms/MQAuditQueue" />
</bean>
我认为 WAS 8.5.5.2 上的标准 MQ,当我启动我的网络应用程序时,我得到:
Cannot convert value of type [com.ibm.ejs.jms.JMSQueueConnectionFactoryHandle] to required type [javax.jms.ConnectionFactory] for property 'connectionFactory'
我从我的服务器上注意到我在以下 jar 中有以下类
class com/ibm/ejs/jms/JMSQueueConnectionFactoryHandle.class found in /opt/websphere/was8//plugins/com.ibm.ws.runtime.jar
和
com/ibm/mq/jms/MQQueueConnectionFactory.class found in /opt/websphere/was8//installedConnectors/wmq.jmsra.rar/com.ibm.mqjms.jar
如何让 WAS MQ 使用第二个 jar?
【问题讨论】: