4 Replies Latest reply on Jan 12, 2009 3:13 PM by jinson

    Sharing jar files between multiple applications on jboss 5

      Hi,
      I have multiple web applications which needs to share same set of library files. What is the best possible way to share these jar files in jboss? Is the jboss/server/default/lib/endorsed is the right place to keep all jar files?

      Appreciate your help on this.

      Thanks,

        • 1. Re: Sharing jar files between multiple applications on jboss
          peterj

          You can place them in server/default/lib.

          Another possibility is in common/lib, but then you would be mixing your JARs with the JARs that come with JBoss AS. If you prefer to keep them separated, then server/default/lib would be the better location.

          Of course, the above advice assumes that your JARs do not conflict with the JARs provided by JBoss AS.

          • 2. Re: Sharing jar files between multiple applications on jboss

            Thanks Peter for a quick response. That is a good way to do it.

            What is the purpose of server/default/lib/endorsed directory? If I remember correct, I read somewhere(but not able to find it now:( where I read) in jboss documentation that we should not keep any user generated jar files in server/default/lib directory. Could somebody confirms my doubt?

            • 3. Re: Sharing jar files between multiple applications on jboss
              peterj

              Are you perhaps confusing the lib/endorsed directory with server/default/lib? I ask because there is no server/default/lib/endorsed directory.

              The lib/endorsed directory is used when JBoss AS needs to override libraries provided by the JVM.

              • 4. Re: Sharing jar files between multiple applications on jboss

                Thanks Peter.
                By mistake I have an endorsed directory under my /server/default/lib directory(may be copied over by mistake:() and I thought it is there in the original jboss distribution too. But it was my mistake. Sorry for wasting your time.

                Thanks,