-
Bug
-
Resolution: Done
-
Major
-
None
-
None
connection.setAutoCommit cannot affect unwrap native connection. The following mc.getAutoCommit result is true.
c = dataSource.getConnection(); c.setAutoCommit(false); if (c.isWrapperFor(oracle.jdbc.OracleConnection.class)) { mc = c.unwrap(oracle.jdbc.OracleConnection.class); } System.out.println("[JDBC 4 Wrapper] autoCommit : " + mc.getAutoCommit());
However, the following getUnderlyingConnection native connection result is false.
c = dataSource.getConnection(); c.setAutoCommit(false); WrappedConnection wc = (WrappedConnection)c; oracle.jdbc.OracleConnection mc = (oracle.jdbc.OracleConnection)wc.getUnderlyingConnection(); System.out.println("[org.jboss.ironjacamar.jdbcadapters WrappedConnection] autoCommit : " + mc.getAutoCommit());
The getUnderlyingConnection method call BaseWrapperManagedConnection.checkTransaction process, but there is no similar process in unwrap method.
org/jboss/jca/adapters/jdbc/BaseWrapperManagedConnection.java
void checkTransaction() throws SQLException { synchronized (stateLock) { if (inManagedTransaction) return; // Check autocommit if (jdbcAutoCommit != underlyingAutoCommit) { con.setAutoCommit(jdbcAutoCommit); underlyingAutoCommit = jdbcAutoCommit; } }
- is cloned by
-
JBEAP-16507 [GSS](7.2.z) JBJCA-1392 - Need to add checkTransaction handling for unwrap connection
- Closed
- is incorporated by
-
JBEAP-17687 Upgrade IronJacamar to 1.4.18.Final
- Closed
-
WFLY-12595 Upgrade IronJacamar to 1.4.18.Final
- Closed