Which framework implementation are you using?  The setting "framework" as the bundle parent class loader should get you the behavior you want.

Tom
 
 
 
----- Original message -----
From: Eran Twili via osgi-dev <osgi-dev@mail.osgi.org>
Sent by: osgi-dev-boun...@mail.osgi.org
To: Neil Bartlett <njbartl...@gmail.com>, OSGi Developer Mail List <osgi-dev@mail.osgi.org>
Cc:
Subject: [EXTERNAL] Re: [osgi-dev] Parent Class Loader Bootdelegation
Date: Thu, Mar 19, 2020 5:15 AM
 

Thanks Neil,

 

So I understand that "framework" means the ClassLoader that loaded the system bundle and not the system bundle Class Loader itself.

 

That was my initial understanding.

But when I tried to delegate our platform packages via bootdelegation and omitting them from system.packages.extra, I got ClassDefNotFound on them.

 

When I added our platform packages to both bootdelegation and system.packages.extra

That helped for the platform packages (though I have other problems)

That made me think that the "framework" configuration makes bootdelegation delegate to system bundle itself, which in his turn, import them with system.packages.extra and so gets them from the class loader that loaded him.

 

Hope I didn’t confused you.

 

Eran

 

From: Neil Bartlett <njbartl...@gmail.com>
Sent: Thursday, March 19, 2020 11:46 AM
To: Eran Twili <eran.tw...@niceactimize.com>; OSGi Developer Mail List <osgi-dev@mail.osgi.org>
Subject: Re: [osgi-dev] Parent Class Loader Bootdelegation

 

It looks like you have answered this yourself: "framework" delegates to the classloader that loaded the system bundle, i.e. the OSGi Framework.

 

Bear in mind that that classloader would normally perform parent delegation up the chain, unless you have implemented alternative custom behaviour in any of those classloaders.

 

Neil

 

On Thu, 19 Mar 2020 at 09:42, Eran Twili via osgi-dev <osgi-dev@mail.osgi.org> wrote:

Hi,

 

We're embedding OSGi inside an outer application.

Our hosting application (platform) creates several class loaders beneath the jvm system class loader, and from one of them the OSGi FW is created.

Class loader hierarchy something like:

jvm boot -> jvm ext -> jvm system -> custom1 -> custom2 -> custom3 -> OSGi FW (aka system bundle)

 

We now experience problems with our platform Profiler.

How can I make the bootdelegation to delegate to the class loader that loaded the OSGi FW?

org.osgi.framework.bundle.parent = ???

to my understanding,

setting "app" will delegate to the jvm system class loader.

setting "framework" will delegate to the system bundle.

 

Thanks,

Eran

 


Confidentiality: This communication and any attachments are intended for the above-named persons only and may be confidential and/or legally privileged. Any opinions expressed in this communication are not necessarily those of NICE Actimize. If this communication has come to you in error you must take no action based on it, nor must you copy or show it to anyone; please delete/destroy and inform the sender by e-mail immediately. 
Monitoring: NICE Actimize may monitor incoming and outgoing e-mails.
Viruses: Although we have taken steps toward ensuring that this e-mail and attachments are free from any virus, we advise that in keeping with good computing practice the recipient should ensure they are actually virus free.

_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev


Confidentiality: This communication and any attachments are intended for the above-named persons only and may be confidential and/or legally privileged. Any opinions expressed in this communication are not necessarily those of NICE Actimize. If this communication has come to you in error you must take no action based on it, nor must you copy or show it to anyone; please delete/destroy and inform the sender by e-mail immediately. 
Monitoring: NICE Actimize may monitor incoming and outgoing e-mails.
Viruses: Although we have taken steps toward ensuring that this e-mail and attachments are free from any virus, we advise that in keeping with good computing practice the recipient should ensure they are actually virus free.

_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev 
 

_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to