Subject Re: [Firebird-Java] Re: problem with XAResource.TMJOIN
Author Roman Rokytskyy
> Isn't this for optimization of 2PC speed ?

In our case that would be one transaction less. I'm not sure whether it is
so significant win.

Potentially there is another problem in an application that relies on
TMJOIN - locks. Updating the same record from multiple physical transactions
would cause a deadlock, while doing the same from the one physical
transaction would succeed.

So far I did not see such use cases, but I must admit I have not seen them a
lot.

> Mike Spille has given (I think) a good example of how it should work and
> should be used here:
>
> http://www.theserverside.com/discussions/thread.tss?thread_id=23341#107340

Yup, exatly this example is used in JTA specification. So, limiting isSameRM
to the FBManagedConnection should solve the issue.

Roman