Code example for Connection

Methods: getAutoCommit, isClosed, rollback

0
   * Invokes a rollback on the connection if auto-commit is turned off 
   */ 
  public static void rollback(Connection conn)
  throws SQLException 
  { 
	  if (conn != null && !conn.isClosed())
	  { 
		  if (!conn.getAutoCommit())
			  conn.rollback();
	  } 
	  else 
	  { 
		  LOG.error("Invoking a rollback after the connection is closed "); 
	  } 
  } 
 
}