if (connection == null) return;  if (!connection.getAutoCommit()) return;    try { if (localTransaction.inTransaction()) localTransaction.commit(); } catch(ResourceException ex) {  try { if (localTransaction.inTransaction()) localTransaction.rollback(); } catch(ResourceException ex1) { throw new FBSQLException(ex1); }  throw new FBSQLException(ex); }
statementCompleted(stmt, true);
        public void statementCompleted(AbstractStatement stmt) throws SQLException {            if (connection == null)                return;                        if (!connection.getAutoCommit())                return;                                    // commit in case of auto-commit mode to end the transaction that we started            try {                if (localTransaction.inTransaction())                    localTransaction.commit();            } catch(ResourceException ex) {                                try {                    if (localTransaction.inTransaction())                        localTransaction.rollback();                } catch(ResourceException ex1) {                    throw new FBSQLException(ex1);                }                                throw new FBSQLException(ex);            }        }