-
Enhancement
-
Resolution: Done
-
Major
-
7.2.0.GA
Access Vendor-Specific Classes section is using a org.jboss.jca.adapters.jdbc.WrappedConnection class to access vendor specific jdbc Connection.
import java.sql.Connection; import org.jboss.jca.adapters.jdbc.WrappedConnection; ... Connection c = ds.getConnection(); WrappedConnection wc = (WrappedConnection)c; com.mysql.jdbc.Connection mc = wc.getUnderlyingConnection();
It is necessary to add dependencies of org.jboss.ironjacamar.jdbcadapters module to jboss-deployment-structure.xml, but the jdbcadapters module is a private module. We do not recommend to use private module in customer's application, It is better to use JDBC 4 Wrapper class instead of jdbcadapters module class like a below.
import java.sql.Connection; ... Connection c = ds.getConnection(); if (c.isWrapperFor(com.mysql.jdbc.Connection.class)) { com.mysql.jdbc.Connection mc = c.unwrap(com.mysql.jdbc.Connection.class); }
- is blocked by
-
JBEAP-16507 [GSS](7.2.z) JBJCA-1392 - Need to add checkTransaction handling for unwrap connection
- Closed