Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 59475 invoked from network); 7 Feb 2007 14:09:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Feb 2007 14:09:33 -0000 Received: (qmail 24286 invoked by uid 500); 7 Feb 2007 14:09:34 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 24220 invoked by uid 500); 7 Feb 2007 14:09:34 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Received: (qmail 24199 invoked by uid 99); 7 Feb 2007 14:09:34 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Feb 2007 06:09:34 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Feb 2007 06:09:26 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D0DD67142D1 for ; Wed, 7 Feb 2007 06:09:05 -0800 (PST) Message-ID: <14823334.1170857345853.JavaMail.jira@brutus> Date: Wed, 7 Feb 2007 06:09:05 -0800 (PST) From: "Andrus Adamchik (JIRA)" To: dev@geronimo.apache.org Subject: [jira] Created: (GERONIMO-2809) TransactionManagerImpl.getTransactionStatus() shouldn't throw on no tx (with patch) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org TransactionManagerImpl.getTransactionStatus() shouldn't throw on no tx (with patch) ----------------------------------------------------------------------------------- Key: GERONIMO-2809 URL: https://issues.apache.org/jira/browse/GERONIMO-2809 Project: Geronimo Issue Type: Bug Security Level: public (Regular issues) Components: transaction manager Affects Versions: 2.0 Reporter: Andrus Adamchik Fix For: 2.0 Attachments: patch.txt org.apache.geronimo.transaction.manager.TransactionManagerImpl, implementation of "TransactionSynchronizationRegistry.getTransactionStatus()" method throws an IllegalStateException when called outside of active transaction. I believe this behavior is wrong. According to JTA javadocs: "int getTransactionStatus() Return the status of the transaction bound to the current thread at the time this method is called. This is the result of executing TransactionManager.getStatus() in the context of the transaction bound to the current thread at the time this method is called. Returns: the status of the transaction bound to the current thread at the time this method is called." So no exception is specified in the spec. Also current behavior caused grief when implementing a JPA provider. Most methods on the EntityManager have this note: "throws TransactionRequiredException if invoked on a container-managed entity manager of type PersistenceContextType.TRANSACTION and there is no transaction.", but currently the provider can't even check the tx status consistently, since this unexpected exception is thrown. See attached patch for the trivial fix. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.