cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r504546 - /cayenne/main/trunk/itests/itest-common/src/main/java/org/apache/cayenne/itest/OpenEJBContainer.java
Date Wed, 07 Feb 2007 13:58:26 GMT
Author: aadamchik
Date: Wed Feb  7 05:58:25 2007
New Revision: 504546

URL: http://svn.apache.org/viewvc?view=rev&rev=504546
Log:
CAY-744: JTA EntityManager
(itests)

Modified:
    cayenne/main/trunk/itests/itest-common/src/main/java/org/apache/cayenne/itest/OpenEJBContainer.java

Modified: cayenne/main/trunk/itests/itest-common/src/main/java/org/apache/cayenne/itest/OpenEJBContainer.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/itests/itest-common/src/main/java/org/apache/cayenne/itest/OpenEJBContainer.java?view=diff&rev=504546&r1=504545&r2=504546
==============================================================================
--- cayenne/main/trunk/itests/itest-common/src/main/java/org/apache/cayenne/itest/OpenEJBContainer.java
(original)
+++ cayenne/main/trunk/itests/itest-common/src/main/java/org/apache/cayenne/itest/OpenEJBContainer.java
Wed Feb  7 05:58:25 2007
@@ -22,6 +22,7 @@
 
 import javax.naming.Context;
 import javax.naming.InitialContext;
+import javax.transaction.Status;
 import javax.transaction.TransactionManager;
 import javax.transaction.TransactionSynchronizationRegistry;
 
@@ -69,6 +70,11 @@
 
     public TransactionManager getTxManager() {
         return txManager;
+    }
+
+    public boolean isActiveTransaction() {
+        int status = txManager.getTransactionStatus();
+        return status == Status.STATUS_ACTIVE || status == Status.STATUS_MARKED_ROLLBACK;
     }
 
     private void setupOpenEJBHome() {



Mime
View raw message