public static void closeConnection ( Connection conn ) { if ( conn != null ) { try { conn . close ( ) ; } catch ( Exception e ) { log . warn ( "Exception when closing database connection." , e ) ; } } }
Closes database Connection . No exception will be thrown even if occurred during closing instead the exception will be logged at warning level .