David Lloyd wrote:
I assume that as part of recovery, we will have to somehow recreate all of our XAResources? Or does the TM serialize them or something?
Yeah, you will be responsible for recreating your XAResources, when they recover I believe you are intended to call RecoveryManagerService.addXAResourceRecovery() giving a class that implements org.jboss.tm.XAResourceRecovery from the transaction SPI.
Just to confirm we don't support interposed Synchronizations in the initial release of the distributed JTA API. It would be feasible to support these in the future, if this is a requirement, please register a Jira against https://issues.jboss.org/browse/JBTM-895
Synchronizations in our distributed JTA work as follows:
beforeCompletion will be called at all servers before the transaction completes. afterCompletion is currently node specific (see https://issues.jboss.org/browse/JBTM-909) so will be called immediately after the transaction commits at each particular node.
NOTE: The transport is responsible for adding a proxy synchronization that is able to propagate beforeCompletion to remote servers, see usages on: https://svn.jboss.org/repos/labs/labs/jbosstm/branches/JBOSSTS_4_15_0_Final/atsintegration/tests/classes/com/arjuna/ats/jta/distributed/server/impl/ProxySynchronization.java -r 37555 (e.g. https://svn.jboss.org/repos/labs/labs/jbosstm/branches/JBOSSTS_4_15_0_Final/atsintegration/tests/classes/com/arjuna/ats/jta/distributed/SimpleIsolatedServers.java -r 37580)
> beforeCompletion will be called at all servers before the transaction completes
That's a bit over simplistic. beforeCompletion is not necessarily called on rollback only tx. Further, in distributed tx, rollback only is actually a local property - branches of the tx at some nodes may be considered rollback only whilst others in the same tx are not. So you can actually get weird situations in which beforeCompletion runs at some nodes but not others. Fun, isn't it. :-)
see also JBTM-496
Jonathan Halliday wrote:
Fun, isn't it. :-)
|Retrieving data ...|