[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: Can the transaction manager retry commit or rollback?
adrian@jboss.org
do-not-reply at jboss.com
Mon Sep 18 07:32:50 EDT 2006
"timfox" wrote :
| If I don't remove the instance then I get a memory leak.
|
You only have a memory leak if the number grows large.
Which you can give a warning about anyway.
if (map.size() > 100)
log.warn("Your TM is probably broken!");
The usual solution is to move the transaction to an "in doubt" state
after a configurable period of time. e.g. 1 hour
or if you have to recover after a failure.
Then provide a mechanism for the administrator to resolve
these heuristically.
You need to record permenant storage the result of these
heuristics so you can give the correct response if you do
get the commit/rollback.
You could also get a forget().
But this is a 0.1%/99.9% case. Having to go to the db to get the
heuristic state or the state of an in doubt transaction is
not a real an issue.
If the state isn't there, you are going to throw an exception anyway.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3972266#3972266
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3972266
More information about the jboss-dev-forums
mailing list