Search code examples
osgiequinoxdeclarative-serviceseclipse-ecfr-osgi

Remote Declarative Services In Equinox


I'm trying to provide a remote declarative service using Eclipse ECF. In the service provider component definition, I have set the following properties:

service.exported.interfaces = *
service.exported.configs = ecf.generic.server
ecf.generic.server.id = ecftcp://localhost:3787/server

However I can't figure out how to discover the service using these properties from the consumer side.
(I want to be able to provide the service from one osgi environment and discover it from another osgi.)


Solution

  • Discovery will run automatically if you have specified "service.exported.interfaces". For this to work you need to have the ECF discovery bundles installed in both your targets. On top of this you have to choose a discovery provider. Like SLP, JmDNS or Zookeeper.

    Please note that some discovery providers need additional properties to run correctly. For example if you have a double network you need to specify in the JmDNS provider on which network the discovery has to listen.

    Make sure that the ECF distribution bundle is started. This does not start automatically.