You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by KÖLL Claus <C....@TIROL.GV.AT> on 2012/06/25 08:12:15 UTC

XA help needed ...

Hi ...

I found a "problem" within a xa environment and i don't know how to solve it or 
if it is possible to solve.

We have two J2EE Applications runnig on different AppServers and both have a Jackrabbit 
Cluster Member instance running via JCA (as XAResource).
The Jackrabbit Cluster is configured to use a DB Journal.

So the problem is now if App1 adds a Node, then calls App2 and this also add a Node inside a global Transaction.

While preparing the global Transaction, JCR on App1 creates a global Lock on DB (Global Revision Table). App2 tries also to prepare the transaction
but it can't add a DB Lock because App1 holds it now. App1 would free the Lock on commit ... so we have a global Deadlock.

Is it possible to create the Lock on the Global Revison Table only in one phase (commit phase) and not spanned over prepare and commit ?

thanks for any help
claus

Re: XA help needed ...

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Mon, Jun 25, 2012 at 8:12 AM, KÖLL Claus <C....@tirol.gv.at> wrote:
> Is it possible to create the Lock on the Global Revison Table only in one phase
> (commit phase) and not spanned over prepare and commit ?

Ideally that should be possible (true two-phase commit), but I don't
think the current Jackrabbit architecture can bend to do that. The
main problem is that the prepare phase needs to be able to ensure that
no concurrent change can invalidate the prepared changes before they
get committed. We currently have no way of doing that without the lock
that spans both prepare and commit.

BR,

Jukka Zitting