Oliver Zeigermann <oliver.zeigermann <at> gmail.com> writes:

> Hmmm. I do not understand you either.

:)

> I have certainly read the XA spec, but - of course - am not entirely sure that
> my implementation is free of errors.

I did not know that it was you implementing it. And about the errors: that's
what I want to find out. Interpreting the spec is not that easy IMO, it is
really database specific and talks about "connection's close" method: Huh? Is it
about JTA or JDBC? Where is a connection in JTA.

> Active and suspended contexts are of course shared by the XA resource,
> why should it be local to a thread then?

My problem is that the contexts are specific to an XAResource *instance*. But is
it not possible to have more than one instance accessing one resource manager
from one thread? This is what my example with the two components was about. If
you use JNDI (standard in EJB 2.x) for looking up your XAResource you get a new
instance of XAResource for each lookup, so one for both components. This is why
I think the contexts must be made known to the thread (hence ThreadLocal), not
only to the instance.

> Maybe the misunderstanding is the active transaction branch which is
> associated to a specific thread. That's why it is a thread local. This
> means if there is a tx associated to a thead it will be stored there.

No I think, that is clear. It is only difficult to control if you allow multiple
XAResource instances per thread - which is allowed from my understanding.

Hope it's getting clearer where my actual problem is.

Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to