[jboss-dev-forums] [Design of JCA on JBoss] - Re: JcaXAResourceRecovery

timfox do-not-reply at jboss.com
Thu Feb 1 06:20:17 EST 2007


Also, one thing I noticed when doing the XA recovery work for JBM is that the JMSProviderXAResourceRecovery instance that was done for JBossMQ is broken.

The way JBoss TS recovery manager works is as follows:

It calls:

myXAResourceRecovery.hasMoreResources()

returns true

myXAResourceRecovery.getXAResource()

returns resource

myXAResourceRecovery.hasMoreResources()

returns false

it then calls recover() as appropriate on the XAResoource

and then commit/rollback as appropriate

and then, and it *throws the XAResource away*

then on the next time around (120 seconds later or whatever)

it goes through the whole procedure again.

The way the JBossMQ XAResourceRecovery was written is that it never returns true to hasMoreResources after the first time.

So any in doubt transactions after that time will never be picked up.

Also the concept of an XAResourceWrapper which will transparent reconnect doesn't make much sense to me, if you bear in mind the above. Since JBoss TS will throw away the Wrapper anyway after the pass.

You may as well create a new one on each pass. (This is what we do) It certainly makes the code a lot simpler.



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4009331#4009331

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4009331



More information about the jboss-dev-forums mailing list