-
1. Re: JBoss classloading issue
jaikiran Mar 15, 2010 12:58 PM (in response to sameerpokarna2)A war file, as per the spec has its own isolated classloader. So classes outside the .war (like in the .ear) cannot access the classes inside the .war. If your .ear needs access to those classes inside that .war, then it should really be in a common jar file which can then be placed in .ear/lib folder. Contents of that folder are available to all components (including the .war) within that .ear.
-
2. Re: JBoss classloading issue
sameerpokarna2 Mar 15, 2010 11:42 PM (in response to jaikiran)I was looking at the JBoss UnifiedLoaderRepository wiki pages at http://community.jboss.org/wiki/JBossClassLoadingUseCases, and it seems to have a mechanism to share classes across WAR files (though I have not tried it successfully yet).
So, I was hoping that if a WAR can access classes from other WARs, maybe JBoss also has a mechanism of accessing a class in a WAR file from an EAR file. This would be possible if the EAR also uses the same UnifiedLoaderRepository as the WAR files.
-
3. Re: JBoss classloading issue
jaikiran Mar 16, 2010 1:22 AM (in response to sameerpokarna2)You haven't mentioned the JBoss AS version you are using, so i am assuming it's AS-5. See this http://community.jboss.org/wiki/useJBossWebClassLoaderinJBoss5
If you are using some other version, then let us know.