activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r408636 - /incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ServerSessionImpl.java
Date Mon, 22 May 2006 10:39:32 GMT
Author: jstrachan
Date: Mon May 22 03:39:32 2006
New Revision: 408636

URL: http://svn.apache.org/viewvc?rev=408636&view=rev
Log:
fix for AMQ-689 to deal with NPE

Modified:
    incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ServerSessionImpl.java

Modified: incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ServerSessionImpl.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ServerSessionImpl.java?rev=408636&r1=408635&r2=408636&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ServerSessionImpl.java
(original)
+++ incubator/activemq/trunk/activemq-ra/src/main/java/org/apache/activemq/ra/ServerSessionImpl.java
Mon May 22 03:39:32 2006
@@ -32,6 +32,7 @@
 import javax.resource.spi.work.WorkManager;
 
 import org.apache.activemq.ActiveMQSession;
+import org.apache.activemq.TransactionContext;
 import org.apache.activemq.ActiveMQSession.DeliveryListener;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
@@ -215,7 +216,8 @@
             } catch (Throwable e) {
                 throw new RuntimeException("Endpoint after delivery notification failure",
e);
             } finally {
-                if( session.getTransactionContext().isInLocalTransaction() ) {
+                TransactionContext transactionContext = session.getTransactionContext();
+                if( transactionContext != null && transactionContext.isInLocalTransaction()
) {
                     if( !useRAManagedTx ) {
                         // Sanitiy Check: If the local transaction has not been commited..
                         // Commit it now.



Mime
View raw message