Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 2.0.0
-
Fix Version/s: 2.0.1
-
Labels:None
-
Environment:Windows XP, IBM JDK5
-
Number of attachments :
Description
With the 2.0 release, I am having issues recovering from lost JMS connections. I have BTM configured against activeMQ and when activeMQ server goes out and comes back on, BTM fails to recover. This is what I get on my log:
Jul 8, 2010 12:06:22 PM bitronix.tm.recovery.Recoverer runINFO: recoverer is already running, abandoning this recovery request
Jul 8, 2010 12:06:52 PM bitronix.tm.recovery.Recoverer recoverAllResources
WARNING: error running recovery on resource 'activemq', resource marked as failed (background recoverer will retry recovery)
bitronix.tm.recovery.RecoveryException: recovery already in progress on a PoolingConnectionFactory with an XAPool of resource activemq with 1 connection(s) (1 still available) failed
at bitronix.tm.resource.jms.PoolingConnectionFactory.startRecovery(PoolingConnectionFactory.java:129)
at bitronix.tm.recovery.Recoverer.recover(Recoverer.java:233)
at bitronix.tm.recovery.Recoverer.recoverAllResources(Recoverer.java:204)
at bitronix.tm.recovery.Recoverer.run(Recoverer.java:119)
at java.lang.Thread.run(Thread.java:810)
Jul 8, 2010 12:08:22 PM bitronix.tm.recovery.Recoverer run
INFO: recoverer is already running, abandoning this recovery request
and it keeps repeating this on each recovery attempt.
What it appears to be having is that on Recovery (http://svn.codehaus.org/btm/trunk/src/bitronix/tm/recovery/Recoverer.java) class, you got:
private Set recover(XAResourceProducer producer) throws XAException, RecoveryException {
if (producer == null)
throw new IllegalArgumentException("recoverable resource cannot be null");
if (log.isDebugEnabled()) log.debug("running recovery on " + producer);
XAResourceHolderState xaResourceHolderState = producer.startRecovery();
try
finally
{ producer.endRecovery(); }
}
Now since startRecovery is throwing the exception, it never reaches the endRecovery call and the connection is left in an invalid state.
Fixed in trunk; new 2.0.1-SNAPSHOT build has been uploaded so you can easily try it out. See http://docs.codehaus.org/display/BTM/Maven2
Please report back if this new version works for you.
Thanks for the report!