felix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ext2" <x...@tongtech.com>
Subject Re: How to specify a custom class loader as embedded felix's parent class loader?
Date Tue, 21 Jun 2011 10:25:00 GMT
Thanks Richard S. Hall.

>The framework class must be loaded by a class loader by definition

What's "definition" really means?

> There is no standard way to define the framework class loader or its
> parent. I don't think it would be possible to do this. However, it is
> possible to define the parent class loader for bundles
> (org.osgi.framework.bundle.parent or something property). This value is
> only important when it comes to boot delegation, which generally isn't
> used since it isn't very modular.
>
Is there any resource, I could find the exact property name? It seems this
is what I want: passing  the host application's class loader to Felix, and
use it as system bundle's parent class loader. 

> -----Richard -----
> Sender: Richard S. Hall [mailto:heavy@ungoverned.org]
> Date: 2011/6/21 17:16
> Receiver: users@felix.apache.org
> Subject: Re: How to specify a custom class loader as embedded felix's
parent class
> loader?
> 
> On 6/21/11 10:55, ext2 wrote:
> > Hi:
> > 	I am trying to embedded a felix framework in a application.
> > But the application will create a custom class loader, as make the
launched
> > felix to  use the class loader as its parent class loader.
> >
> > 	1) Could anyone help me to explain how Felix framework know which
> > class loader is it's parent class loader? the caller's class loader,
thread
> > context class loader or something else?
> 
> The framework class must be loaded by a class loader by definition. This
> is the class loader that the framework will delegate to when it comes to
> exposing "system" packages.
> 
> > 	2) Is the way of choosing classloader used by felix same as equinox?
> > Does OSGI specification defined this?
> 
> There is no standard way to define the framework class loader or its
> parent. I don't think it would be possible to do this. However, it is
> possible to define the parent class loader for bundles
> (org.osgi.framework.bundle.parent or something property). This value is
> only important when it comes to boot delegation, which generally isn't
> used since it isn't very modular.
> 
> -> richard
> 
> > 	Thanks any suggestion
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > For additional commands, e-mail: users-help@felix.apache.org
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Mime
View raw message