On Tue, Jun 21, 2011 at 6:59 AM, Simon Laws <simonsl...@googlemail.com> wrote: > Ok, I just checked with Dave Booz from the policy spec team and the > intention is the following: > > - the attachTo and appliesTo processing are independent > - it is binding implementations or implementation type implementations > that act on attached policysets after attachTo and appliesTo have been > resolved > - the appliesTo XPath expression can point to elements other than > bindings or implementation elements in which case you look to the > child elements to find a binding or implementation element > > So, from POL_4005 > > <policySet name="Qual1PolicySet" > provides="test:testImplIntent.qual1" appliesTo="//service" > > attachTo="//sca:component[@name='TEST_POL_4005Component1']/sca:service[@name='Service1']"> > <!-- This policy intentionally left blank --> > </policySet> > > This policySet appliesTo all of the bindings of all of the services in > the composite. > > - you could configure a policy set so that it applies to > implementations and bindings, e.g. set appliesTo to point to a > component, but this is likely to lead to errors as policy sets will > normally be specific to an implementation or a binding. Having said > that in Tuscany the runtime can still treats policy sets somewhat > independently to add generic interceptors to wires so we may still > want to maintain this ability as an extension to the specs > > So in short we do need to rework the appliesTo processing. >
I've reworked things based on this clarification and committed it in rev 1138105. This is causing three new compliance test failures, but I think in all three cases the issue is in the test suite. In POL_4003, "ExtPolicySet" only applies to binding.sca, but the reference where the intent is specified will use binding.ws. In POL_4024, "PolicySet1" only applies to binding.ws, but the reference will use binding.sca. POL_4020 also fails because the appliesTo is not specifying the namespace for binding.sca. This is actually a pretty pervasive problem across many of the policy tests, but seems to only affect this test. Brent