Code example for Connection

Methods: closerollback

0
 public void rollbackNClose() throws SQLException 
 { 
  if( conn == null )
   return; 
   
  conn.rollback();
  conn.close();
 } 
 
 public void commitNClose() throws SQLException 
 { 
  if( conn == null )
   return; 
   
  conn.commit();
  conn.setAutoCommit(true);
  conn.close();
 } 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE