【发布时间】:2022-06-16 16:02:12
【问题描述】:
我在 Wildfly 20.0.0 中配置了 IBM MQ 资源适配器 9.2.5.0,如下:
<resource-adapter id="wmq.jmsra.rar">
<archive>
wmq.jmsra.rar
</archive>
<transaction-support>XATransaction</transaction-support>
<connection-definitions>
<connection-definition class-name="com.ibm.mq.connector.outbound.ManagedConnectionFactoryImpl" jndi-name="jms/IBMMQ_CONNECTIONFACTORY" pool-name="ibmmq-connection-definition">
<config-property name="hostName">${env.HOSTNAME}</config-property>
<config-property name="port">${env.PORT}</config-property>
<config-property name="channel">${env.CHANNEL}</config-property>
<config-property name="transportType">CLIENT</config-property>
<config-property name="queueManager">${env.QUEUE_MANAGER}</config-property>
</connection-definition>
</connection-definitions>
</resource-adapter>
使用此连接工厂创建 MQ 连接时,出现以下错误:
MQJCA1011: Failed to allocate a JMS connection
...
Caused by: javax.resource.ResourceException: IJ000455: Wrong ManagedConnectionFactory sent to allocateConnection (Pool=com.ibm.mq.connector.outbound.ManagedConnectionFactoryImpl@f85b573c, MCF=com.ibm.mq.connector.outbound.ManagedConnectionFactoryImpl@f85b573c)
at org.jboss.jca.core.connectionmanager.AbstractConnectionManager.allocateConnection(AbstractConnectionManager.java:784) ~[?:?]
at com.ibm.mq.connector.outbound.ConnectionFactoryImpl.createManagedJMSConnection(ConnectionFactoryImpl.java:309)
【问题讨论】:
标签: wildfly ibm-mq resource-adapter