The XAConnection cannot be used... i think. :)
In org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager
at line 521 (store(ChangeLog changeLog) function) it is performing commits and 
rollbacks on the java.sql.Connection

con = connectionManager.getConnection();
                connectionManager.setAutoReconnect(false);
                con.setAutoCommit(false);
                super.store(changeLog);
                con.commit();
                con.setAutoCommit(true);

so, i think it needs a plain jdbc connection....

--- On Mon, 9/7/09, Mihai Vasilache <[email protected]> wrote:

From: Mihai Vasilache <[email protected]>
Subject: Re: How to ensure XAConnection to stop rollback in managed 
transactions?
To: [email protected]
Date: Monday, September 7, 2009, 4:38 PM

Hi!

I am interested too about this . I am trying to setup the repository to use a 
database persistence manager.
I am also not sure if i must use a plain Connection or a DataSource with 
XAConnections.

You are asking about how can configure an XAConnection. Here is what i am 
trying right now but, again, i am not shure it is ok.

<PersistenceManager 
class="org.apache.jackrabbit.core.persistence.bundle.PostgreSQLPersistenceManager">
            <param name="driver" value="javax.naming.InitialContext"/>
            <param name="url" value="java:comp/env/jdbc/ArhinetDS"/>

            <!--Please note that 'schema' in the persistence manager has the 
meaning of 'database type'. -->
            <param name="schema" value="postgresql"/>
            <param name="schemaObjectPrefix" value="jcr_${wsp.name}_"/>
            <!--<param name="externalBLOBs" value="false"/>-->
          </PersistenceManager>


and the datasource:

<Resource
                name="jdbc/ArhinetDS"
                auth="Container"
                type="com.atomikos.jdbc.AtomikosDataSourceBean"
                factory="com.atomikos.tomcat.BeanFactory"
                uniqueResourceName="jdbc/ArhinetDS"
                xaDataSourceClassName="org.postgresql.xa.PGXADataSource"

                maxPoolSize="100"
                minPoolSize="5"
                reapTimeout="-1"
                borrowConnectionTimeout="300"
                maxIdleTime="600"
                maintenanceInterval="300"

                xaProperties.databaseName="postgres"
                xaProperties.serverName="localhost"
                xaProperties.portNumber="5432"
                xaProperties.user="postgres"
                xaProperties.password="..."
                
            />

Any clarification about this topic will be appreciated.

--- On Tue, 9/1/09, mat_the_green <[email protected]> wrote:

From: mat_the_green <[email protected]>
Subject: How to ensure XAConnection to stop rollback in managed transactions?
To: [email protected]
Date: Tuesday, September 1, 2009, 5:49 PM


Hello, 

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?

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

Reply via email to