Hi,

Aaron Mulder wrote:
>         Also, I'm seeing server hangs every now and then.  If I kill the
> server, the client suddently continues with a SocketException.  I haven't
> tried to track this down yet.  But I wonder if anyone else has seen this?

I had the same problem after a transaction was rolled back.
The database connections of the transaction was never rolled back.
The org.jboss.minerva.xa.XAResourceImpl.rollback() method was
never called, and the patch below fixed it for me.
(This patch is not completely correct, as the afterSynchronization()
methods are not called after rollback.)

Hope this helps.


Best Regards,

Ole Husgaard.

-----------------------------------------------------------
diff -ur jboss-cvs20000831/src/main/org/jboss/tm/TxCapsule.java
jboss/src/main/org/jboss/tm/TxCapsule.java
--- jboss-cvs20000831/src/main/org/jboss/tm/TxCapsule.java      Fri Aug 18 05:21:12 
2000
+++ jboss/src/main/org/jboss/tm/TxCapsule.java  Thu Aug 31 17:30:13 2000
@@ -164,22 +164,7 @@
       if (status == Status.STATUS_MARKED_ROLLBACK)
       {
          // Rollback XAResources
-         status = Status.STATUS_ROLLING_BACK;
-         for (int i = 0; i < resources.size(); i++)
-         {
-
-            try
-            {
-               ((XAResource)resources.elementAt(i)).rollback(xid);
-            } catch (XAException e)
-            {
-               try {
-                  ((XAResource)resources.elementAt(i)).forget(xid);
-               } catch(XAException another) {}
-               // TODO: what to do here?
-            }
-         }
-         status = Status.STATUS_ROLLEDBACK;
+         rollbackResources();
       }
 
       // Call Synchronization
@@ -240,8 +225,8 @@
    {
       if (status == Status.STATUS_NO_TRANSACTION)
          throw new IllegalStateException("No transaction started");
-                
-                //MF FIXME I don't get it what is the use of this call if the 
"rollback is done in
the commit
+
+      rollbackResources();
    }
 
    public void setRollbackOnly()
@@ -283,6 +268,25 @@
     }
 
    // Private -------------------------------------------------------
+   private void rollbackResources()
+   {
+      status = Status.STATUS_ROLLING_BACK;
+      for (int i = 0; i < resources.size(); i++)
+      {
+         try
+         {
+            ((XAResource)resources.elementAt(i)).rollback(xid);
+         } catch (XAException e)
+         {
+            try {
+               ((XAResource)resources.elementAt(i)).forget(xid);
+            } catch(XAException another) {}
+            // TODO: what to do here?
+         }
+      }
+      status = Status.STATUS_ROLLEDBACK;
+   }
+
 /*   private Object writeReplace(java.io.ObjectOutputStream out)
       throws IOException
    {

Reply via email to