-
1. Re: jboss classloading question
jbosss Apr 6, 2005 4:52 PM (in response to jbosss)One more question :
1. Why do we have 3 versions of class loaders : UnifiedClassLoader, UnifiedClassLoader2 and UnifiedClassLoader3 ? Similarly for UnifiedLoaderRepository, again why 3 versions? -
2. Re: jboss classloading question
treespace Apr 7, 2005 9:56 AM (in response to jbosss)Class loaders are nested to provide isolation. WARs use war-local resources, EARs use ear-local, ditto for SARs and so on. The configuration is next followed by jars or classes in the server.
WAR files have the added requirement of an option that stipulates that no classes outside of system classes will be used. It's a security thing.
The best solution is to use EARs to aggregate EJBs and WEB resources. You can also get away with a "java" modules in JBoss for loose jars specified in your application.xml, however, you should use your MANIFEST.MF to specify the dependencies between loose jars and your EARs 'n WARs. I create one manifiest for every jar and specify the dependencies (one level deep) in each. This eliminates duplicate jars and classes entirely, much cleaner.