[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] Consume service that has been marked as 'remote' , locally

Hi Pradeep,

This is really something for DS. See chapter 112 of this: http://www.osgi.org/download/r4v42/r4.cmpn.pdf

In short, It depends on how you consume the service.

If you use a service tracker or a service listener you can specify a filter or query the service properties when a service comes in.
If you ask the service registry you can specify the properties you want or don't want.
If you use the referenced service in the component.xml then you can specify the filter in the "target" field. (see 112.3.4 of the forementioned manual)

Best regards,

Wim

On Sun, Apr 24, 2011 at 8:14 PM, Pradeep Fernando <pradeepfn@xxxxxxxxx> wrote:
Hi all,

I did a small test related to above query. When i run the client
within the same JVM process, that exports the interface as remote
services, I got this object reference through ds,

IHello=org.eclipse.ecf.examples.internal.remoteservices.hello.ds.host.HelloComponent@40e99ce5

while remote service client (another JVM process) giving this as the output,

IHello=org.eclipse.ecf.examples.remoteservices.hello.IHello.proxy@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx[containerID=StringID[ecftcp://localhost:3787/server];containerRelativeID=1]

So it is safer assume that, zeroconf does not affects my default
behaviour. So that solves my first question I guess. :)

but I cant figure the answer for my second question, how to address
the exact service through DS when you have both remote and local
services registered under same interface (Name).

thanks,
--Pradeep.
_______________________________________________
ecf-dev mailing list
ecf-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/ecf-dev