|get bundleInfo/bundleContext for classes within a bundle outside activator [message #105526]
||Wed, 27 February 2008 15:53
Originally posted by: johannes.plassmann.c-lab.de|
since I'm relatively new to osgi equinox so I have a question concering
I'm looking out for a method within api,
which allows me to retrieve a bundleContext within a bundle
but outside the activator.
imagine following scenario:
activator implements BundleActivator,
so activator.java gets info on bundleContext via start/stop methods.
class1 and class2 should have access to a bundlecontext but without
having to implement a method to inject a context obj.
I looking out for methods like:
1. retrieve the framework singleton or get a pointer to the service registry
2. retrieve a bundle (getBundle ("<className or bundleSysmbolicId>") )
3. get the current context for this bundle
so something similar to:
Bundle bundle = Framework.getBundle(<bundleName/className>)
go on further with
thanks in advance
Powered by FUDForum
. Page generated in 0.01932 seconds