You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by mat_the_green <ma...@newedgeengineering.com> on 2009/09/01 16:49:22 UTC
How to ensure XAConnection to stop rollback in managed
transactions?
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.
Re: How to ensure XAConnection to stop rollback in managed
transactions?
Posted by kravovich <kr...@gmail.com>.
Could you add this question to wiki or other documentation please?
Thank you
Alexander Klimetschek wrote:
>
> On Mon, Sep 7, 2009 at 22:08, Mihai Vasilache<mi...@yahoo.com>
> wrote:
>> The XAConnection cannot be used... i think. :)
>
> Yes, Jackrabbit needs full control over the connection. See here for
> an answer given on the dev list:
> http://markmail.org/message/4y5flozqpceq7eoh
>
> Regards,
> Alex
>
> --
> Alexander Klimetschek
> alexander.klimetschek@day.com
>
>
--
View this message in context: http://www.nabble.com/How-to-ensure-XAConnection-to-stop-rollback-in-managed-transactions--tp25241705p25341621.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
Re: How to ensure XAConnection to stop rollback in managed
transactions?
Posted by Alexander Klimetschek <ak...@day.com>.
On Mon, Sep 7, 2009 at 22:08, Mihai Vasilache<mi...@yahoo.com> wrote:
> The XAConnection cannot be used... i think. :)
Yes, Jackrabbit needs full control over the connection. See here for
an answer given on the dev list:
http://markmail.org/message/4y5flozqpceq7eoh
Regards,
Alex
--
Alexander Klimetschek
alexander.klimetschek@day.com
Re: How to ensure XAConnection to stop rollback in managed transactions?
Posted by Mihai Vasilache <mi...@yahoo.com>.
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 <mi...@yahoo.com> wrote:
From: Mihai Vasilache <mi...@yahoo.com>
Subject: Re: How to ensure XAConnection to stop rollback in managed transactions?
To: users@jackrabbit.apache.org
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 <ma...@newedgeengineering.com> wrote:
From: mat_the_green <ma...@newedgeengineering.com>
Subject: How to ensure XAConnection to stop rollback in managed transactions?
To: users@jackrabbit.apache.org
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.
Re: How to ensure XAConnection to stop rollback in managed transactions?
Posted by Mihai Vasilache <mi...@yahoo.com>.
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 <ma...@newedgeengineering.com> wrote:
From: mat_the_green <ma...@newedgeengineering.com>
Subject: How to ensure XAConnection to stop rollback in managed transactions?
To: users@jackrabbit.apache.org
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.