Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4AA3A200BD6 for ; Sun, 4 Dec 2016 11:26:03 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 41240160B18; Sun, 4 Dec 2016 10:26:03 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 86AEA160AE4 for ; Sun, 4 Dec 2016 11:26:02 +0100 (CET) Received: (qmail 45833 invoked by uid 500); 4 Dec 2016 10:26:00 -0000 Mailing-List: contact users-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@camel.apache.org Delivered-To: mailing list users@camel.apache.org Delivered-To: moderator for users@camel.apache.org Received: (qmail 7550 invoked by uid 99); 3 Dec 2016 15:20:21 -0000 X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.487 X-Spam-Level: *** X-Spam-Status: No, score=3.487 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_SOFTFAIL=0.972, URIBL_BLOCKED=0.001, URI_HEX=1.313] autolearn=disabled Date: Sat, 3 Dec 2016 08:20:17 -0700 (MST) From: dpravin To: users@camel.apache.org Message-ID: <1480778417808-5790967.post@n5.nabble.com> Subject: Camel JMS XA Client MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit archived-at: Sun, 04 Dec 2016 10:26:03 -0000 Hi All, Requirement - Transacted route, we have to consume messages from MQ queue. Multiple resources involved, hence use XA transactions. Environment - Jboss Fuse 6.2.1, JDK 8, MQ 7.5.0.3 I use following to create the JMSComponent in blueprint and everything works fine as expected. With respect to above configuration I created a custom bean that extends from JMSComponent and tried to create JMS XA connection factory 1) defined a custom bean com.ai.jms.WmqJmsComponent that extends from JMSComponent 2) Inside this bean I am instantiating and wiring all above components The XA connection works fine when I send the message to MQ, however when I am using the same connection to consume message from MQ it produces following warnings/errors in log file, PooledSession | 189 - org.apache.activemq.activemq-osgi - 5.11.0.redhat-621107 | Caught exception trying close() when putting session back into the pool, will invalidate. com.ibm.msg.client.jms.DetailedIllegalStateException: JMSCC0020: This session is closed. n | An application called a method that must not be used after the session is closed. n | Ensure that the session is not closed before calling the method. com.ibm.msg.client.jms.DetailedIllegalStateException: JMSCC0020: This session is closed. An application called a method that must not be used after the session is closed. Ensure that the session is not closed before calling the method. at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)[:1.8.0_25] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)[:1.8.0_25] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)[:1.8.0_25] at java.lang.reflect.Constructor.newInstance(Constructor.java:408)[:1.8.0_25] at com.ibm.msg.client.commonservices.j2se.NLSServices.createException(NLSServices.java:319)[357:com.ibm.msg.client.osgi.commonservices.j2se:7.5.0.3] at com.ibm.msg.client.commonservices.nls.NLSServices.createException(NLSServices.java:233)[358:com.ibm.msg.client.osgi.jms:7.5.0.3] at com.ibm.msg.client.jms.internal.JmsErrorUtils.createException(JmsErrorUtils.java:109)[358:com.ibm.msg.client.osgi.jms:7.5.0.3] at com.ibm.msg.client.jms.internal.State.checkNotClosed(State.java:150)[358:com.ibm.msg.client.osgi.jms:7.5.0.3] at com.ibm.msg.client.jms.internal.JmsSessionImpl.checkNotClosed(JmsSessionImpl.java:2526)[358:com.ibm.msg.client.osgi.jms:7.5.0.3] at com.ibm.msg.client.jms.internal.JmsSessionImpl.setMessageListener(JmsSessionImpl.java:1730)[358:com.ibm.msg.client.osgi.jms:7.5.0.3] at com.ibm.mq.jms.MQSession.setMessageListener(MQSession.java:1004)[360:com.ibm.msg.client.osgi.wmq:7.5.0.3] at org.apache.activemq.jms.pool.PooledSession.close(PooledSession.java:103)[189:org.apache.activemq.activemq-osgi:5.11.0.redhat-621107] at org.springframework.jms.support.JmsUtils.closeSession(JmsUtils.java:108)[215:org.apache.servicemix.bundles.spring-jms:3.2.12.RELEASE_2] at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.clearResources(DefaultMessageListenerContainer.java:1142)[215:org.apache.servicemix.bundles.spring-jms:3.2.12.RELEASE_2] at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1001)[215:org.apache.servicemix.bundles.spring-jms:3.2.12.RELEASE_2] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_25] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_25] at java.lang.Thread.run(Thread.java:745)[:1.8.0_25] Appreciate any help to resolve this issue. Thanks, Pravin -- View this message in context: http://camel.465427.n5.nabble.com/Camel-JMS-XA-Client-tp5790967.html Sent from the Camel - Users mailing list archive at Nabble.com.