return connection;
}
protected void testUnderlyingConnection() throws CreateConnectionException {
String testQuery = getTestQuery();
if ( isErroneous() ) throw new CreateConnectionException ( this + ": connection is erroneous" );
if (testQuery != null) {
Configuration.logDebug ( this + ": testing connection with query [" + testQuery + "]" );
Statement stmt = null;
try {
stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery(testQuery);
rs.close();
stmt.close();
} catch ( SQLException e) {
throw new CreateConnectionException ( "Error executing testQuery" , e );
}
Configuration.logDebug ( this + ": connection tested OK" );
}
else {
Configuration.logDebug ( this + ": no test query, skipping test" );