-
Bug
-
Resolution: Done
-
Major
-
7.2.0.GA
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; } }
- blocks
-
JBEAP-16492 [DOC][EAP 7.2] Access Vendor-Specific Classes
- Closed
- clones
-
JBJCA-1392 Need to add checkTransaction handling for unwrap connection
- Resolved
- is incorporated by
-
JBEAP-17647 [GSS](7.2.z) Upgrade IronJacamar from 1.4.17.Final to 1.4.18.Final
- Closed