[
https://issues.jboss.org/browse/AS7-1481?page=com.atlassian.jira.plugin.s...
]
Stefano Maestri resolved AS7-1481.
----------------------------------
Resolution: Done
What we did during refactoring to SimpeAttributeDefinition met this requirements. In fact
this definition
{code}
public static final SimpleAttributeDefinition NODE_IDENTIFIER = new
SimpleAttributeDefinitionBuilder(CommonAttributes.NODE_IDENTIFIER, ModelType.STRING,
true)
.setDefaultValue(new ModelNode().set("1"))
.setFlags(AttributeAccess.Flag.RESTART_ALL_SERVICES)
.build();
{code}
used in TransactionSubSytemAdd for
{code}
final String nodeIdentifier =
TransactionSubsystemRootResourceDefinition.NODE_IDENTIFIER.resolveModelAttribute(context,
coreEnvModel).asString();
final CoreEnvironmentService coreEnvironmentService = new
CoreEnvironmentService(nodeIdentifier);
{code}
and then in CoreEnvironmentService for
{code}
coreEnvironmentBean.setNodeIdentifier(nodeIdentifier);
{code}
is doing exactly what suggested
nodeIdentifier, xaRecoveryNodes must be correctly set
-----------------------------------------------------
Key: AS7-1481
URL:
https://issues.jboss.org/browse/AS7-1481
Project: Application Server 7
Issue Type: Bug
Components: Transactions
Affects Versions: 7.0.0.Final
Reporter: Jonathan Halliday
Assignee: Stefano Maestri
Fix For: 7.1.0.CR1
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"));
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira