我正试图在JBOSS EAP JMS队列(AMQ(和;IBM MQ作为目标。下面是我的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)
我是否缺少任何配置,或者是否有资源适配器的任何属性我应该覆盖以停止提交消息
在非transacted上调用"commit"方法是无效的一场
错误消息非常清楚,不要在未处理的会话(即工作单元(上使用提交。