-
Bug
-
Resolution: Done
-
Major
-
10.0.0.CR4
-
None
When AMQ bridge is created with static-connectors field set, and then static-connectors are undefined and discovery-group is set (in a single batch), following error is thrown:
"WFLYMSGAMQ0069: Attribute (static-connectors) can not been undefined as the resource does not define any alternative to this attribute."
Problem seems to be missing STATIC_CONNECTORS.setAlternatives(CommonAttributes.DISCOVERY_GROUP) in resource definition, which is causing !attr.hasAlternative(resource.getModel()) check to fail in following code:
AlternativeAttributeCheckHandler.java
private void checkAlternativeAttribute(OperationContext context, String attributeName, boolean alternativeMustBeSet) throws OperationFailedException { if (attributeDefinitions.containsKey(attributeName)) { AttributeDefinition attr = attributeDefinitions.get(attributeName); final Resource resource = context.readResource(EMPTY_ADDRESS); if (alternativeMustBeSet) { if (!attr.hasAlternative(resource.getModel())) { throw new OperationFailedException(MessagingLogger.ROOT_LOGGER.undefineAttributeWithoutAlternative(attributeName)); } } else { if (attr.hasAlternative(resource.getModel())) { throw new OperationFailedException(MessagingLogger.ROOT_LOGGER.altAttributeAlreadyDefined(attributeName)); } } } }
- clones
-
JBEAP-1453 Cannot add discovery group to bridge attributes.
- Closed