Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [riena-dev] Remote Services from updated Configurations of Managed Services

Christian Campo schrieb:
Hi Ekke,

I think this is a misconception about what properties are and what configuration is. Properties is a dictionary of key value pairs associated with that service. Configurations are also key values pairs but they are not the same (semantic wise) as the service properties.

In your example Service X (or better Instance X) is registered with Interface A. Now the same instance X also registers with Interface ManagedService. These two have no relationship (even though they are two registeration about the same instance).

Instance X registered with Interface A can have a set of Properties, which I believe are immutable.
yes
So you cant chance the properties of a registered service. You can change its configuration, but these are two things.

My recommendation. Register your Instance X with the Interface ManagedService.
this is done by Easybeans - so I cannot change this

I'm getting a service like this:

{org.ekkehard.abc.dataManager.mitarbeiter.FahrerRemoteManagerI, org.osgi.service.cm.ManagedService}={service.pid=org.ekkehard.abc.dataManager.mitarbeiter.FahrerRemoteManagerI:FahrerManagerBean, ejb.id=14631706, ejb.classname=org.ekkehard.abc.dataManager.mitarbeiter.FahrerManagerBean, ejb.name=FahrerManagerBean, ejb.interface=org.ekkehard.abc.dataManager.mitarbeiter.FahrerRemoteManagerI, ejb.container.name=org.ekkehard.abc.dataManager, service.id=904} Registered by bundle: initial@reference:file:../../ekkehard/plugins/org.ekkehard.abc.dataManager_1.0.0.jar/ [51]
 Bundles using service:
initial@reference:file:../../ekkehard/plugins/org.ekkehard.server_1.0.0.jar/ [7]

all the ejb.xxx properties are properties set from easybeans while initializing the EJB Container and registering Services for my EJB Interfaces. these Interfaces are the same I'll propagate to Riena for use as remote Interfaces
As soon as you get the configuration through the ManagedService interface, the instance itself registers itself with Interface A and with the set of properties it receives. For each and every update of the configuration you unregister and register again.

that should work
ok - hope I understand you right and  I'll try it...

I thought I could avoid registering the service for the interface again
thanks for clarifying - in the meantime I learned much about ConfigAdmin Services ;-)

ekke


Back to the top