geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject svn commit: r981270 - in /geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1: ./ geronimo-connector/ geronimo-transaction/ geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/
Date Sun, 01 Aug 2010 16:50:29 GMT
Author: djencks
Date: Sun Aug  1 16:50:29 2010
New Revision: 981270

URL: http://svn.apache.org/viewvc?rev=981270&view=rev
Log:
add some tracing the NamedXAResource

Modified:
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/geronimo-connector/pom.xml
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/geronimo-transaction/pom.xml
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/WrapperNamedXAResource.java
    geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/pom.xml

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/geronimo-connector/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/geronimo-connector/pom.xml?rev=981270&r1=981269&r2=981270&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/geronimo-connector/pom.xml
(original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/geronimo-connector/pom.xml
Sun Aug  1 16:50:29 2010
@@ -25,7 +25,7 @@
     <parent>
         <groupId>org.apache.geronimo.components</groupId>
         <artifactId>geronimo-txmanager-parent</artifactId>
-        <version>2.1.1</version>
+        <version>2.1.1.1-SNAPSHOT</version>
     </parent>
 
     <artifactId>geronimo-connector</artifactId>

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/geronimo-transaction/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/geronimo-transaction/pom.xml?rev=981270&r1=981269&r2=981270&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/geronimo-transaction/pom.xml
(original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/geronimo-transaction/pom.xml
Sun Aug  1 16:50:29 2010
@@ -25,7 +25,7 @@
     <parent>
         <groupId>org.apache.geronimo.components</groupId>
         <artifactId>geronimo-txmanager-parent</artifactId>
-        <version>2.1.1</version>
+        <version>2.1.1.1-SNAPSHOT</version>
     </parent>
 
     <artifactId>geronimo-transaction</artifactId>

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/WrapperNamedXAResource.java
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/WrapperNamedXAResource.java?rev=981270&r1=981269&r2=981270&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/WrapperNamedXAResource.java
(original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/geronimo-transaction/src/main/java/org/apache/geronimo/transaction/manager/WrapperNamedXAResource.java
Sun Aug  1 16:50:29 2010
@@ -46,17 +46,23 @@ public class WrapperNamedXAResource impl
     }
 
     public void commit(Xid xid, boolean onePhase) throws XAException {
+        if (log.isTraceEnabled()) {
+            log.trace("Commit called on XAResource " + getName() + "\n Xid: " + xid + "\n
onePhase:" + onePhase);
+        }
         xaResource.commit(xid, onePhase);
     }
 
     public void end(Xid xid, int flags) throws XAException {
-        if (flags == XAResource.TMSUSPEND && log.isTraceEnabled()) {
-            log.trace("Suspend called on XAResource: " + getName(), new Exception("Stack
trace"));
+        if (log.isTraceEnabled()) {
+            log.trace("End called on XAResource " + getName() + "\n Xid: " + xid + "\n flags:"
+ decodeFlags(flags));
         }
         xaResource.end(xid, flags);
     }
 
     public void forget(Xid xid) throws XAException {
+        if (log.isTraceEnabled()) {
+            log.trace("Forget called on XAResource " + getName() + "\n Xid: " + xid);
+        }
         xaResource.forget(xid);
     }
 
@@ -72,14 +78,23 @@ public class WrapperNamedXAResource impl
     }
 
     public int prepare(Xid xid) throws XAException {
+        if (log.isTraceEnabled()) {
+            log.trace("Prepare called on XAResource " + getName() + "\n Xid: " + xid);
+        }
         return xaResource.prepare(xid);
     }
 
     public Xid[] recover(int flag) throws XAException {
+        if (log.isTraceEnabled()) {
+            log.trace("Recover called on XAResource " + getName() + "\n flags: " + decodeFlags(flag));
+        }
         return xaResource.recover(flag);
     }
 
     public void rollback(Xid xid) throws XAException {
+        if (log.isTraceEnabled()) {
+            log.trace("Rollback called on XAResource " + getName() + "\n Xid: " + xid);
+        }
         xaResource.rollback(xid);
     }
 
@@ -88,8 +103,36 @@ public class WrapperNamedXAResource impl
     }
 
     public void start(Xid xid, int flags) throws XAException {
+        if (log.isTraceEnabled()) {
+            log.trace("Start called on XAResource " + getName() + "\n Xid: " + xid + "\n
flags:" + decodeFlags(flags));
+        }
         xaResource.start(xid, flags);
     }
+    private String decodeFlags(int flags) {
+        if (flags == 0) {
+            return " TMNOFLAGS";
+        }
+        StringBuilder b = new StringBuilder();
+        decodeFlag(flags, b, TMENDRSCAN, " TMENDRSCAN");
+        decodeFlag(flags, b, TMFAIL, " TMFAIL");
+        decodeFlag(flags, b, TMJOIN, " TMJOIN");
+        decodeFlag(flags, b, TMONEPHASE, " TMONEPHASE");
+        decodeFlag(flags, b, TMRESUME, " TMRESUME");
+        decodeFlag(flags, b, TMSTARTRSCAN, " TMSTARTRSCAN");
+        decodeFlag(flags, b, TMSUCCESS, " TMSUCCESS");
+        decodeFlag(flags, b, TMSUSPEND, " TMSUSPEND");
+        if (flags != 0) {
+            b.append(" remaining: ").append(flags);
+        }
+        return b.toString();
+    }
+
+    private void decodeFlag(int flags, StringBuilder b, int flag, String flagName) {
+        if ((flags & flag) == flag) {
+            b.append(flagName);
+            flags = flags ^ flag;
+        }
+    }
 }
 
 

Modified: geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/pom.xml?rev=981270&r1=981269&r2=981270&view=diff
==============================================================================
--- geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/pom.xml (original)
+++ geronimo/components/txmanager/branches/geronimo-txmanager-parent-2.1.1/pom.xml Sun Aug
 1 16:50:29 2010
@@ -30,7 +30,7 @@
 
     <groupId>org.apache.geronimo.components</groupId>
     <artifactId>geronimo-txmanager-parent</artifactId>
-    <version>2.1.1</version>
+    <version>2.1.1.1-SNAPSHOT</version>
     <packaging>pom</packaging>
     <name>Geronimo TxManager</name>
     
@@ -49,7 +49,7 @@
               element, and it will need to be changed manually before a release,
               as the maven-release-plugin will not update this value.
         -->
-        <version>2.1.1</version>
+        <version>2.1.1.1-SNAPSHOT</version>
     </properties>
     
     <dependencyManagement>



Mime
View raw message