[
https://issues.apache.org/jira/browse/TUSCANY-3877?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13050964#comment-13050964
]
Mike Edwards commented on TUSCANY-3877:
---------------------------------------
I think that the key material is in section 4.15:
1208 3. remove any policySet where the policySet does not apply to the target
element.
1209 It is not an error for a policySet to be attached to an element to which
it doesn’t apply.
So, no policySet gets used on a binding or on an implementation unless
@appliesTo for that policySet includes that binding or implementation.
So there is no "push down" in that sense. Ancestor policySets are gathered for
consideration for a given binding or implementation (there is push down in that
sense) but if they dont apply to the element under consideration, they are
ignored.
As it says here:
391 Rather, policySets always apply to either binding instances or
implementation elements regardless of
392 where they are attached.
PolicySets are applied either to bindings or to implementations - they have no
use anywhere else - so a policySet saying @appliesTo="//service" (say) is going
to get left on the floor.
> Policy appliesTo processing doesn't match the approach we now have of
> aggregating policy on endpoints/endpointreferences
> ------------------------------------------------------------------------------------------------------------------------
>
> Key: TUSCANY-3877
> URL: https://issues.apache.org/jira/browse/TUSCANY-3877
> Project: Tuscany
> Issue Type: Bug
> Components: Java SCA Policy
> Affects Versions: Java-SCA-2.0-M5
> Reporter: Simon Laws
> Assignee: Simon Laws
> Fix For: Java-SCA-2.0
>
>
> There are two issues with the current appliesTo processing in
> PolicyAppliesToBuilderImpl
> 1/ For each element that holds a policy set it calculates the appliesTo nodes
> and checks that the current element is in the set. If not the policySet is
> removed from the element. The problem here is that it's checking the
> reference, service and binding nodes when it should be checking the endpoint
> and endpointreference nodes which hold the aggregated set of policy sets at
> this point
> 2/ The spec says.
> "The
> 400 policySet will apply to any child binding or implementation elements
> returned from the expression. So, for
> 401 example, appliesTo="//binding.ws" will match any web service binding. If
> 402 appliesTo="//binding.ws[@impl='axis']" then the policySet would apply
> only to web service bindings that
> 403 have an @impl attribute with a value of 'axis'."
> Is not clear here if a policy set can appliesTo a service, reference or
> component element, rather than a binding or implementation element, in the
> expectation that it will be pushed down to the children. I can understand
> this being the case for attachTo but I don't understand why that would be
> needed for appliesTo.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira