servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r411732 - /incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/BaseLifeCycle.java
Date Mon, 05 Jun 2006 10:31:46 GMT
Author: gnodet
Date: Mon Jun  5 03:31:46 2006
New Revision: 411732

URL: http://svn.apache.org/viewvc?rev=411732&view=rev
Log:
Avoid possible NPE if transaction manager is not configured on the container

Modified:
    incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/BaseLifeCycle.java

Modified: incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/BaseLifeCycle.java
URL: http://svn.apache.org/viewvc/incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/BaseLifeCycle.java?rev=411732&r1=411731&r2=411732&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/BaseLifeCycle.java
(original)
+++ incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/BaseLifeCycle.java
Mon Jun  5 03:31:46 2006
@@ -45,7 +45,9 @@
             try {
                 // If we are transacted and this is a runtime exception
                 // try to mark transaction as rollback
-                if (transactionManager.getStatus() != Status.STATUS_ACTIVE && e instanceof
RuntimeException) {
+                if (transactionManager != null && 
+                    transactionManager.getStatus() != Status.STATUS_ACTIVE && 
+                    e instanceof RuntimeException) {
                     transactionManager.setRollbackOnly();
                 } else  {
                     exchange.setError(e);



Mime
View raw message