Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 02A5417C75 for ; Thu, 28 May 2015 12:49:19 +0000 (UTC) Received: (qmail 26208 invoked by uid 500); 28 May 2015 12:49:18 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 26177 invoked by uid 500); 28 May 2015 12:49:18 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 26166 invoked by uid 99); 28 May 2015 12:49:18 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 May 2015 12:49:18 +0000 Date: Thu, 28 May 2015 12:49:18 +0000 (UTC) From: "Andrei Shakirin (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Issue Comment Deleted] (CXF-6425) Check for external transactions in PollingMessageListenerContainer MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-6425?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andrei Shakirin updated CXF-6425: --------------------------------- Comment: was deleted (was: After discussion with Christian, I admit that external transactions in PollingMessageListenerContainer doesn't make a lot of sense. If transaction is automatically attached to the thread (for example by container), it can be committed only after stop() method. This means that single transaction will include receiving more than one JMS message or PollingMessageListenerContainer should be stopped every time when message is received. Currently I have no valid use case for that. The code will be update in a way to throw exception if external transaction is detected and ensure to commit or rollback transaction in every case (do not leave active transactions in thread).) > Check for external transactions in PollingMessageListenerContainer > ------------------------------------------------------------------ > > Key: CXF-6425 > URL: https://issues.apache.org/jira/browse/CXF-6425 > Project: CXF > Issue Type: Improvement > Components: JMS > Affects Versions: 3.0.1, 3.1.0 > Reporter: Andrei Shakirin > Assignee: Andrei Shakirin > > Currently PollingMessageListenerContainer doesn't check if transaction was already created by container and tries to created nested one. > That causes the following error: > {code} > 10:31:13,826 | WARN | pool-52-thread-1 | essageListenerContainer$XAPoller 128 | 158 - org.apache.cxf.cxf-rt-transports-jms - 3.1.1.SNAPSHOT | Unexpected exception. Res > tarting session and consumer javax.transaction.NotSupportedException: Nested Transactions are not supported > at org.apache.geronimo.transaction.manager.TransactionManagerImpl.begin(TransactionManagerImpl.java:157) 111:org.apache.aries.transaction.manager:1.1.1] > at org.apache.geronimo.transaction.manager.TransactionManagerImpl.begin(TransactionManagerImpl.java:152)[111:org.apache.aries.transaction.manager:1.1.1] > at org.apache.cxf.transport.jms.util.PollingMessageListenerContainer$XAPoller.run(PollingMessageListenerContainer.java:107)[158:org.apache.cxf.cxf-rt-transports-jms:3.1.1.SNAPSHOT] > at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)[:1.7.0_21] > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)[:1.7.0_21] > at java.lang.Thread.run(Thread.java:722)[:1.7.0_21] > {code} > Proposal: check if the transaction already exists and if yes: > a) not start it explicitly through TransactionManager > b) in case of exception call setRollbackOnly() -- This message was sent by Atlassian JIRA (v6.3.4#6332)