@@ -208,13 +208,7 @@ public class JDBCConnection implements DBConnection {
}
/**
* <p>Create a JDBC connection by wrapping the given connection.</p>
*
* <p><i><b>Warning:</b>
* Calling {@link #close()} will call the function close() of the given connection.
* So, if this connection is coming from a pool, it is here supposed that a call to this function will not close the connection but gives it back to the pool.
* If it's not the case, {@link #close()} must be overwritten in order to apply the good "close" behavior.
* </i></p>
* Create a JDBC connection by wrapping the given connection.
*
* @param conn Connection to wrap.
* @param translator {@link ADQLTranslator} to use in order to get SQL from an ADQL query and to get qualified DB table names.
...
...
@@ -312,15 +306,17 @@ public class JDBCConnection implements DBConnection {
returnID;
}
@Override
publicvoidclose()throwsDBException{
try{
connection.close();
log(0,"Connection CLOSED.",null);
}catch(SQLExceptionse){
log(1,"CLOSING connection impossible!",se);
thrownewDBException("Impossible to close the database connection !",se);
}
/**
* <p>Get the JDBC connection wrapped by this {@link JDBCConnection} object.</p>
*
* <p><i>Note:
* This is the best way to get the JDBC connection in order to properly close it.