This sounds quite reasonable. I am all for not complicating the SPI if we don't have to. But this does mean that we can't just revert back to the previous state of statically created references, as the lazy creation of invocation chains seems to be something we did not have. Let me know if you or Raymond would like to take care of this or I should go ahead and do it. If I understand you correctly, the notification binding should work without any further chnage once your suggestion is in place.
On 9/10/07, Jean-Sebastien Delfino <[EMAIL PROTECTED]> wrote: > > Comments inline. > > [snip] > Raymond Feng wrote: > > > >> > >> What do you mean by "a reference can be dynamically created"? can you > >> please describe the scenario you have in mind? > >> > > > > There are a few cases: > > 1) SCADomain.getService() will create self reference > > 2) ComponentContext.createSelfReference() > > 3) ComponentContext.getService() (if the business interface is not the > > same as the reference) > > 4) Rebind a reference to a target > > > > OK I see now. So, we have two cases: > > (A) a reference is statically declared on a component > ==> The binding provider(s) for the reference binding(s) should be > started when the component is started. The actual sequence is: > 1. the component is created > 2. the reference is created > 3. the reference is started > 4. the component is started > > (B) a "floating" reference is created > ==> The binding provider(s) for the reference binding(s) should be > started just after the reference is created. > 1. the reference is created > 2. the reference is started > > Invocation chains can be created whenever we want (lazily on first > invocation if we wish) as they have no lifecycle attached to them > > I think that this resolves the binding.notification issue (getting > started early), while accommodating for dynamically created references, > and without complicating the SPIs with another option. > > At this point and for our upcoming 1.0 release I'd like to apply the > Ockam's Razor principle [1] to our SPIs and keep them as slim and simple > as possible :) > > [1] http://en.wikipedia.org/wiki/Occam%27s_razor > > -- > Jean-Sebastien > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >