Skip to content
This repository was archived by the owner on Dec 30, 2024. It is now read-only.
This repository was archived by the owner on Dec 30, 2024. It is now read-only.

rollback when no transaction is active  #61

Description

@mahmoudbahaa

In AIRServiceProvider commitTransaction method , in case of SQLErrorEvent connection.rollback(); is called

connection.addEventListener(SQLErrorEvent.ERROR, function(event:SQLErrorEvent):void {
        event.currentTarget.removeEventListener(event.type, arguments.callee);
        Rx.log.debug("rolling back");
        connection.rollback();
        if (responder) responder.fault(event.error);
});

but sometimes it gives an error saying ( no active transaction) so we need to check for it

connection.addEventListener(SQLErrorEvent.ERROR, function(event:SQLErrorEvent):void {
        event.currentTarget.removeEventListener(event.type, arguments.callee);
      if(connection.inTransaction)  {
               Rx.log.debug("rolling back");
               connection.rollback();
       }
        if (responder) responder.fault(event.error);
 });

i created a simple patch here http://www.mediafire.com/?2ihd08j0syqeyv0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions