[jsr-291-eg] SPIs [was: Re: Current status and next steps]

Andy Piper andyp at bea.com
Fri Apr 21 11:07:18 EDT 2006

One example is the inability to get a BundleContext given a Bundle.
This is a problem when you want to write a BundleListener that somehow
deploys new services as bundles are deployed (DS does exactly this).
The way that DS gets around this is by using the following Equinox
specific hack:

BundleContext getBundleContext(final Bundle bundle) {
If (System.getSecurityManager() == null) {
   return (BundleContext) invokeMethod(bundle, "getContext", null, null);

This means that their DS implementation is specific to Equinox and won't
run in other OSGi environments.


Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

More information about the jsr-291-eg mailing list