[jboss-jira] [JBoss JIRA] (WFCORE-1161) Simplification of setCapabilityReference where resource only exposes a single capability.
Brian Stansberry (JIRA)
issues at jboss.org
Tue Nov 24 19:22:00 EST 2015
[ https://issues.jboss.org/browse/WFCORE-1161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13133544#comment-13133544 ]
Brian Stansberry commented on WFCORE-1161:
------------------------------------------
https://github.com/wildfly/wildfly-core/compare/master...bstansberry:WFCORE-1161 should do the trick.
Two mildly doubtful things about it:
https://github.com/wildfly/wildfly-core/compare/master...bstansberry:WFCORE-1161#diff-340f1dd448e96a0a6a57e4028fb436faR53 and a bit below. 2 CapabilityReferenceRecorder methods can no longer be supported. Probably best we didn't use them. I think I sense an "I told you so" coming from Tomaz. ;)
2) This requires that the address of the currently executing step be the same as that of the dependent resource. In practice when CapabilityReferenceRecorder is called that is the case, and I don't have any plan for something else, but my foresight isn't 20/20.
I don't think either of these are that big of a deal, but I'm just barely uncomfortable enough that I won't send up a PR right now. It's PTO/holiday time anyway.
> Simplification of setCapabilityReference where resource only exposes a single capability.
> -----------------------------------------------------------------------------------------
>
> Key: WFCORE-1161
> URL: https://issues.jboss.org/browse/WFCORE-1161
> Project: WildFly Core
> Issue Type: Enhancement
> Components: Domain Management
> Reporter: Darran Lofthouse
> Assignee: Brian Stansberry
> Labels: affects_elytron
>
> Currently we need to use the following method to specify that one of our attributes is a reference to another capability: -
> {code}
> public BUILDER setCapabilityReference(String referencedCapability, String dependentCapability, boolean dynamicDependent) {
> referenceRecorder = new CapabilityReferenceRecorder.DefaultCapabilityReferenceRecorder(referencedCapability, dependentCapability, dynamicDependent);
> return (BUILDER) this;
> }
> {code}
> However the resource has already indicated the capability it provides and indicated whether it is dynamic so the last two parameters duplicate this information.
> This makes it much harder to re-use attribute definitions across different resources as even though they may reference the same time they now contain information about the resource they are used within.
> As discussed previously there is still the case that a single resource could provide multiple capabilities and this additional information may be required to clarify which capability it is in relation to but in general if a resource only provides a single capability we should be able to detect that without the additional information on the attribute.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list