.. meanwhile... I have started to make some changes locally to see if what I am proposing about pulling the builder into a module and using the wirters to write relevant fragments of SCDL, is feasible...
- Venkat On Feb 5, 2008 3:52 PM, Venkata Krishnan <[EMAIL PROTECTED]> wrote: > On Feb 5, 2008 2:38 PM, Jean-Sebastien Delfino <[EMAIL PROTECTED]> > wrote: > > > Venkata Krishnan wrote: > > > From the history of this mail, I suspect that you haven't got my post > > in > > > http://www.mail-archive.com/tuscany-dev%40ws.apache.org/msg27575.html. > > I am > > > certainly eager to fix this. Let me know your thoughts on what I > > have > > > asked there. Thanks. > > > > > > > Sorry, it's weird, I never received your post. > > > > > Venkata Krishnan wrote: > > > The only issue standing in the way is of how we get hold of the SCDL > > > over which the xpath in 'appliesTo' can be applied. I'd like to use > > > our assembly model writers to write back an SCA artifact (component > > or > > > service ... ) as XML and then apply the xpath in appliesTo over this > > > XML. All this must be done in the policyset matching phase. > > > > Reading the composite file / building its model / re-writing it to > > finally apply the xpath sounds very complicated. > > > > > As an application developer I'll write the appliesTo xpath to match what > > I see in a composite XML file. Why can't we simply run the xpath on that > > original XML file before doing all the other steps? > > > > We will not be writing the entire composite, but only a fragment that is > the parent of the intentAttachPoint. Here is what the spec says : - > > 283 ..................................................Note that the XPath > expression will always be evaluated > 284 within the context of an attachment considering elements where binding > instances or > 285 implementations are allowed to be present. The expression is evaluated > against the parent element > 286 of any binding or implementation element. > .......................................................... > > But then, it seems like we may have to look beyond the immediate parent or > maybe the entire composite if your proposal is to be taken. I'd like to > hear some perspectives from the specs folks on this. > > Now, getting to your question more specifically on why this must be done > post-build phase, here it is.... > - Firstly we need the PolicySet definitions to get hold of the > 'appliesTo'. > - For PolicySets that are specified in the composite, they are resolved > during the resolution phase. > - For those that have to be calculated based on the Intents specified, > there needs to be a complete assembly model that is wired, since we also > need to take into account the target's intents. This wiring is being done > on the 'wireComposite' method of the CompositeWireBuilder. > - So the calculation of PolicySets is pushed to this point i.e. its being > done as part of the 'wireComposite' method, the moment the model has all its > connections resolved. > - Only after the PolicySets are calculated, do we have a handle on the > 'appliesTo' attribute of the PolicySets. > > Let me know if you like me to explain a little more. Thanks > > - Venkat > > > > > > > > -- > > Jean-Sebastien > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > >