tags:

views:

20

answers:

1

Hi folks,

If:

  • I have a bundle I wish to run on n OSGi containers exporting some service;
  • I am using DS to register the modified method for when configuration changes, so I can update the service via ConfigurationAdmin, and to export the interfaces remotely as per RFC119;
  • I am using Discovery to call those services from other bundles on other boxes, is it possible to have a central configuration for this service using ConfigurationAdmin, so that I can publish a configuration change via the Configuration Admin and it is received by all instances of the service running?

It seems from everything that I have read that ConfigurationAdmin is not network aware, and is local to each OSGi container?

Thanks for your insight in advance :)

A: 

So your bundle runs on N containers, exports its service to that local container only, and it exports ManagedService using remote services to publish it to some "central" container that has ConfigurationAdmin running?

You are right that ConfigurationAdmin is not network aware, but if the bundle remotely publishes its ManagedService to that container running Configuration Admin it should work. The only caveat is that each ManagedService must have a unique service PID so you cannot simply publish the same bundle in N containers unless you ensure that each instance ends up using a unique PID.

Marcel Offermans