I have successfully use the Atomikos libraries to do a 2PC between to data sources using JTA transactions. Here I assume when I use JTA the underline protocol runs is the 2PC.
My question is, if my machine dies before 2PC protocol ends how the recovery process happens.
For an example in a 2PC protocol if the TM fails in the middle of a commit phase, then other nodes can communicate with each other and complete the transaction. Can such a thing happen in this case?
How the transaction manager supposed to recover? (in 2PC protocol coordinator)
I think I create an in memory object with this statement.
UserTransactionManager userTransactionManager = new UserTransactionManager();
does Atomikos persist transaction details to a temp location?
Appreciate any help on this.
We do all we can to recover, and it works like P2P. However, 2PC is a blocking protocol and there are always possible problem cases. Sooner or later all nodes have to be up in order to terminate recovery: if a node stays down indefinitely then a problem case _will_ happen. But not so if it comes back up after a while...
Note that a lot of "alternatives" to 2PC also require the same conditions for correct recovery - it's just that they don't recognize the need like we do. Plus: we give you the tools to administer things manually when node or network failures persist.
thanks for your reply.
yes if the nodes fails for ever there can not be any grantee.
What I am thinking in the case that TM dies (This happen if the jvm crashes) and that program starts again will the recovery part happens automatically?
Or do we need to call any special methods for that?
This topic is archived. No further replies will be accepted.Other recent topics