final void logicalClose ( final boolean withTest ) throws SQLException { openTime = 0L ; if ( debug ) { lastTrace = null ; } if ( logicalCloseException != null ) { //Set during close() & thrown here to cause segment to reopen. Util . throwException ( logicalCloseException ) ; } if ( withTest ) { conn . setAutoCommit ( true ) ; if ( testSQL != null && testSQL . length ( ) > 0 ) { ResultSet rs = null ; Statement stmt = null ; try { stmt = conn . createStatement ( ) ; rs = stmt . executeQuery ( testSQL ) ; } finally { try { if ( rs != null ) { rs . close ( ) ; } } finally { if ( stmt != null ) { stmt . close ( ) ; } } } } } }
Prepares the connection for return to the active pool .