private boolean closeConnection ( Object c ) { if ( plugin == null ) return false ; log . debugf ( "Closing connection for recovery check (%s)" , c ) ; boolean forceClose = false ; if ( c != null ) { try { forceClose = ! plugin . isValid ( c ) ; } catch ( ResourceException re ) { log . debugf ( "Error during recovery plugin isValid()" , re ) ; forceClose = true ; } try { plugin . close ( c ) ; } catch ( ResourceException re ) { log . debugf ( "Error during recovery plugin close()" , re ) ; forceClose = true ; } } log . debugf ( "Force close=%s" , forceClose ) ; return forceClose ; }
Close a connection