Hello,
we are trying to configure the pax logging service in our applications.
we are currently use the following bundles:
1 ACTIVE org.ops4j.pax.logging.pax-logging-api_1.3.0
[...]
10 ACTIVE org.ops4j.pax.logging.pax-logging-service_1.3.0
We use org.osgi.service.cm.ConfigurationAdmin to get the current
configuration linked to service.pid=org.ops4j.pax.logging which is
registered in the framework under the ManagedService service as the
documentation of pax logging says.
First, we retrieve the Configuration admin service:
private ConfigurationAdmin _confAdmin = null;
[...]
protected void activate(ComponentContext context){
_confAdmin = (org.osgi.service.cm.ConfigurationAdmin)
context.locateService("CONFIGURE");
Configuration config = null;
try {
config =
_confAdmin.getConfiguration("org.ops4j.pax.logging",null);
if ( config == null){
System.out.println(" config NULL");
}
else {
Dictionary props =
config.getProperties();
...
The issue is that no configuration is got with this service.pid.
If we use the same code with another service registered under
ManagedService with another service.pid , the configuration is
retrieved properly.
has anybody any hints about this?
thank you in advance,
M
_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev