Just wanted to clarify something w.r.t transactions in JBM.
On the messsaging server we maintain state corresponding to transactions in the prepared
state in a map in memory.
If commit or rollback is invoked on an xaresource we look up the corresponding
transactional state in the map and commit/roll-it-back.
My question is this: If commit or rollback throws an exception is it valid for the
transaction manager to retry the commit or rollback (without first calling recover)?
If I can assume the commit/rollback is never retried then I can safely remove the
transaction state from the map in a finally block, whether or not the commit or rollback
succeeded.
If not, then I cannot see a safe time when the transaction state can be removed from the
map.
I cannot just remove it when the commit/rollback processing seems to complete without
throwing an exception, since the network might fail before the invocation has returned to
the client, so the client may still receive an exception.
Not removing the state will give us a memory leak.
My assumption is therefore that commit/rollback can never be retried (what about prepare?)
- is this correct?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3972155#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...