-
Bug
-
Resolution: Done
-
Major
-
7.0.0.Final
-
None
-
Documentation (Ref Guide, User Guide, etc.), Compatibility/Configuration
The transaction recovery system must be provided with a list of nodes for which it will recover transactions. In most configurations each AS instance should recover only transactions belonging to itself. Each server currently has its own node id, with a default value. The recovery node value is currently hardcoded to this default. This means that:
a) no recovery will occur if the node id is changed, as it should be for any environment in which more than one server may communicate to the same RMs.
b) Recovery will occur incorrectly and may lead to data corruption in environments where multiple servers are deployed and share RMs.
c) It's not possible to use the node id for debugging tx ownership unless users remember to override it in environments with multiple servers.
At minimum the server must not provide a default value for recovery nodes that matches the default, or indeed any possible valid value, for the node identifier. Doing this means the out of box configuration may corrupt transactional updates, which is unacceptable.
The recovery node value may be set automatically to the node id, with no default provided for the node id itself. If a default node id is provided, see above.
Or alternatively the recovery node id(s) should be user configurable through the model.
– TransactionSubsystemAdd.execute:
String nodeIdentifier = operation.get(CORE_ENVIRONMENT).hasDefined(NODE_IDENTIFIER) ? operation.get(CORE_ENVIRONMENT, NODE_IDENTIFIER).asString() : "1";
– ArjunaTransactionManagerService.start:
jtaEnvironmentBean.setXaRecoveryNodes(Collections.singletonList("1"));