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:07 UTC

svn commit: r644926 - /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:04:54 2008
New Revision: 644926

URL: http://svn.apache.org/viewvc?rev=644926&view=rev
Log:
Merging r644611 - http://svn.apache.org/viewvc?rev=644611&view=rev

svn merge -r 644610:644611 https://svn.apache.org/repos/asf/openejb/trunk/openejb3 .

------------------------------------------------------------------------
r644611 | dblevins | 2008-04-03 22:15:15 -0700 (Thu, 03 Apr 2008) | 2 lines

Throw the EJB 1.1 view of the exception, conversion code will switch it to the correct view (i.e. the conversion code only goes the one way)

------------------------------------------------------------------------

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=644926&r1=644925&r2=644926&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:04:54 2008
@@ -24,13 +24,7 @@
 import org.apache.openejb.util.LogCategory;
 import org.apache.openejb.util.Logger;
 
-import javax.transaction.Transaction;
-import javax.transaction.TransactionManager;
-import javax.transaction.InvalidTransactionException;
-import javax.transaction.HeuristicMixedException;
-import javax.transaction.HeuristicRollbackException;
-import javax.transaction.RollbackException;
-import javax.transaction.NotSupportedException;
+import javax.transaction.*;
 import javax.ejb.EJBException;
 import javax.ejb.EJBTransactionRolledbackException;
 
@@ -148,18 +142,18 @@
         } catch (RollbackException e) {
 
             txLogger.info("The transaction has been rolled back rather than commited: " + e.getMessage());
-            Exception txe = new EJBTransactionRolledbackException("Transaction was rolled back, presumably because setRollbackOnly was called during a synchronization", e);
+            Throwable txe = new javax.transaction.TransactionRolledbackException("Transaction was rolled back, presumably because setRollbackOnly was called during a synchronization").initCause(e);
             throw new ApplicationException(txe);
 
         } catch (HeuristicMixedException e) {
 
             txLogger.info("A heuristic decision was made, some relevant updates have been committed while others have been rolled back: " + e.getMessage());
-            throw new ApplicationException(new EJBException(e));
+            throw new ApplicationException(new RemoteException("A heuristic decision was made, some relevant updates have been committed while others have been rolled back").initCause(e));
 
         } catch (HeuristicRollbackException e) {
 
             txLogger.info("A heuristic decision was made while commiting the transaction, some relevant updates have been rolled back: " + e.getMessage());
-            throw new ApplicationException(new EJBException(e));
+            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) {