Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rollback when no transaction is active #61

Open
mahmoudbahaa opened this issue Sep 19, 2011 · 0 comments
Open

rollback when no transaction is active #61

mahmoudbahaa opened this issue Sep 19, 2011 · 0 comments

Comments

@mahmoudbahaa
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant