jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fernando Méndez <fernando.men...@travelsoft.fr>
Subject Autocommit problem with Jackrabbit as JCA eventually related to JCR-1013
Date Tue, 26 Oct 2010 12:51:46 GMT
Hi everyone,
  I am having some trouble with the persistence manager configuration
when using the OraclePersistenceManager (the one from the pool package).
I am currently testing Jackrabbit 2.1.1 deployed as JCA, in a JBoss AS
4.2.1.GA.

This is my current persistence manager configuration:
  <PersistenceManager
class="org.apache.jackrabbit.core.persistence.pool.OraclePersistenceManager">
    <param name="driver" value="javax.naming.InitialContext"/>
    <param name="url" value="java:MyDS"/>
    <param name="schemaObjectPrefix" value="${wsp.name}_" />
  </PersistenceManager>

My data source is configured as a local-tx-datasource.

When trying to open a session against my workspace, I get this kind of
error :
14:36:44,625 ERROR [ConnectionHelper] Failed to execute SQL (stacktrace
on DEBUG log level)
java.sql.SQLException: You cannot set autocommit during a managed
transaction!
    at
org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.setJdbcAutoCommit(BaseWrapperManagedConnection.java:482)
    at
org.jboss.resource.adapter.jdbc.WrappedConnection.setAutoCommit(WrappedConnection.java:322)
    at
org.apache.jackrabbit.core.util.db.ConnectionHelper.getConnection(ConnectionHelper.java:387)
    at
org.apache.jackrabbit.core.util.db.ConnectionHelper.reallyExec(ConnectionHelper.java:344)
    at
org.apache.jackrabbit.core.util.db.ConnectionHelper.access$200(ConnectionHelper.java:65)
    at
org.apache.jackrabbit.core.util.db.ConnectionHelper$3.call(ConnectionHelper.java:332)
    at
org.apache.jackrabbit.core.util.db.ConnectionHelper$3.call(ConnectionHelper.java:328)
    at
org.apache.jackrabbit.core.util.db.ConnectionHelper$RetryManager.doTry(ConnectionHelper.java:450)
    at
org.apache.jackrabbit.core.util.db.ConnectionHelper.exec(ConnectionHelper.java:328)
[...]

>From what I've seen in the sources, the OraclePersistenceManager that I
am using provides an OracleConnectionHelper that inherits the
getConnection() method from the generic ConnectionHelper.
I have found this in the ConnectionHelper class :
    protected final Connection getConnection() throws SQLException {
[...]
            // JCR-1013: Setter may fail unnecessarily on a managed
connection
            if (!con.getAutoCommit()) {
                con.setAutoCommit(true);
            }
[...]
    }

Since the JCR-1013 seems to have been fixed, I don't know if it is still
a bug to fix, or if I am using a wrong configuration. I have seen a
previous post from Cory Prowse, but I can't tell if this is the same
problem.

Any ideas are welcome !

Thanks in advance,
Fernando Méndez.
 

Mime
View raw message