rollback() private method

private rollback ( bool isQueue ) : void
isQueue bool
return void
Exemplo n.º 1
0
        /*执行事务过程*/
        public DbTran execute(Action <DbTran> handler)
        {
            _handler = handler;

            try {
                connection = _context.getConnection();

                begin(false);
                _handler(this);
                commit(false);
            }
            catch (Exception ex) {
                if (queue == null)
                {
                    rollback(false);
                }
                else
                {
                    queue.rollback(false);
                }
                throw ex;
            }
            finally {
                close(false);
            }

            return(this);
        }