...@frankjlangel.com
To: osgi-dev@mail.osgi.org
Date: 2015/05/20 11:14
Subject:[osgi-dev] Change service properties using OSGI API
Sent by:osgi-dev-boun...@mail.osgi.org
Hi,
I would like to change and add properties to an OSGI service. The only way
I know requires access
If you're not using DS or a similar approach to reflect config admin
configurations as service properties you can't really change them as
you correctly observe that you can't obtain the Service Registration.
An alternative approach that you could take is to shadow/proxy the
service registration
The question does arise, why exactly do you want to do this?. I felt
such a need once in the past, but ended by deciding that actually it
wasn't such a good idea. If you want to use this to for indicate that for
example a component has switched from active to standby mode then you may
find you
Hi,
I would like to change and add properties to an OSGI service. The only way I
know requires access to the ServiceRegistration object of the service
instance.
However, this ServiceRegistration object cannot be retrieved from the OSGI
registry, but is returned only when we register the service
Hi Frank,
If you use Declarative Services to publish your service object then you can
easily change its service properties at runtime using Config Admin. Every DS
component has an associated PID (it defaults to the name of the component) and
any public configuration properties (i.e. ones that