Simon Laws wrote:
On Nov 17, 2007 6:21 PM, Jean-Sebastien Delfino <[EMAIL PROTECTED]>
wrote:

Simon Laws wrote:
Should the domain api allow users to create service references to
services
that don't exist in the domain yet. Currently they can and they get an
exception if they try and use it. This is consistent with the way that
references are injected into components work. I'm comfortable with it
but
I'm raising it as it's potentially slightly counter intuitive for the
api
user.

Regards

Simon


Which API are you talking about?

--
Jean-Sebastien


For example,     public <B> B getService(Class<B> businessInterface,
String serviceName);

Simon



I think we need to distinguish between "existent" and "started":
- existent meaning "added to the domain"
- started meaning "currently running on a node in the domain"

With that distinction:
- adding to the domain a component with a reference to a non-existent service should give a warning - starting a component with a reference to a non-existent service should give an error - starting a component with a reference to an existent but not started service should work

Similarly, and since getService is an API involving running code:
- getService() of a non-existent service should give an error
- getService() of an existent but not started service should work

Finally getService of an existent and started service should work as well, hopefully :)

--
Jean-Sebastien

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

Reply via email to