Hi,
This change makes sense to me.
However, be aware that it would perform slightly slower,
as the TM at commit time would have to enlist the
resource with the TX before delisting it with TMSUCCESS.
See my comment in TxCapsule.java, around line 1170.
Basically, I think that JTA contradicts itself, as it
says that (on page 41) that a suspended resource _must_
be resumed with TMRESUME, but the state tables on page
17-18 say that it is legal to do end(TMSUCCESS) on a
suspended resource.
The reason that I implemented TxCapsule as JTA says on
page 41 is that Minerva didn't like two end() calls in
a row.
Best Regards,
Ole Husgaard.
"Jung , Dr. Christoph" wrote:
>
> 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
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development