스프링 통합 프로젝트로 분산 트랜잭션 관리를 위해 Atomikos를 사용하려고합니다. 문제가 발생합니다. AtomikosConnectionFactoryBean을 메시지 구동 형 채널 어댑터의 연결 팩토리로 사용하려고 시도합니다. 다음과 같습니다스프링 통합 메시지 구동 채널 어댑터로 AtomikosConnectionFactoryBean 구성
Caused by: com.ibm.msg.client.jms.DetailedJMSException: JMSWMQ0018: Failed to connect to queue manager 'NYHUB6S' with connection mode 'Client' and host name 'nyhub6s.us.ml.com'.
at com.ibm.msg.client.wmq.common.internal.Reason.reasonToException(Reason.java:608) ~[com.ibm.mqjms-7.0.1.1.jar:7.0.1.1 - k701-101-091116]
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:236) ~[com.ibm.mqjms-7.0.1.1.jar:7.0.1.1 - k701-101-091116]
at com.ibm.msg.client.wmq.internal.WMQConnection.<init>(WMQConnection.java:430) ~[com.ibm.mqjms-7.0.1.1.jar:7.0.1.1 - k701-101-091116]
at com.ibm.msg.client.wmq.internal.WMQXAConnection.<init>(WMQXAConnection.java:70) ~[com.ibm.mqjms-7.0.1.1.jar:7.0.1.1 - k701-101-091116]
at com.ibm.msg.client.wmq.factories.WMQXAConnectionFactory.createV7ProviderConnection(WMQXAConnectionFactory.java:190) ~[com.ibm.mqjms-7.0.1.1.jar:7.0.1.1 - k701-101-091116]
at com.ibm.msg.client.wmq.factories.WMQConnectionFactory.createProviderConnection(WMQConnectionFactory.java:6210) ~[com.ibm.mqjms-7.0.1.1.jar:7.0.1.1 - k701-101-091116]
at com.ibm.msg.client.wmq.factories.WMQXAConnectionFactory.createProviderXAConnection(WMQXAConnectionFactory.java:102) ~[com.ibm.mqjms-7.0.1.1.jar:7.0.1.1 - k701-101-091116]
at com.ibm.msg.client.jms.admin.JmsConnectionFactoryImpl.createXAConnectionInternal(JmsConnectionFactoryImpl.java:371) ~[com.ibm.mqjms-7.0.1.1.jar:7.0.1.1 - k701-101-091116]
at com.ibm.mq.jms.MQXAQueueConnectionFactory.createXAQueueConnection(MQXAQueueConnectionFactory.java:144) ~[com.ibm.mqjms-7.0.1.1.jar:7.0.1.1 - k701-101-091116]
at com.ibm.mq.jms.MQXAQueueConnectionFactory.createXAConnection(MQXAQueueConnectionFactory.java:98) ~[com.ibm.mqjms-7.0.1.1.jar:7.0.1.1 - k701-101-091116]
at com.atomikos.datasource.xa.jms.JmsTransactionalResource.refreshXAConnection(JmsTransactionalResource.java:73) ~[transactions-jta-4.0.4.jar:na]
... 17 common frames omitted
Caused by: com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2009' ('MQRC_CONNECTION_BROKEN').
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:223) ~[com.ibm.mqjms-7.0.1.1.jar:7.0.1.1 - k701-101-091116]
... 26 common frames omitted
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2009;AMQ9204: Connection to host 'nyhub6s.us.ml.com(1467)' rejected. [1=com.ibm.mq.jmqi.JmqiException[CC=2;RC=2009],3=nyhub6s.us.ml.com(1467),5=RemoteRcvThread.run]
at com.ibm.mq.jmqi.remote.internal.RemoteFAP.jmqiConnect(RemoteFAP.java:2072) ~[com.ibm.mq.jmqi-7.0.1.8.jar:7.0.1.8 - k701-108-120201]
at com.ibm.mq.jmqi.remote.internal.RemoteFAP.jmqiConnect(RemoteFAP.java:1286) ~[com.ibm.mq.jmqi-7.0.1.8.jar:7.0.1.8 - k701-108-120201]
at com.ibm.msg.client.wmq.internal.WMQConnection.<init>(WMQConnection.java:345) ~[com.ibm.mqjms-7.0.1.1.jar:7.0.1.1 - k701-101-091116]
... 25 common frames omitted
com.ibm.mq.jmqi.JmqiException: CC=2;RC=2009
at com.ibm.mq.jmqi.remote.internal.RemoteRcvThread.run(RemoteRcvThread.java:362) ~[com.ibm.mq.jmqi-7.0.1.8.jar:7.0.1.8 - k701-108-120201]
at com.ibm.msg.client.commonservices.workqueue.WorkQueueItem.runTask(WorkQueueItem.java:209) ~[com.ibm.mqjms-7.0.1.1.jar:7.0.1.1 - k701-101-091116]
at com.ibm.msg.client.commonservices.workqueue.SimpleWorkQueueItem.runItem(SimpleWorkQueueItem.java:100) ~[com.ibm.mqjms-7.0.1.1.jar:7.0.1.1 - k701-101-091116]
at com.ibm.msg.client.commonservices.workqueue.WorkQueueItem.run(WorkQueueItem.java:224) ~[com.ibm.mqjms-7.0.1.1.jar:7.0.1.1 - k701-101-091116]
at com.ibm.msg.client.commonservices.workqueue.WorkQueueManager.runWorkQueueItem(WorkQueueManager.java:298) ~[com.ibm.mqjms-7.0.1.1.jar:7.0.1.1 - k701-101-091116]
at com.ibm.msg.client.commonservices.j2se.workqueue.WorkQueueManagerImplementation$ThreadPoolWorker.run(WorkQueueManagerImplementation.java:1220) ~[com.ibm.mqjms-7.0.1.1.jar:7.0.1.1 - k701-101-091116]
내 스프링 통합 및 Atomikos의 설정 :
내가 오류가 아래 얻고있다
<bean id="xaConnectionFactory" class="com.ibm.mq.jms.MQXAQueueConnectionFactory">
<property name="hostName">
<value>${receiving.queue.hostname}</value>
</property>
<property name="port">
<value>${receiving.queue.port}</value>
</property>
<property name="queueManager">
<value>${receiving.queue.manager}</value>
</property>
<property name="channel">
<value>${receiving.queue.channel}</value>
</property>
<property name="transportType">
<value>1</value>
</property>
</bean>
<bean id="jmsQueueConnectionFactory"
class="org.springframework.jms.connection.UserCredentialsConnectionFactoryAdapter">
<property name="targetConnectionFactory" ref="xaConnectionFactory" />
<property name="username" value="${mqSeriesUserName}" />
<property name="password" value="${mqSeriesPassword}" />
</bean>
<!-- lets wrap in a pool to avoid creating a connection per send -->
<bean id="connectionFactory" class="org.springframework.jms.connection.CachingConnectionFactory">
<property name="targetConnectionFactory" ref="jmsQueueConnectionFactory"/>
<property name="sessionCacheSize" value="5"/>
<property name="reconnectOnException" value="true"/>
</bean>
<!--
<bean id="requestQueue1" class="com.ibm.mq.jms.MQQueue">
<property name="baseQueueName" value="${receiving.queue1}" />
JMSC.MQJMS_CLIENT_NONJMS_MQ is one
<property name="targetClient" value="1" />
</bean>
<bean id="requestQueue2" class="com.ibm.mq.jms.MQQueue">
<property name="baseQueueName" value="${receiving.queue2}" />
JMSC.MQJMS_CLIENT_NONJMS_MQ is one
<property name="targetClient" value="1" />
</bean>
<bean id="requestQueue3" class="com.ibm.mq.jms.MQQueue">
<property name="baseQueueName" value="${receiving.queue3}" />
JMSC.MQJMS_CLIENT_NONJMS_MQ is one
<property name="targetClient" value="1" />
</bean> -->
<!-- XA related changes -->
<bean id="atomikosTransactionManager" class="com.atomikos.icatch.jta.UserTransactionManager" init-method="init" destroy-method="close">
<property name="transactionTimeout" value="120"/>
<property name="forceShutdown">
<value>false</value>
</property>
</bean>
<bean id="atomikosUserTransaction" class="com.atomikos.icatch.jta.UserTransactionImp" >
</bean>
<bean id="atomikos_ConnectionFactory" class="com.atomikos.jms.AtomikosConnectionFactoryBean">
<property name="xaConnectionFactory" ref="xaConnectionFactory"/>
<property name="uniqueResourceName" value="MQSeries_XA_RMI"/>
<property name="poolSize" value="2" />
<property name="maxPoolSize" value="10" />
<property name="maxIdleTime" value="15" />
</bean>
<bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager">
<property name="transactionManager"> <ref bean ="atomikosTransactionManager"/></property>
<property name="userTransaction"> <ref bean="atomikosUserTransaction" /></property>
</bean>
<beans profile="SINGLE_REQUEST_Q">
<jms:message-driven-channel-adapter id="exch" destination="requestQueue" channel="jmsInChannel"
transaction-manager="transactionManager" acknowledge="transacted" connection-factory="atomikos_ConnectionFactory" />
<bean id="requestQueue" class="com.ibm.mq.jms.MQQueue">
<property name="baseQueueName" value="${receiving.queue.${exch}}" />
<property name="targetClient" value="1" />
</bean>
</beans>
내가 AtomikosConnectionFactoryBean
에 사용자 ID 및 암호를 캐싱 공장 참조를 전달해야하지만, MQXAQueueConnectionFactory
을 제외하고는 아무것도 사용하지 않습니다. 귀하의 의견이나 조언을 UserCredentialsConnectionFactoryAdapter
또는 CachingConnectionFactory
to AtomikosConnectionFactoryBean
콩 전달할 알려 주시기 바랍니다.
안녕하세요 Artem, 포장 Usercredential connectionfactory의 Atomikos 연결 팩토리가 도움이되지 않았습니다. 다시 같은 오류가 발생했습니다. 또한 XAConnectionFactory에 대한 래퍼를 만들려고했지만 그 또한 도움이되지 않았습니다. –
확인. 아니, 그럼 아이디어. 죄송합니다. 문제가 신임장을 가지고 있다는 사실은 ... –