4 Replies Latest reply on Nov 16, 2004 6:20 AM by chrisdutz

    Providing global jar-files in ear-archive?

    chrisdutz

      Hi,

      when using Bea-Weblogic there seems to be a way to make jar-files available to all applications on the server if puting them in a special directory insoder the ear-archive. Is there a similar way to do this with jboss?

      I have quite a large set of independant Application-Parts, that all use the same libraries already provided by the core-ear. At the moment I am packaging these with every application that needs them, but it would be nice if I could make jar-files globaly available.

      Any Ideas?

      Chris

        • 1. Re: Providing global jar-files in ear-archive?

          Can you not include the jars in the class path? The entry can be made in the conf/jboss-service.xml file.

          Extract the jars in the ear file to a location (ex: /home/mylib/)

          Include the following line in the jboss-service.xml file:

          <classpath codebase="/home/mylib/" archives="*"/>


          This way the jars are in the classpath and hence available to all the applications on the server.

          Thanks,
          Kalyan.

          • 2. Re: Providing global jar-files in ear-archive?
            chrisdutz

            This way I have to reconfigure the server. I want to avoid this. In Bea-Weblogic I can explicitly export jars inside an ear to the global server classpath, just as if I had added them to the jboss/server/default/lib directory. I was wandering if such a thing is available on Jboss.

            • 3. Re: Providing global jar-files in ear-archive?
              nproemper

              Hi,

              to solve this for some libraries, which are useful for the whole java environment, I've copied them to the lib\ext directory of the java sdk, e.g. oracle driver classes,...).

              I believe, putting them into jboss\server\<type\lib\ would work, too.

              • 4. Re: Providing global jar-files in ear-archive?
                chrisdutz

                This is exactly what I wanted to avoid, since I have to restart the server in order to make the libs available. I don't want my customerst to have to copy files all over the place and since BEA WLS offers this feature I was looking for the JBoss way to do this. But thanks anyway