简体   繁体   中英

JMSBridge having IBM MQ as destination : JBOSS EAP 7.2

I am trying to build a JMS Bridge between JBOSS EAP jms queue (AMQ) & IBM MQ as destination. Below is my JMS Bridge:

<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> 

I have mqSeriesJMSFactoryInboundQueue1 & inboundQueue1 created as connection factory and admin object in my resource adapter with No transaction support.

I am able to post a test message to AMQ. But getting below WARN on the console:

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)

Am I missing any configuration or is there any property of resource adapter I should override to stop committing the message

It is not valid to call the 'commit' method on a nontransacted session.

The error message is pretty clear, don't use a commit on a session that is not transacted (ie Unit of Work).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM