geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r506176 - /geronimo/server/trunk/modules/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionManagerImpl.java
Date Sun, 11 Feb 2007 23:40:35 GMT
Author: djencks
Date: Sun Feb 11 15:40:35 2007
New Revision: 506176

URL: http://svn.apache.org/viewvc?view=rev&rev=506176
Log:
GERONIMO-2809 getTransactionStatus should return Status.STATUS_NO_TRANSACTION when there's
no tx, not throw an exception

Modified:
    geronimo/server/trunk/modules/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionManagerImpl.java

Modified: geronimo/server/trunk/modules/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionManagerImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionManagerImpl.java?view=diff&rev=506176&r1=506175&r2=506176
==============================================================================
--- geronimo/server/trunk/modules/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionManagerImpl.java
(original)
+++ geronimo/server/trunk/modules/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionManagerImpl.java
Sun Feb 11 15:40:35 2007
@@ -229,8 +229,8 @@
     }
 
     public int getTransactionStatus() {
-        TransactionImpl tx = getActiveTransactionImpl();
-        return tx.getTransactionStatus();
+        TransactionImpl tx = (TransactionImpl) getTransaction();
+        return tx == null? Status.STATUS_NO_TRANSACTION: tx.getTransactionStatus();
     }
 
     public void putResource(Object key, Object value) {



Mime
View raw message