Subject Re: problem with XAResource.TMJOIN
Author Ludovic Orban
--- In Firebird-Java@yahoogroups.com, David Jencks <david_jencks@y...>
wrote:
> Umm, the wrapper had better implement isSameRM by asking the wrapped
> resource. Otherwise you should expect really weird results. So, IMO
> this argument is bogus.

Agreed. My knowledge is a bit limited on this subject and I did not
think about that.


> There is something wrong here, but it's not entirely clear to me where
> the fault lies. If you are connecting to 2 databases, you should have
> 2 managed connection factories, and their properties should be
> different, so mcf1.equals(mcf2) == false. I suspect you are creating
> one MCF, getting a connection, changing the properties on the mcf, and
> creating another connection. I think that's an error. However, since
> you at least appear to have done this, it might be a good idea for
> jaybird to extract the location of the db from the MCF and store it
> with the MC for this purpose, as you suggest below.

My mistake. In fact, I was trying to join a XAResouce with itself
because of a bogus test in my code.

My bug is fixed but I still get the same FBXAException.

Looking again at the Jaybird code, I cannot figure out how resources
could be joined since there is one xidMap per MC, the only way to fill
it with xids is by calling findIscTrHandle() with TMNOFLAGS but in
case of resources join findIscTrHandle() should only be called with
TMJOIN.
This seems to explain my "You are trying to resume a transaction that
has is new" error message.

Am I right or should I look for bugs somewhere else in my code ?

Thanks,
Ludovic