activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r509486 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/TransactionTemplate.java
Date Tue, 20 Feb 2007 09:58:35 GMT
Author: rajdavies
Date: Tue Feb 20 01:58:34 2007
New Revision: 509486

URL: http://svn.apache.org/viewvc?view=rev&rev=509486
Log:
Log the error that caused the rollback

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/TransactionTemplate.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/TransactionTemplate.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/TransactionTemplate.java?view=diff&rev=509486&r1=509485&r2=509486
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/TransactionTemplate.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/util/TransactionTemplate.java
Tue Feb 20 01:58:34 2007
@@ -18,9 +18,10 @@
 package org.apache.activemq.util;
 
 import java.io.IOException;
-
 import org.apache.activemq.broker.ConnectionContext;
 import org.apache.activemq.store.PersistenceAdapter;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * A helper class for running code with a PersistenceAdapter
@@ -29,6 +30,7 @@
  * @version $Revision: 1.2 $
  */
 public class TransactionTemplate {
+    static private final Log log=LogFactory.getLog(TransactionTemplate.class);
     private PersistenceAdapter persistenceAdapter;
     private ConnectionContext context;
 
@@ -59,6 +61,7 @@
                 persistenceAdapter.commitTransaction(context);
             }
             else {
+                log.error("Having to Rollback - caught an exception: " + throwable);
                 persistenceAdapter.rollbackTransaction(context);
             }            
         }



Mime
View raw message