You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Jukka Zitting <ju...@gmail.com> on 2009/09/01 13:44:22 UTC

Re: How to ensure XAConnection to stop rollback in managed transactions?

Hi,

Please use the users@jackrabbit.apache.org mailing list for questions
about Jackrabbit configuration.

On Tue, Sep 1, 2009 at 12:01 PM,
mat_the_green<ma...@newedgeengineering.com> wrote:
> The database connection times out after about 12 hours and JackRabbit tries
> to reconnect but is using a normal java.sql.Connection and is trying to
> rollback the transaction.
> After reading through some documentation I think that JackRabbit should be
> using a XAConnection and I was wondering how I configure the persistence
> manager to ensure this?

Jackrabbit expects to be in full control of the underlying database
connection, so you should not try to use an external transaction
manager for that.

Jackrabbit supports distributed XA transactions on the Session level,
so you can simply associate your JCR sessions with the transaction
manager.

BR,

Jukka Zitting

Re: How to ensure XAConnection to stop rollback in managed transactions?

Posted by mat_the_green <ma...@newedgeengineering.com>.
Hello,

Actually I am not trying to take control of the transaction. Actually I am
relying on JBoss and a Container Managed Transaction. The problem is
JackRabbit is rolling back the transaction at line 315 in
org.apache.jackrabbit.core.persistence.bundle.util.ConnectionRecoveryManager.close()
and as it is only a java.sql.Connection it's is hard to determine if the
connection is container managed or bean managed. I am not sure if this is
the correct way as I would of thought from a design perspective a
javax.sql.XAConnection should be chosen during it creation so it can be
rolled back in correct way, i.e. via the XAResource. Just my thoughts after
trying to determine what was happening.

Thanks in advance
M


Jukka Zitting wrote:
> 
> Hi,
> 
> Please use the users@jackrabbit.apache.org mailing list for questions
> about Jackrabbit configuration.
> 
> On Tue, Sep 1, 2009 at 12:01 PM,
> mat_the_green<ma...@newedgeengineering.com> wrote:
>> The database connection times out after about 12 hours and JackRabbit
>> tries
>> to reconnect but is using a normal java.sql.Connection and is trying to
>> rollback the transaction.
>> After reading through some documentation I think that JackRabbit should
>> be
>> using a XAConnection and I was wondering how I configure the persistence
>> manager to ensure this?
> 
> Jackrabbit expects to be in full control of the underlying database
> connection, so you should not try to use an external transaction
> manager for that.
> 
> Jackrabbit supports distributed XA transactions on the Session level,
> so you can simply associate your JCR sessions with the transaction
> manager.
> 
> BR,
> 
> Jukka Zitting
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-ensure-XAConnection-to-stop-rollback-in-managed-transactions--tp25237565p25331469.html
Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.


Re: How to ensure XAConnection to stop rollback in managed transactions?

Posted by kravovich <kr...@gmail.com>.
Could you provide a link to jackrabbit documentation please?
Or add this question to wiki please.



Jukka Zitting wrote:
> 
> Hi,
> 
> Please use the users@jackrabbit.apache.org mailing list for questions
> about Jackrabbit configuration.
> 
> On Tue, Sep 1, 2009 at 12:01 PM,
> mat_the_green<ma...@newedgeengineering.com> wrote:
>> The database connection times out after about 12 hours and JackRabbit
>> tries
>> to reconnect but is using a normal java.sql.Connection and is trying to
>> rollback the transaction.
>> After reading through some documentation I think that JackRabbit should
>> be
>> using a XAConnection and I was wondering how I configure the persistence
>> manager to ensure this?
> 
> Jackrabbit expects to be in full control of the underlying database
> connection, so you should not try to use an external transaction
> manager for that.
> 
> Jackrabbit supports distributed XA transactions on the Session level,
> so you can simply associate your JCR sessions with the transaction
> manager.
> 
> BR,
> 
> Jukka Zitting
> 
> 

-- 
View this message in context: http://www.nabble.com/How-to-ensure-XAConnection-to-stop-rollback-in-managed-transactions--tp25237565p25341583.html
Sent from the Jackrabbit - Dev mailing list archive at Nabble.com.