You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Viral Gohel (JIRA)" <ji...@apache.org> on 2015/05/15 17:09:00 UTC

[jira] [Created] (CXF-6406) WS-RM persistence with RMTxStore does not work with JNDI Lookup

Viral Gohel created CXF-6406:
--------------------------------

             Summary: WS-RM persistence with RMTxStore does not work with JNDI Lookup
                 Key: CXF-6406
                 URL: https://issues.apache.org/jira/browse/CXF-6406
             Project: CXF
          Issue Type: Bug
         Environment: CXF 2.7.11 with JBoss EAP 6.3
            Reporter: Viral Gohel


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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)