public void releaseConnection ( Connection < T > connection ) { if ( connection != null ) { try { //log info this . LOGGER . logInfo ( new Object [ ] { "Closing connection using factory type: " , this . getClass ( ) . getName ( ) } , null ) ; //get resource T resource = connection . getResource ( ) ; //release resource this . releaseResource ( resource ) ; //unregister connection CloseableResourceManager . unregisterCloseable ( connection ) ; //log info this . LOGGER . logInfo ( new Object [ ] { "Connection closed." } , null ) ; } catch ( Exception exception ) { //log error this . LOGGER . logInfo ( new Object [ ] { "Unable to close connection." } , exception ) ; } } }
Releases the connection .