public static void closeConnection ( Connection con ) { if ( con != null ) { try { con . close ( ) ; } catch ( SQLException ex ) { logger . debug ( "Could not close JDBC Connection" , ex ) ; } catch ( Throwable ex ) { logger . debug ( "Unexpected exception on closing JDBC Connection" , ex ) ; } } }
Close the given JDBC Connection and ignore any thrown exception . This is useful for typical finally blocks in manual JDBC code .