public Connection unwrap(Connection conn) { if (!canUnwrap(conn)) throw new IllegalArgumentException( "This unwrapper can only handle instances of " + DelegatingConnection.class); Connection unwrapped = ((DelegatingConnection) conn).getInnermostDelegate(); if (unwrapped == null) throw new RuntimeException( "Could not unwrap connection. Is the DBCP pool configured " + "to allow access to underlying connections?"); return unwrapped; }
public Statement unwrap(Statement statement) { if (!canUnwrap(statement)) throw new IllegalArgumentException( "This unwrapper can only handle instances of " + DelegatingStatement.class); Statement unwrapped = ((DelegatingStatement) statement).getInnermostDelegate(); if (unwrapped == null) throw new RuntimeException( "Could not unwrap connection. Is the DBCP pool configured " + "to allow access to underlying connections?"); return unwrapped; } }
public Connection unwrap(Connection conn) { if (!canUnwrap(conn)) throw new IllegalArgumentException("This unwrapper can only handle instances of " + DelegatingConnection.class); Connection unwrapped = ((DelegatingConnection) conn).getInnermostDelegate(); if (unwrapped == null) throw new RuntimeException("Could not unwrap connection. Is the DBCP pool configured " + "to allow access to underlying connections?"); return unwrapped; }
public Statement unwrap(Statement statement) { if(!canUnwrap(statement)) throw new IllegalArgumentException("This unwrapper can only handle instances of " + DelegatingStatement.class); Statement unwrapped = ((DelegatingStatement) statement).getInnermostDelegate(); if (unwrapped == null) throw new RuntimeException("Could not unwrap connection. Is the DBCP pool configured " + "to allow access to underlying connections?"); return unwrapped; }
public Statement unwrap(Statement statement) { if(!canUnwrap(statement)) throw new IllegalArgumentException("This unwrapper can only handle instances of " + DelegatingStatement.class); Statement unwrapped = ((DelegatingStatement) statement).getInnermostDelegate(); if (unwrapped == null) throw new RuntimeException("Could not unwrap connection. Is the DBCP pool configured " + "to allow access to underlying connections?"); return unwrapped; }
public Connection unwrap(Connection conn) { if (!canUnwrap(conn)) throw new IllegalArgumentException("This unwrapper can only handle instances of " + DelegatingConnection.class); Connection unwrapped = ((DelegatingConnection) conn).getInnermostDelegate(); if (unwrapped == null) throw new RuntimeException("Could not unwrap connection. Is the DBCP pool configured " + "to allow access to underlying connections?"); return unwrapped; }