2 Replies Latest reply on Sep 3, 2015 3:01 AM by anmk28

    how to set multiple jar file in jboss 7.2 classloader

    anmk28

      I have more then 60 jar file need to set in JBoss 7.2 class loader. this is old application it's working fine in JBoss 5.0 because i have put the all jar file in <jbooshome>/lib path but in JBoss 7.2 there is no lib all are in modules but i have more jar file can you please help that.

      Thanks

      Mahesh

        • 1. Re: how to set multiple jar file in jboss 7.2 classloader
          jameslivingston

          You can create a custom module, and then add that to the EE subsystem's <global-modules> list to make it available to all applications.

           

          1) Create a directory modules/com/example/mymodule/main/, and put all the jars in it

          2) Create a modules/com/example/mymodule/main/ file like this, you need to add all th jars, and may need some more dependencies

          <?xml version="1.0" encoding="UTF-8"?>

          <module xmlns="urn:jboss:module:1.1" name="com.example.mymodule">

              <resources>

                  <resource-root path="this.jar"/>

                  <resource-root path="that.jar"/>

                  <resource-root path="other.jar"/>

              </resources>

           

              <dependencies>

                  <module name="sun.jdk"/>

                  <module name="javaee.api"/>

              </dependencies>

          </module>

          3) Add com.example.mymodule to the global modules list

          • 2. Re: how to set multiple jar file in jboss 7.2 classloader
            anmk28

            Thanks James its working for me and also i some issues in jboss-web.xml fil.

             

            Jboss 5.x   jboss-web.xml file  are  like

            <jboss-web>

              <security-domain flushOnSessionInvalidation="false" />

            <context-root>/</context-root>

            </jboss-web>

            JBoss 7.x will changed  in jboss-web.xml:

            <jboss-web>

              <security-domain flushOnSessionInvalidation="false">other</security-domain>

            <context-root>/</context-root>

            </jboss-web>

             

            after the app are deployed successfully.

            Thanks !!