5 Replies Latest reply on Oct 10, 2006 1:45 PM by Gavin King

    Shared JAR files ?

    Bhalchandra Gokhale Newbie

      Can multiple EAR/WAR files share the follwing JAR files by placing them in server/deploy/lib instead of packaging them in each application ?


        • 1. Re: Shared JAR files ?
          Gavin King Master

          Should be ok. Try it...

          • 2. Re: Shared JAR files ?
            Marcus Adair Newbie

            I've had problems sharing jboss-seam.jar in the server-name/lib dir when I have multiple WARs in separate EARs. This is because if a shared classloader serves up the Seam classes then Seam doesn't shield the webapps from each other. It's not like it doesn't work (AFAIK), namespacing just gets more problematic.

            It's possible that some rocket-science level classloader configuration for JBoss can resolve this, but you might jump of a bridge before reaching that point.

            I would love to see Seam get a little better behaved in this respect, particularly by losing the mutable static var field(s) and keeping separate namespaces for different WARs or EAR/WAR combinations. I'm gonna guess this is a difficult thing to change about Seam though, probably related related to the bytecode rewriting that goes on.

            • 3. Re: Shared JAR files ?
              Bhalchandra Gokhale Newbie

              Currently, I am making sure that each EAR file has its own class loader using
              I have 15 odd EAR files, all using the same jars. My aim is to reduce the overall memory footprint of jboss. any other options that anyone else knows of ? Also I have observed PermGen exceptions upon constant redeployments of the EARs. I am using JBoss 4.0.4, ejb3-rc8

              • 4. Re: Shared JAR files ?
                Grigoras Cristinel Newbie


                I have one application like this and I put all web used jars in
                and I make small changes in conf/web.xml to use them.

                Of course I style have the warning about SeamListener is not unique (Very stupid check using static variables). Maybe the people who write seam listener don't know nothing about jboss class loader and real J2EE applications.
                If is running in tomcat not mean is Ok for jboss.


                • 5. Re: Shared JAR files ?
                  Gavin King Master

                  We STRONGLY recommend the use of scoped classloading with Seam, like we use in all the example applications. Yes, we know all about the JBoss UCL.