Hi,

Comments inline.

Thanks,
Raymond

----- Original Message ----- From: "Jean-Sebastien Delfino" <[EMAIL PROTECTED]>
To: <tuscany-dev@ws.apache.org>
Sent: Wednesday, September 05, 2007 1:31 PM
Subject: Re: Issue with dynamic creation of NotificationReferenceBindingProvider


Raymond Feng wrote:
Comments inline.

Thanks,
Raymond

----- Original Message ----- From: "Jean-Sebastien Delfino" <[EMAIL PROTECTED]>
To: <tuscany-dev@ws.apache.org>
Sent: Wednesday, September 05, 2007 9:03 AM
Subject: Re: Issue with dynamic creation of NotificationReferenceBindingProvider


[snip]
Raymond Feng wrote:
At this moment, the code works as Ignacio described. We defer the activation of a reference to the first time it's used for invocation. If we decide that we need to agressively start the reference bindings, we can add the part back to CompositeActivatorImpl.

Thanks,
Raymond


I think we need to activate references when the component that owns them is activated, to keep the semantics of of start()/stop() clear, and allow providers to perform any initialization they need on references (which are not so different from services in many aspects).

There are some differences. A reference can be dynamically created and it is possible that a reference binding won't be selected at all.

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


As a balance, can we do the following?

1) During the activation of a component, we add the reference binding providers to the defined references. Then the binding provider will have a chance to do some initialization (for example, handle subscription).

Do you mean in its constructor?

Yes.



2) When the reference is used for invocation, we start the binding provider (further initilization can be performed at this time) and create the wire/invocation chains.

Thanks,
Raymond


--
Jean-Sebastien


--
Jean-Sebastien


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to