On Tue, Jun 21, 2011 at 2:05 PM, Simon Laws <simonsl...@googlemail.com> wrote: >> The spec could certainly stand to be a bit more explicit here. :) It >> does seem to make more sense to limit it to bindings and >> implementations, so I agree that we should look into changing the >> appliesTo builder. I do notice there are several compliance tests >> using @appliesTo attributes that specify service, component, or >> composite, though (POL_4005 through 4009.) >> > > Ok, that's interesting. I think we should check with OASIS before > making further changes. I'll see if I can track down someone. > > Simon > > -- > Apache Tuscany committer: tuscany.apache.org > Co-author of a book about Tuscany and SCA: tuscanyinaction.com >
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. Regards Simon -- Apache Tuscany committer: tuscany.apache.org Co-author of a book about Tuscany and SCA: tuscanyinaction.com