|Platform wide DebugOptionsListener [message #892426]
||Thu, 28 June 2012 08:08
Registered: July 2009
The OSGi based trace feature is really cool. However, the current implementation (as far as I understand) requires that every bundle writes some boiler plate code to enable tracing (to check if the option is enabled or not etc.). I am planning to move this into a central component and cache the queried options. I can, as recommended, use a DebugOptionsListener to invalidate/update my cache. The problem is that the listener is registered based on the symbolicname of the bundle and only the registered DebugOptionsListener for the particular bundle will be called incase of changes. This of course makes sense. Additionally, is it possible to provide a feature such that I can register a DebugOptionsListener with "*" as symbolicname and it gets invoked for changes in options for any bundle?
Dictionary<String, Object> props = new Hashtable<String, Object>(4);
context.registerService(DebugOptionsListener.class.getName(), new OwnDebugOptionsListener(), props);
Or is there a better way of doing this already without having to register listeners for each bundle?
Thanks in advance.
Powered by FUDForum
. Page generated in 0.18607 seconds