Oracle
 sql >> Database >  >> RDS >> Oracle

Annulla il wrapping in OracleConnection

Uso "oracle.jdbc.pool.OracleConnectionPoolDataSource" come classe datasouce in glassfish.

Usa la classe o trova la classe jboss.

Modifica e prova:

public OracleConnection getOracleConnection(Connection connection) throws SQLException {
    OracleConnection oconn = null;
    try {
        if (connection.isWrapperFor(oracle.jdbc.OracleConnection.class)) {
            oconn = (OracleConnection) connection.unwrap(oracle.jdbc.OracleConnection.class)._getPC();
        }
    } catch (SQLException e) {
        throw e;
    }
    return oconn;
}