Hi,

I think that the point Toby is making is that if
you do _not_ make this delistResource code change,
re-enlistment of the same resource with the same
Xid is still possible, but will result in TxCapsule
doing start(TMJOIN) instead of start(TMRESUME).

Problem here is that I am not sure if the JTA spec
wants this to be allowed: If it is allowed, there
is no need for the TMSUSPEND and TMRESUME flags, as
you could just use end(TMSUCCESS) instead of
end(TMSUSPEND), and start(TMJOIN) instead of
start(TMRESUME).
Tecnically JTA does not forbid it, but why did they
introduce TMSUSPEND, TMRESUME and the suspended
resource state then?

To be tolerant, I made TxCapsule allow it.
But in case some resource does not allow it,
it is better to use delist(TMSUSPEND) and enlist()
than delist(TMSUCCESS) and having enlist() fail due
to resource failure.


Best Regards,

Ole Husgaard.


"Jung , Dr. Christoph" wrote:
> 
> Hi Toby,
> 
> -----Urspr�ngliche Nachricht-----
> >Von: Toby Allsopp [mailto:[EMAIL PROTECTED]]
> >Gesendet: Mittwoch, 1. August 2001 23:03
> >An: [EMAIL PROTECTED]
> >Betreff: Re: [JBoss-dev] jbosspool: implementation of connectionClosed()
> >in org.jboss.pool .connector.BaseConnectionManager$XAListener
> 
> >This XA stuff makes my head hurt, but I'll give it a go.
> 
> as does it with mine. Coffee, coffee!
> 
> >I don't follow this.  TxCapsule.enlistResource calls
> >TxCapsule.startResource,
> 
> nay, that�s the problem (from enlistResource):
> 
>             if (idx != -1) {
>                if (resourceState[idx] == RS_ENLISTED)
>                   return false; // already enlisted
> 
>                startResource(idx);
>                return true;
>             }
> 
> the state of the resource after end(TMSUCCESS) is RS_ENDED and not
> RS_ENLISTED.
> 
> >From what Ole was stating, my impression is that rather TMSUSPEND should be
> called
> on the resource before returning to the pool and that (for spec compliance
> and optimisation
> purposes), we should adopt the possibility to call immediately call
> end(TMSUCCESS)
> on a suspended Minerva resource.
> 
> CGJ
> 
> _______________________________________________
> 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

Reply via email to