[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: JBMESSAGING-545 - Leaks on XA transactions
timfox
do-not-reply at jboss.com
Fri Sep 22 05:38:26 EDT 2006
"clebert.suconic at jboss.com" wrote :
|
| So, summarizing the changes I'm making to fix this:
|
| I - I'm creating a method deleteTransaction on TransactionRepository.
|
| II - I also changed Transaction to accept a reference to TransactionRepository, as TransactionRepository is not static.
|
|
Sounds good
anonymous wrote :
| III - On commit/rollback transactionRepository.delete is being called
|
Fine. Make sure this is done at the end of the processing and not in a finally block - we don't want to remove the tx if it fails (the tx mgr can retry)
anonymous wrote :
|
| IV - Changed JDBCPersistenceManagerTest to perform a test on this
|
| V - Added a property method getNumberOfRegisteredTransactions() on TransactionRepository what is meant to be used only by tests. (I could use reflection on a private field for this, but I thought it was much cleaner to just add the property field. I could change this if someone doesn't like the exposed property)
|
|
|
Fine.
Also we need to make sure we return ok if a commit request comes in for a 2pc transaction and it isn't in the map.
There is a second part of this tasks which involves looking in the database if a request comes in for a transaction and it isn't in the map - but it's probably best to wait for Madhu to integrate his XA recovery work since you will need to re-use some of that.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973509#3973509
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973509
More information about the jboss-dev-forums
mailing list