"timfox" wrote :
| One other possibility is to return OK, but not actually persist the branch if it only
contains non persistent operations, then if we subsequently get a commit or rollback for
that branch on recovery, we can return OK to the commit/rollback even though we can't
find the branch. The tx mgr then thinks the transaction was resolved ok, even though the
non persistent messages were lost (which is fine anyway).
|
The important part with returning OK is that you need to persist the XID
so you can return it from XAResource.recover() - otherwise you might
confuse the transaction manager.
It doesn't matter whether there is actually anything behind the XID.
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4154677#...
I guess the real problem occurs when you have a non-persistent send()
in a failed transaction commit, i.e.. another branch failed to commit, not you.
The TM then calls later recover() and you return nothing.
The TM would be well within its rights to assume you already committed
(although it could be confused that you lost memory of the XID you said was OK :-)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4175062#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...