You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by db...@apache.org on 2008/04/04 23:05:35 UTC
svn commit: r644927 -
/openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/TransactionPolicy.java
Author: dblevins
Date: Fri Apr 4 14:05:33 2008
New Revision: 644927
URL: http://svn.apache.org/viewvc?rev=644927&view=rev
Log:
Merging r644655 - http://svn.apache.org/viewvc?rev=644655&view=rev
svn merge -r 644654:644655 https://svn.apache.org/repos/asf/openejb/trunk/openejb3 .
------------------------------------------------------------------------
r644655 | dblevins | 2008-04-04 02:39:48 -0700 (Fri, 04 Apr 2008) | 1 line
Can't use initCause on a javax.transaction.TransactionRolledbackException.
------------------------------------------------------------------------
Modified:
openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/TransactionPolicy.java
Modified: openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/TransactionPolicy.java
URL: http://svn.apache.org/viewvc/openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/TransactionPolicy.java?rev=644927&r1=644926&r2=644927&view=diff
==============================================================================
--- openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/TransactionPolicy.java (original)
+++ openejb/branches/openejb-3.0/container/openejb-core/src/main/java/org/apache/openejb/core/transaction/TransactionPolicy.java Fri Apr 4 14:05:33 2008
@@ -142,7 +142,8 @@
} catch (RollbackException e) {
txLogger.info("The transaction has been rolled back rather than commited: " + e.getMessage());
- Throwable txe = new javax.transaction.TransactionRolledbackException("Transaction was rolled back, presumably because setRollbackOnly was called during a synchronization").initCause(e);
+ // TODO can't set initCause on a TransactionRolledbackException, update the convertException and related code to handle something else
+ Throwable txe = new javax.transaction.TransactionRolledbackException("Transaction was rolled back, presumably because setRollbackOnly was called during a synchronization: "+e.getMessage());
throw new ApplicationException(txe);
} catch (HeuristicMixedException e) {
@@ -154,7 +155,7 @@
txLogger.info("A heuristic decision was made while commiting the transaction, some relevant updates have been rolled back: " + e.getMessage());
throw new ApplicationException(new RemoteException("A heuristic decision was made while commiting the transaction, some relevant updates have been rolled back").initCause(e));
-
+
} catch (SecurityException e) {
txLogger.error("The current thread is not allowed to commit the transaction: " + e.getMessage());