commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oliver Zeigermann <oliver.zeigerm...@gmail.com>
Subject Re: [transaction] AbstractXAResource throws exception on TMJOIN
Date Fri, 18 Nov 2005 08:51:01 GMT
2005/11/18, Joerg Heinicke <joerg.heinicke@gmx.de>:
> 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.

Does not matter too much who did the initial impementation...
> > 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

No. I do not think so.

> 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.

Hmmm. At least I understand what you are saying now. If there were
more than one instance per thread a thread local still would not work,
as the data has to be shared by all participants of the transactions,
i.e. threads.

But even more, may understanding is that the user will never see an
XAResource and will never try to get an instance of it. It simply is
an interface between the transaction manager of your container and
your resource manager.

Oliver

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message