You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "YP (Created) (JIRA)" <ji...@apache.org> on 2012/03/15 10:51:40 UTC

[jira] [Created] (JCR-3258) JTA & BundleDbPersistenceManager in autocommit mode

JTA & BundleDbPersistenceManager in autocommit mode
---------------------------------------------------

                 Key: JCR-3258
                 URL: https://issues.apache.org/jira/browse/JCR-3258
             Project: Jackrabbit Content Repository
          Issue Type: Bug
          Components: jackrabbit-core
    Affects Versions: 2.4
         Environment: Postgresql 8.4
BTM
Jencks
            Reporter: YP
            Priority: Blocker
         Attachments: jca.log, non-jca.log

Neither JTA nor JCA with JTA works because of the exception 'java.sql.SQLException: autocommit is not allowed on a resource enlisted in a global transaction' from BTM,
issue JCR-1253 has explanation of why keep autocommit enabled, but there is always error when autocommit mode is true.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (JCR-3258) JTA & BundleDbPersistenceManager in autocommit mode

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting resolved JCR-3258.
--------------------------------

    Resolution: Not A Problem

Jackrabbit is designed to work directly as an XA resource, which means that the underlying database should *not* be controlled by a transaction manager. Instead, to properly implement transaction semantics, Jackrabbit needs to be in control of the underlying database connection.
                
> JTA & BundleDbPersistenceManager in autocommit mode
> ---------------------------------------------------
>
>                 Key: JCR-3258
>                 URL: https://issues.apache.org/jira/browse/JCR-3258
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 2.4
>         Environment: Postgresql 8.4
> BTM 2.1.2
> Jencks 2.0
>            Reporter: YP
>            Priority: Blocker
>         Attachments: jca.log, non-jca.log
>
>
> Neither JTA nor JCA with JTA works because of the exception 'java.sql.SQLException: autocommit is not allowed on a resource enlisted in a global transaction' from BTM,
> issue JCR-1253 has explanation of why keep autocommit enabled, but there is always error when autocommit mode is true.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (JCR-3258) JTA & BundleDbPersistenceManager in autocommit mode

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13491266#comment-13491266 ] 

Jukka Zitting commented on JCR-3258:
------------------------------------

We need autocommit since Jackrabbit is using long-lived database connections. Without autocommit we'd have to add an explicit COMMIT statement even after each SELECT query as otherwise databases with high transaction isolation levels would have to keep a transaction open potentially indefinitely.
                
> JTA & BundleDbPersistenceManager in autocommit mode
> ---------------------------------------------------
>
>                 Key: JCR-3258
>                 URL: https://issues.apache.org/jira/browse/JCR-3258
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 2.4
>         Environment: Postgresql 8.4
> BTM 2.1.2
> Jencks 2.0
>            Reporter: YP
>            Priority: Blocker
>         Attachments: jca.log, non-jca.log
>
>
> Neither JTA nor JCA with JTA works because of the exception 'java.sql.SQLException: autocommit is not allowed on a resource enlisted in a global transaction' from BTM,
> issue JCR-1253 has explanation of why keep autocommit enabled, but there is always error when autocommit mode is true.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (JCR-3258) JTA & BundleDbPersistenceManager in autocommit mode

Posted by "Carl Pritchett (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13491001#comment-13491001 ] 

Carl Pritchett commented on JCR-3258:
-------------------------------------

That's fine - but can we turn auto commit off somehow? There is not access to autocommit.
                
> JTA & BundleDbPersistenceManager in autocommit mode
> ---------------------------------------------------
>
>                 Key: JCR-3258
>                 URL: https://issues.apache.org/jira/browse/JCR-3258
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 2.4
>         Environment: Postgresql 8.4
> BTM 2.1.2
> Jencks 2.0
>            Reporter: YP
>            Priority: Blocker
>         Attachments: jca.log, non-jca.log
>
>
> Neither JTA nor JCA with JTA works because of the exception 'java.sql.SQLException: autocommit is not allowed on a resource enlisted in a global transaction' from BTM,
> issue JCR-1253 has explanation of why keep autocommit enabled, but there is always error when autocommit mode is true.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (JCR-3258) JTA & BundleDbPersistenceManager in autocommit mode

Posted by "Chris Poulsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13461717#comment-13461717 ] 

Chris Poulsen commented on JCR-3258:
------------------------------------

I see a variant of the same issue when using jcr from an ejb. On jboss as 5.1, jackrabbit 2.4.3 (jca connector).
                
> JTA & BundleDbPersistenceManager in autocommit mode
> ---------------------------------------------------
>
>                 Key: JCR-3258
>                 URL: https://issues.apache.org/jira/browse/JCR-3258
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 2.4
>         Environment: Postgresql 8.4
> BTM 2.1.2
> Jencks 2.0
>            Reporter: YP
>            Priority: Blocker
>         Attachments: jca.log, non-jca.log
>
>
> Neither JTA nor JCA with JTA works because of the exception 'java.sql.SQLException: autocommit is not allowed on a resource enlisted in a global transaction' from BTM,
> issue JCR-1253 has explanation of why keep autocommit enabled, but there is always error when autocommit mode is true.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (JCR-3258) JTA & BundleDbPersistenceManager in autocommit mode

Posted by "YP (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

YP updated JCR-3258:
--------------------

    Attachment: jca.log
                non-jca.log
    
> JTA & BundleDbPersistenceManager in autocommit mode
> ---------------------------------------------------
>
>                 Key: JCR-3258
>                 URL: https://issues.apache.org/jira/browse/JCR-3258
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 2.4
>         Environment: Postgresql 8.4
> BTM
> Jencks
>            Reporter: YP
>            Priority: Blocker
>         Attachments: jca.log, non-jca.log
>
>
> Neither JTA nor JCA with JTA works because of the exception 'java.sql.SQLException: autocommit is not allowed on a resource enlisted in a global transaction' from BTM,
> issue JCR-1253 has explanation of why keep autocommit enabled, but there is always error when autocommit mode is true.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (JCR-3258) JTA & BundleDbPersistenceManager in autocommit mode

Posted by "Carl Pritchett (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/JCR-3258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13412420#comment-13412420 ] 

Carl Pritchett commented on JCR-3258:
-------------------------------------

We get the same issue - the BundleDBPersistenceManager uses the ConnectionHelper via getConnection() and this always sets autoCommit to true. I'm using a Spring transaction - and this causes a similar error to the error in the description.

org.apache.jackrabbit.core.state.ItemStateException: failed to read bundle: fa395a84-99e0-46c1-8d89-ff62c3f6c4d9: java.sql.SQLException: You cannot set autocommit during a managed transaction!

When can use "NOT_SUPPORTED" but I'd prefer not to for obvious reasons.

Perhaps there is a way to use XASessions to do this and I'd love a link to the doco on how, but can we turn off autoCommit via an option when not running in a cluster?
                
> JTA & BundleDbPersistenceManager in autocommit mode
> ---------------------------------------------------
>
>                 Key: JCR-3258
>                 URL: https://issues.apache.org/jira/browse/JCR-3258
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 2.4
>         Environment: Postgresql 8.4
> BTM 2.1.2
> Jencks 2.0
>            Reporter: YP
>            Priority: Blocker
>         Attachments: jca.log, non-jca.log
>
>
> Neither JTA nor JCA with JTA works because of the exception 'java.sql.SQLException: autocommit is not allowed on a resource enlisted in a global transaction' from BTM,
> issue JCR-1253 has explanation of why keep autocommit enabled, but there is always error when autocommit mode is true.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (JCR-3258) JTA & BundleDbPersistenceManager in autocommit mode

Posted by "YP (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-3258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

YP updated JCR-3258:
--------------------

    Environment: 
Postgresql 8.4
BTM 2.1.2
Jencks 2.0

  was:
Postgresql 8.4
BTM
Jencks

    
> JTA & BundleDbPersistenceManager in autocommit mode
> ---------------------------------------------------
>
>                 Key: JCR-3258
>                 URL: https://issues.apache.org/jira/browse/JCR-3258
>             Project: Jackrabbit Content Repository
>          Issue Type: Bug
>          Components: jackrabbit-core
>    Affects Versions: 2.4
>         Environment: Postgresql 8.4
> BTM 2.1.2
> Jencks 2.0
>            Reporter: YP
>            Priority: Blocker
>         Attachments: jca.log, non-jca.log
>
>
> Neither JTA nor JCA with JTA works because of the exception 'java.sql.SQLException: autocommit is not allowed on a resource enlisted in a global transaction' from BTM,
> issue JCR-1253 has explanation of why keep autocommit enabled, but there is always error when autocommit mode is true.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira