geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r190366 - /geronimo/trunk/modules/client/src/java/org/apache/geronimo/client/AppClientContainer.java
Date Mon, 13 Jun 2005 07:41:52 GMT
Author: djencks
Date: Mon Jun 13 00:41:52 2005
New Revision: 190366

URL: http://svn.apache.org/viewcvs?rev=190366&view=rev
Log:
fix npe if login fails.  This code needs to be cleaned up

Modified:
    geronimo/trunk/modules/client/src/java/org/apache/geronimo/client/AppClientContainer.java

Modified: geronimo/trunk/modules/client/src/java/org/apache/geronimo/client/AppClientContainer.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/client/src/java/org/apache/geronimo/client/AppClientContainer.java?rev=190366&r1=190365&r2=190366&view=diff
==============================================================================
--- geronimo/trunk/modules/client/src/java/org/apache/geronimo/client/AppClientContainer.java
(original)
+++ geronimo/trunk/modules/client/src/java/org/apache/geronimo/client/AppClientContainer.java
Mon Jun 13 00:41:52 2005
@@ -106,6 +106,7 @@
     }
 
     public void main(final String[] args) throws Exception {
+        //TODO reorganize this so it makes more sense.  maybe use an interceptor stack.
         Thread thread = Thread.currentThread();
 
         ClassLoader oldClassLoader = thread.getContextClassLoader();
@@ -164,7 +165,9 @@
 
             thread.setContextClassLoader(oldClassLoader);
             transactionContextManager.setContext(oldTransactionContext);
-            currentTransactionContext.commit();
+            if (currentTransactionContext != null) {
+                currentTransactionContext.commit();
+            }
             ContextManager.setCurrentCaller(oldCurrentCaller);
         }
     }



Mime
View raw message