get bundleInfo/bundleContext for classes within a bundle outside activator [message #105526] |
Wed, 27 February 2008 15:53 |
Eclipse User |
|
|
|
Originally posted by: johannes.plassmann.c-lab.de
hi there,
since I'm relatively new to osgi equinox so I have a question concering
bundleContext.
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:
bundle xyz.jar
- activator.java
- class1.java
- class2.java
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
bundle. ...
thanks in advance
..--- johannes
|
|
|
|
Powered by
FUDForum. Page generated in 0.02933 seconds