Jeg bruger "oracle.jdbc.pool.OracleConnectionPoolDataSource" som datakildeklasse i glassfish.
Brug klassen eller find jboss-klassen.
Rediger og prøv:
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;
}