Comments inline. [snip] Simon Laws wrote:
Currently getServiceReference() expects a service name so we can rely on the implication that all contributed composites are notionally included into the domain level composite to reference a component and extend Sebastien's process to say.
Just to make sure it's clear, as I'm not sure I completely follow the above sentence, components deployed to other nodes will not be present in the in-memory composite model kept in an SCAdomain object.
1. look for the target component model object in the in-memory domain composite kept in SCADomain if found 2. look for the target service on that component 3. find on that component the self-reference created for that service (these self-references are automatically created by CompositeBuilder for each service provided by a component) 4. create a CallableReference for that self-reference 5. get a proxy to the service from the CallableReference else 2. look for the named component/serivce in other nodes of the distributed (cross JVM) domain I am working up some interfaces to allow this to happen in the distributed domain case, for example, http://svn.apache.org/repos/asf/incubator/tuscany/java/sca/modules/distributed/src/main/java/org/apache/tuscany/sca/distributed/management/ServiceDiscovery.java Not implemented just yet as I'm currently looking at the sca domain implementation but you get the idea. The implementation could use some simple repository implementation or could derive the information from file. 3. Create a local reference for the remote service
Your if/else proposal looks good to me.
Not sure of the details here but you both seem happy that this is straightforward. The thing that does look problematic is determining the binding.
Not so problematic if it's part of the info returned by your ServiceDiscovery :)
In the distributed case I assume that all cross JVM messaging are handled by the sca binding.
No, any binding can be used inside an SCA domain.
Are you expecting that you can do a getService for a non-wired service, i.e. a service with an explicit remote binding such as binding.ws, that is running in another VM.
Not sure what you mean by a non-wired service. Services with binding.ws can be wired too.
If so that we will need, as Sebastien suggests, to be able to get hold of more information about the remote component than I have taken account of to date so that a partial model can be constructed in order to create the correct binding.
Yes :)
4 & 5 as above Simon
-- Jean-Sebastien --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]