[JBoss JIRA] Created: (JBAS-6914) useJBossWebLoader not working when set to true
by Peter Johnson (JIRA)
useJBossWebLoader not working when set to true
----------------------------------------------
Key: JBAS-6914
URL: https://jira.jboss.org/jira/browse/JBAS-6914
Project: JBoss Application Server
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: ClassLoading
Affects Versions: JBossAS-5.1.0.CR1, JBossAS-5.0.1.GA
Environment: any
Reporter: Peter Johnson
Assignee: Scott M Stark
The description for useJBossWebLoader in server/xxx/deployers/jbossweb.deployer/META-INF/war-deployers-jboss-beans.xml indicates that if it is set to true, then classes packaged within the WAR file should be visible to classes outside the WAR file. For AS 4.2.3, that is the case. However, for 5.0.1 and 5.1.0.CR1 it is not the case. Seems like a feature of prior versions that did not survive the move to the new vfs classloaders.
As a test case, download the source code for JBoss in Action from http://code.google.com/p/jbia/downloads/list. Open the jbia-src/index.html file and follow the setup instructions. Then build target 01 in the jbia-src/ch03 directory. Try different values for useJBossWebLoader, using Scenario C to test it - you should get a clean response with no exceptions when useJBossWebLoader is set to true, and and exception when it is set to false.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 10 months
[JBoss JIRA] Created: (JBCL-115) Module adds invalid delegates
by Thomas Diesler (JIRA)
Module adds invalid delegates
-----------------------------
Key: JBCL-115
URL: https://jira.jboss.org/jira/browse/JBCL-115
Project: JBoss ClassLoader
Issue Type: Bug
Reporter: Thomas Diesler
Fix For: JBossCL.2.0.7.GA
Consider this use case
ExportImportPackageUnitTestCase.testSelfImportPackage
//Bundle-Name: BundleB
//Bundle-SymbolicName: org.jboss.test.osgi.classloader.bundleB
//Export-Package: org.jboss.test.osgi.classloader.support.b
//Import-Package: org.jboss.test.osgi.classloader.support.a
//Bundle-Name: BundleA
//Bundle-Version: 1.0.0
//Bundle-SymbolicName: org.jboss.test.osgi.classloader.bundleA
//Export-Package: org.jboss.test.osgi.classloader.support.a, org.jboss.test.osgi.classloader.support.b
//Import-Package: org.jboss.test.osgi.classloader.support.a, org.jboss.test.osgi.classloader.support.b
BundleB imports PackageA from BundleA, but *not* PackageB.
Classes in PackageB are expected to get loaded from the bundle that the class load is initiated from.
bundleB.start();
assertEquals("Bundle ACTIVE", Bundle.ACTIVE, bundleB.getState());
// BundleA is expected to resolve when BundleB gets started
assertEquals("Bundle RESOLVED", Bundle.RESOLVED, bundleA.getState());
assertLoadClass(bundleA, A.class, bundleA);
assertLoadClass(bundleA, B.class, bundleA);
// BundleB imports A from BundleA
assertLoadClass(bundleB, A.class, bundleA);
// BundleB does not import B
assertLoadClass(bundleB, B.class, bundleB);
---------------------
The code in Module.addDelegates(...) incorrectly adds the DelegateLoader from the dependent module irrespectively of the packages that are actually being imported. this effectively makes makes all the packages from BundleA visible to BundleB
Module other = item.getModule();
DelegateLoader delegate = iDependOnModule.getDelegateLoader(other, requirement);
// Check for re-export by the module
if (requirement.wantReExports())
addDelegates(iDependOnModule, delegates, dynamic, visited, true);
// We want a module's re-exports (i.e. part of its imports) before the module itself
if (delegate != null)
delegates.add(delegate);
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 10 months