I have three EARs deployed under JBoss each of which have a copy of a set of JARs. I'd like to keep these JARs at the EAR level (instead of server/lib) for reasons not worth mentioning here.
My question is: does having copies of these JARs in each EAR increase the amount of PermGen space required by the JVM?
Sample deployment structure:
foo.ear
foo.ear/lib1.jar
foo.ear/lib2.jar
foo.ear/lib3.jar
foo.ear/foo.war
foo.ear/foo.ear
bar.ear
bar.ear/lib1.jar
bar.ear/lib2.jar
bar.ear/lib3.jar
bar.ear/bar.war
blah.ear
blah.ear/lib1.jar
blah.ear/lib2.jar
blah.ear/lib3.jar
blah.ear/blah.war
Yes, because each ear deployer will load the classes in separate classloaders. You can "share" classes by using a classloader setting in jboss.xml
http://www.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration