jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <jukka.zitt...@gmail.com>
Subject Re: How to handle XA Transactions?
Date Wed, 27 May 2009 09:47:45 GMT
Hi,

On Wed, May 27, 2009 at 11:31 AM, Peter Henzler <phe@scodi.ch> wrote:
> Is it true, that the Jackrabbit transaction support can only work with
> UserTransactions and can't work with distributed transactions?

No.

> Is it true, that I can only get Jackrabbit working together with
> XA Transactions if I use the Jackrabbit JCA interface?

No.

The sessions you get from the Repository.login() method from
Jackrabbit implement the org.apache.jackrabbit.api.XASession
interface, whose getXAResource() method can be used to attach the
session to a distributed XA transaction.

The nice thing about the JCA packaging is that it handles the
XAResource part automatically for you, but there's nothing stopping
you from doing the same with a little bit of code also in other
deployment scenarios.

> If I am using the Jackrabbit Datastore and Persistence configured with an XA
> JDBC-Driver, do I really need Transactions in Jackrabbit. Wouldn't the XA
> JDBC-Driver work in a 2phase commit handled by the installed JTA
> TransactionManager ?

No. Jackrabbit expects to be in full control of the underlying
database connection, so having it included in an externally managed
transaction is not a good idea. We've seen quite a few problems caused
by this.

BR,

Jukka Zitting

Mime
View raw message