5 Replies Latest reply on Nov 4, 2009 9:51 AM by peterj

    can I deploy all my shared libs in one single file ?

    iltrex

      I have a war file that uses some shared libs (20, more or less)

      I copy them in the lib folder, and the application works perfectly

      But, in order to make deployment easyer, I would like to create ONE single jar file will all the shared libs, so that deploying the application will require to copy 2 files (the main application and the shared jar) instead of 21 files.

      But I have some problems doing so, it seems that JBoss is not able to find shared jars inside another shared jar. Am I correct ?

      It is impossible ?

      Alberto

        • 1. Re: can I deploy all my shared libs in one single file ?
          peterj

          You could do this: unjar all 20-some JARs into a common directory and then JAR the contents of that directory. Then you will have one JAR file which contains all the classes in the 20-some JAR files.

          • 2. Re: can I deploy all my shared libs in one single file ?
            iltrex

             

            "PeterJ" wrote:
            You could do this: unjar all 20-some JARs into a common directory and then JAR the contents of that directory. Then you will have one JAR file which contains all the classes in the 20-some JAR files.


            that is a very good suggestion. I will make some tests right now.
            thank you very much.



            • 3. Re: can I deploy all my shared libs in one single file ?
              iltrex

               

              "iltrex" wrote:
              "PeterJ" wrote:
              You could do this: unjar all 20-some JARs into a common directory and then JAR the contents of that directory. Then you will have one JAR file which contains all the classes in the 20-some JAR files.


              that is a very good suggestion. I will make some tests right now.
              thank you very much.



              I did that, and it works 100% fine on my developement Pc (windows).

              Then I deployed the shared lib file on the test server, that runs on linux, and jboss complains about a class not found, that is in the shared jar.

              Do you have any idea about the different behaviour ?

              I will continue to investigate on my own...

              Alberto

              • 4. Re: can I deploy all my shared libs in one single file ?
                iltrex

                 


                Then I deployed the shared lib file on the test server, that runs on linux, and jboss complains about a class not found, that is in the shared jar.

                Do you have any idea about the different behaviour ?

                I will continue to investigate on my own...

                Alberto


                I restarted jboss on the server, and now it works. it seems that jboss does not load new shared libs at runtime.... or maybe, it will do that every now and then and I did not had time to wait.

                Alberto

                • 5. Re: can I deploy all my shared libs in one single file ?
                  peterj

                   

                  it seems that jboss does not load new shared libs at runtime

                  That is correct. You have to restart the app server to get it to recognize new JAR files placed into server/xxx/lib or common/lib.