Its not an issue of visibility, its that two classes from the same package can be loaded by different class loaders and package private access fails. I have seen this and the easiest way to cause it is to split the package classes across two jars. An ear should use a common class loader across all manifest references for this reason, and to also allow for ordering of loading. Another problem that we do not have a solution for is loading patch jars ahead of the jars the patch applies to. If you have a third party jar and a patch for the jar the replaces some of the classes, you want to load the classes in the patch jar ahead of the jar being patched. We have no way to specify this currently. If there was a single class loader for all manifest references that honored the order of the jar URLs given in the manifest we could do this.
xxxxxxxxxxxxxxxxxxxxxxxx Scott Stark Chief Technology Officer JBoss Group, LLC xxxxxxxxxxxxxxxxxxxxxxxx ----- Original Message ----- From: "David Jencks" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, August 31, 2002 5:04 AM Subject: Re: [JBoss-user] EAR scoping and MANIFEST.MF references > This is on a jboss 3 version, right? > > I'm very surprised. Everything in your .ear should be visible to > everything else: it should all be loaded by classloaders in one loader > repository. > > Can you supply a minimal example, preferably as a testcase in the > org.jboss.test.classloader.test package? > > Thanks > david jencks > > On 2002.08.31 02:54:16 -0400 Michael Bartmann wrote: > > Hi, > > yesterday I had a (temporary) problem with the EAR-scoping: > > > > involved were > > - some common-xxx.jars with common code, > > - some ejb-xxx.jars all using this common code, > > - all of this in one big ear with ear-scoping. > > > > Fine so far, all of this had run before without ear-scoping. > > > > But my application.xml did not list any <java>common-xxx.jar</java> > > as they were instead listed in the META-INF/MANIFEST.MF[Classpath:] > > of each ejb-xxx.jar. > > > > The glory effect was: > > All classes were found (each only once), but the common-xxx.jar > > classes got loaded by different classloaders so the JVM > > complained when package-private methods were invoked. > > > > I understand you cannot avoid this when loading the common-xxx.jar > > classes through the classloaders of each ejb-xxx.jar. > > > > (and as a side note: when I did instead put all references into the > > application.xml everything ran fine again, so why do I complain :-) > > > > But my questions are: > > - Shouldn't I have had the same problems without ear-scoping? > > (Thinking of it again this might only a be due to a race condition, > > cause when all common classes were used and loaded by one classloader > > first, there wouldn't be "mixed loading"). > > - Is this "officially expected behavior" or couldn't (shouldn't) we use > > yet another shared classloader for the META-INF/MANIFEST.MF[Classpath:] > > references? > > > > Enjoy, > > Michael ------------------------------------------------------- This sf.net email is sponsored by: OSDN - Tired of that same old cell phone? Get a new here for FREE! https://www.inphonic.com/r.asp?r=sourceforge1&refcode1=vs3390 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
