-
1. Re: HOWTO chage the behaviour of the CL policy
adrian.brock Aug 25, 2009 9:31 AM (in response to thomas.diesler)This test is currently broken for me.
But if there is a PackageRequirement there should be a delegate
(which the OSGi spec calls a "wire").
Although you have put some code that weeds out system packages that I don't understand?
My understanding was that non-core api had to be referenced using Import-Package
e.g. the logging or compendium api.
and that this would resolve to the implementing (extension) bundle - possibly the system bundle? -
2. Re: HOWTO chage the behaviour of the CL policy
thomas.diesler Aug 25, 2009 12:26 PM (in response to thomas.diesler)
My understanding was that non-core api had to be referenced using Import-Packag
Actually core API needs to have a wire too. That is why Felix and Equinox ship their frameworks as bundles that contain the core packages and versions in Export-Package directives.
This proper fix would probably be to install some global PackageCapabilities that correspond to the system packages that are configured in the SystemPackagesPlugin -
3. Re: HOWTO chage the behaviour of the CL policy
adrian.brock Aug 26, 2009 6:09 AM (in response to thomas.diesler)So let's do it the same way. I haven't really looked at this part of the spec yet
but its certainly something I planned to address.
There's no reason why the SystemBundle classloader couldn't be defined in the
bootstrap to expose the osgi core packages (and maybe some services)
instead of letting them bubble up to the "classpath" using the parent policy.
The other services would just be deployed as bundles.
i.e. just make the parent policy in OSGiClassLoaderSystem
ParentPolicy.BEFORE_BUT_JAVA_ONLY
then have the following in the bootstrap.xml to be the "system bundle classloader"<deployment xmlns="urn:jboss:bean-deployer:2.0"> <classloader><inject bean="system-bundle:4.4.2" /></classloader> <classloader name="system-bundle" version="4.4.2" xmlns="urn:jboss:classloader:1.0" > <root>${jboss.lib.url}osgi-core.jar</root> <root>${jboss.lib.url}jboss-osgi-impl.jar</root> <capabilities> <package name="org.osgi.framework" version="1.4.0"/> <package name="org.osgi.service.packageadmin" version="1.2.0"/> <etc./> </capabilities> </classloader>