Hi David,

I don't understand why a bundle which would like to receive
Configurations (by registering a ManagedService) needs to change the
behavior ?

All the bundle should do is just registering a ManagedService whether cm
bundle is active or not.

On the other hand, if you would like to implement a bundle which
configures a Configuration, the bundle must tracks ConfigurationAdmin
service and get it when it gets available.

Best regards,

---------------------
NTT Cyber Solutions Laboratories

     Ikuo YAMASAKI
        E-mail: [email protected]
TEL +81-46-859-8537  FAX +81-46-855-1282 


On Thu, 12 Nov 2009 20:17:20 -0800
David Bosschaert <[email protected]> wrote:

David> Hi all,
David> 
David> I have a bundle that can be configured through Configuration Admin. 
David> However when CA is *not* present it can still function using default 
David> behaviour.
David> 
David> Question 1: What would be the best way to let it check that the 
David> Configuration Admin service is not present, so that it can proceed with 
David> its default behaviour?
David> 
David> Question 2: I would really like it to have an *optional* dependency on 
David> org.osgi.service.cm. but still my code provides a class that implements 
David> org.osgi.service.cm.ManagedService I guess this should be possible, 
David> right? I was thinking of the following algorithm:
David> 
David> If Not Config Admin Present then
David>   default behaviour
David> else
David>   register MyManagedService // only at this point the ManagedService 
David> class gets loaded
David>   ... handle configuration as soon as updated() gets called.
David> 
David> Is this a feasible approach?
David> 
David> Thanks,
David> 
David> David
David> 
David> 
David> _______________________________________________
David> OSGi Developer Mail List
David> [email protected]
David> https://mail.osgi.org/mailman/listinfo/osgi-dev
David> 
David> 


_______________________________________________
OSGi Developer Mail List
[email protected]
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to