Isn't it possible to specify via the "Import-Package" configuration element
which packages are to be loaded from the underlying class loader/bundle
class loader? 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Felix
Meschberger
Sent: Wednesday, April 11, 2007 7:42 PM
To: felix-dev@incubator.apache.org
Subject: Re: Embedded Felix

Hi Asaf,

The main problem you would probably face when getting your hands on
something inside the OSGi framework is ClassLoading issues: You will have to
use a class (usually and interface) which is loaded from a class laoder
commoner to both the OSGi framework and the "outer world".

On the other hand, you might want your inside objects make themselves known
to the outside world through - for example - a bridge service, which is
registered by a BundleActivator given to the Felix constructor. This is how
the Equinox HttpService to Servlet bridge works.

The details - as always - depend on what exactly you want to achieve.

Anyway, I would not hold on to the BundleContext given to an Activator for
this.

Hope this helps a bit.

Regards
Felix

On 4/11/07, Asaf Lahav <[EMAIL PROTECTED]> wrote:
>
> Hi everybody,
>
>
>
> I am running Felix as an Embedded OSGi framework.
>
> What would be the best way for components outside of the OSGi boundaries
> to
> consume OSGi bundles and service references?
>
> In other words, would it be bad design to maintain a singleton instance of
> a
> context handle I get in my custom activator?
>
> If it is, what would be a better design?
>
>
>
> Thanks in advance,
>
> Asaf
>
>

Reply via email to