[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: Can the transaction manager retry commit or rollback?
timfox
do-not-reply at jboss.com
Mon Sep 18 07:08:45 EDT 2006
I was hoping you were going to answer :)
We currently log prepared states in the db (this will change).
So after the prepare has completed the prepared state has been logged durably.
The thing in memory is our "Transaction" class, which has methods prepare(), commit(), rollback() etc.
When a prepare comes in we add the Transaction instance to the in memory map.
This means that when we receive a subsequent commit/rollback we look in the map, get the instance and call commit/rollback on it.
This then moves the prepared state from the log to permanent storage.
So, if I remove the Transaction instance from memory after commit/rollback irrespective of whether an exception occurs, then if another commit/rollback comes in without recover (recover repopulates the map from the log) it won't find it.
If I don't remove the instance then I get a memory leak.
AFAICT the solution here is to repopulate the map if a commit/rollback comes in and it isn't in the map - which is a bit of a pain....
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3972261#3972261
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3972261
More information about the jboss-dev-forums
mailing list