[jboss-jira] [JBoss JIRA] (WFLY-2865) AttributeTransformationRule "ignored" if op is discarded

Brian Stansberry (JIRA) issues at jboss.org
Tue Feb 4 15:44:28 EST 2014


Brian Stansberry created WFLY-2865:
--------------------------------------

             Summary: AttributeTransformationRule "ignored" if op is discarded
                 Key: WFLY-2865
                 URL: https://issues.jboss.org/browse/WFLY-2865
             Project: WildFly
          Issue Type: Bug
      Security Level: Public (Everyone can see)
          Components: Domain Management
    Affects Versions: 8.0.0.CR1
            Reporter: Brian Stansberry
            Assignee: Brian Stansberry
             Fix For: 8.0.0.Final


Imagine a scenario like the following:

```
parent.addChildResource(RemotingEndpointResource.ENDPOINT_PATH)
                .getAttributeBuilder()
                    .setDiscard(DiscardAttributeChecker.UNDEFINED, RemotingEndpointResource.ATTRIBUTES)
                    .addRejectCheck(RejectAttributeChecker.DEFINED, RemotingEndpointResource.ATTRIBUTES.toArray(new AttributeDefinition[RemotingEndpointResource.ATTRIBUTES.size()]))
                    .end()                .addOperationTransformationOverride(ModelDescriptionConstants.ADD)
                    .inheritResourceAttributeDefinitions()                    .setCustomOperationTransformer(OperationTransformer.DISCARD)
                    .end()
```

The idea is to discard "add" if any parameter is defined, reject otherwise. The legacy slave can ignore the whole resource if it isn't really configured by the user, but any detail config by the user must result in failure.

Problem is AttributeTransformationRule will do a "reject" when it gets a prepared response from the slave, but using setCustomOperationTransformer(OperationTransformer.DISCARD) means the op will be discarded, so there will be no prepared response and thus no rejection.

Solution is to have AttributeTransformationRule register a OperationResultTransformer that deals with this situation.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the jboss-jira mailing list