Description of problem:
Regression introduced with https://bugzilla.redhat.com/show_bug.cgi?id=983980
The check for duplicate runtime-name in a server group on startup is too aggressive. It is incorrectly throwing an error on startup if there are any duplicate runtime-names in the whole domain, instead of just in a single server group.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Start a single HC/DC
2. deploy --name=foo1 --runtime-name=bar --disabled testfile
3. deploy --name=foo2 --runtime-name=bar --disabled testfile
4. restart the DC/HC
JBAS010932: Caught exception during boot: org.jboss.as.controller.persistence.ConfigurationPersistenceException: JBAS014676: Failed to parse configuration
Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1348,9]
Message: JBAS014664: An element of this type named 'foo' has already been declared
Copy/paste error in the error message in the previous comment (that error was from a test with a different runtime-name).
The actual error message is "An element of this type named 'bar' has already been declared" for the listed test case.
The BZ 983980 fix also introduces a regression in the behavior of standalone servers. The check for a unique runtime name should only involve deployments that are enabled.
Marking for inclusion in the 6.2.1 Release Notes documentation.
Verified with 6.2.1.CP.CR1-patch.