geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r551968 - /geronimo/server/trunk/modules/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionImpl.java
Date Fri, 29 Jun 2007 17:29:21 GMT
Author: dwoods
Date: Fri Jun 29 10:29:18 2007
New Revision: 551968

URL: http://svn.apache.org/viewvc?view=rev&rev=551968
Log:
GERONIMO-3259 Correctly log the stack trace in TransactionImpl.java

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

Modified: geronimo/server/trunk/modules/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionImpl.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/modules/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionImpl.java?view=diff&rev=551968&r1=551967&r2=551968
==============================================================================
--- geronimo/server/trunk/modules/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionImpl.java
(original)
+++ geronimo/server/trunk/modules/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/TransactionImpl.java
Fri Jun 29 10:29:18 2007
@@ -17,6 +17,9 @@
 
 package org.apache.geronimo.transaction.manager;
 
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.io.Writer;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.IdentityHashMap;
@@ -709,7 +712,10 @@
                 // if it isn't a named resource should we really stop all processing here!
                 // Maybe this would be better to handle else where and do we really want
to prevent all processing of transactions?
                 Throwable throwable = new IllegalStateException("Cannot log transactions
as " + committer + " is not a NamedXAResource.");
-                log.error(throwable.printStackTrace());
+                Writer w = new StringWriter();
+                PrintWriter pw = new PrintWriter(w);
+                throwable.printStackTrace(pw);
+                log.error(w.toString());
                 return committer.toString();
             }
         }



Mime
View raw message