/** * Get the native PostgreSQL connection from the given connection. * Various attempts of unwrapping are being performed. */ protected PGConnection getPGConnection(DelegatingConnection conn) { Connection innerConn = conn.getInnermostDelegate(); if (innerConn instanceof PGConnection) { return (PGConnection) innerConn; } if (innerConn.getClass().getName().startsWith("org.apache.commons.dbcp")) { return (PGConnection) getDbcpDelegate(innerConn); } return (PGConnection) unwrapConnection(conn, PGConnection.class); }
/** * Get the native PostgreSQL connection from the given connection. * Various attempts of unwrapping are being performed. */ protected PGConnection getPGConnection(DelegatingConnection conn) { Connection innerConn = conn.getInnermostDelegate(); if (innerConn instanceof PGConnection) { return (PGConnection) innerConn; } if (innerConn.getClass().getName().startsWith("org.apache.commons.dbcp")) { return (PGConnection) getDbcpDelegate(innerConn); } return (PGConnection) unwrapConnection(conn, PGConnection.class); }
/** * Get the native PostgreSQL connection from the given connection. * Various attempts of unwrapping are being performed. */ protected PGConnection getPGConnection(DelegatingConnection conn) { Connection innerConn = conn.getInnermostDelegate(); if (innerConn instanceof PGConnection) { return (PGConnection) innerConn; } if (innerConn.getClass().getName().startsWith("org.apache.commons.dbcp")) { return (PGConnection) getDbcpDelegate(innerConn); } return (PGConnection) unwrapConnection(conn, PGConnection.class); }
/** * Get the native PostgreSQL connection from the given connection. * Various attempts of unwrapping are being performed. */ protected PGConnection getPGConnection(DelegatingConnection conn) { Connection innerConn = conn.getInnermostDelegate(); if (innerConn instanceof PGConnection) { return (PGConnection) innerConn; } if (innerConn.getClass().getName().startsWith("org.apache.commons.dbcp")) { return (PGConnection) getDbcpDelegate(innerConn); } return (PGConnection) unwrapConnection(conn, PGConnection.class); }