I just stumbled over the following piece of code in
org.jboss.pool.connector.BaseConnectionManager$XAListener:

 public void connectionClosed(ConnectionEvent evt) {
        ...

            // XAResource is delisted
            if(trans != null) {
                // Delist if closing before transaction was ended
                try {
                    trans.delistResource(xar, XAResource.TMSUCCESS);
                } catch(SystemException e) {
                    e.printStackTrace();
                }
            }

          ...
 }


which basically means that a pooled resource is marked RS_ENDED in the
TxCapsule after being asked to end(Xid,TMSUCCESS).

Now imagine that the resource is returned to the pool and dispensed for
another time within the same persistent transaction. This means that
the TxCapsule, when asked to enlistResource(), will not call
start(Xid,TMRESUME) in order to resume the tx association.

Wouldn´t it be correct to do a 

            try {
                    trans.delistResource(xar, XAResource.TMSUSPEND);
                } catch(SystemException e) {
                    e.printStackTrace();
                }

instead, which would cause the state of the resource to become RS_SUSPENDED
in the TxCapsule before returning to the pool and forcing
the IMHO right behaviour ...

Anyone? Toby? Marc? XA-Experts?

Best,

Dr. Christoph G. Jung

Software Engineer
infor: business solutions AG
http://www.infor.de/
mailto:[EMAIL PROTECTED]



_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to