我尝试在JBOSS EAP jms队列(AMQ)和IBM MQ之间建立一个JMS桥作为目的地。下面是我的JMS桥:
<jms-bridge name="my-jms-bridge" quality-of-service="AT_MOST_ONCE" failure-retry-interval="1000" max-retries="2" max-batch-size="10" max-batch-time="100">
<source connection-factory="java:/ConnectionFactory" destination="java:/jms/queue/bridgingQueue"/>
<target connection-factory="jms/mqSeriesJMSFactoryInboundQueue1" destination="jms/inboundQueue1"/>
</jms-bridge>
我在资源适配器中创建了mqSeriesJMSFactoryInboundQueue1和inboundQueue1作为连接工厂和管理对象,但不支持事务。
我可以向AMQ发布测试消息,但控制台上显示的警告信息低于:
WARN [org.apache.activemq.artemis.jms.bridge] (Thread-102) AMQ342009: JMS Bridge N/A failed to send + acknowledge batch, closing JMS objects: com.ibm.msg.client.jms.DetailedIllegalStateException: JMSCC0014: It is not valid to call the 'commit' method on a nontransacted session.
The application called a method that must not be called on a nontransacted session.
Change the application program to remove this behavior.
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
at deployment.wmq.jmsra-9.2.2.0.rar//com.ibm.msg.client.commonservices.j2se.NLSServices.createException(NLSServices.java:319)
at deployment.wmq.jmsra-9.2.2.0.rar//com.ibm.msg.client.commonservices.nls.NLSServices.createException(NLSServices.java:226)
at deployment.wmq.jmsra-9.2.2.0.rar//com.ibm.msg.client.jms.internal.JmsErrorUtils.createException(JmsErrorUtils.java:126)
at deployment.wmq.jmsra-9.2.2.0.rar//com.ibm.msg.client.jms.internal.JmsSessionImpl.commit(JmsSessionImpl.java:744)
at deployment.wmq.jmsra-9.2.2.0.rar//com.ibm.mq.jms.MQSession.commit(MQSession.java:294)
at deployment.wmq.jmsra-9.2.2.0.rar//com.ibm.mq.connector.outbound.SessionWrapper.commit(SessionWrapper.java:335)
at org.apache.activemq.artemis@2.6.3.redhat-00014//org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl.sendBatchNonTransacted(JMSBridgeImpl.java:1338)
at org.apache.activemq.artemis@2.6.3.redhat-00014//org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl.sendBatch(JMSBridgeImpl.java:1298)
at org.apache.activemq.artemis@2.6.3.redhat-00014//org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl.access$1700(JMSBridgeImpl.java:74)
at org.apache.activemq.artemis@2.6.3.redhat-00014//org.apache.activemq.artemis.jms.bridge.impl.JMSBridgeImpl$BatchTimeChecker.run(JMSBridgeImpl.java:1825)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
是否缺少任何配置,或者是否有任何资源适配器属性需要覆盖以停止提交消息
1条答案
按热度按时间ovfsdjhp1#
在非事务处理会话上调用“commit”方法是无效的。
错误消息非常清楚,不要在未处理的会话(即工作单元)上使用提交。