Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6406

WS-RM persistence with RMTxStore does not work with JNDI Lookup

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None
    • CXF 2.7.11 with JBoss EAP 6.3

    • Unknown

    Description

      1.) create new empty database schema
      2.) configure a JNDI Datasource within application server that uses the schema
      3.) Use the configuration as in attached file "ClientConfig_with_WS-RM.xml"
      4.) See what happens.....

      You get the below exception,

      Caused by: java.sql.SQLException: You cannot commit with autocommit set!
      at org.jboss.jca.adapters.jdbc.BaseWrapperManagedConnection.jdbcCommit(BaseWrapperManagedConnection.java:1071)
      at org.jboss.jca.adapters.jdbc.WrappedConnection.commit(WrappedConnection.java:758)
      at org.apache.cxf.ws.rm.persistence.jdbc.RMTxStore.commit(RMTxStore.java:709)
      at org.apache.cxf.ws.rm.persistence.jdbc.RMTxStore.removeSourceSequence(RMTxStore.java:495)
      ... 90 more

      It seems that the changes for 'setAutoCommit' in 'org.apache.cxf.ws.rm.persistence.jdbc.RMTxStore' were done in CXF-3114.

      The fix for CXF-3114 introduced a change a change to con.setAutoCommit(false) to con.setAutoCommit(true) in the init() method.

      Since the fix for CXF-3114, the code
      has been refactored and the line moved from init() to createTables() but the finally block that was
      added is missing and so autoCommit flag is never set back to false.

      It seems that the 'finally' block is missing, con.setAutoCommit(false) , which was removed for the fix in CXF-3114.

      Attachments

        1. ClientConfig_with_WS-RM.xml
          3 kB
          Viral Gohel

        Issue Links

          Activity

            People

              ay Akitoshi Yoshida
              vrlgohel Viral Gohel
              Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: