1 Reply Latest reply on May 28, 2015 6:21 AM by Tomaz Cerar

    common libraries, modules & implicit dependency

    kiran doshi Newbie

      We are doing migration from Jboss 4.2.3 to Wildfly 8.2

      In the current setup multiple WAR's are deployed on one servers.

      There are many JAR's which are common across all these WAR's, hence they are shared by placing in common lib folder.

       

      I couldn't find a common lib folder equivalent in Wildfly, so for testing I tried the following approach.

      Created an EAR which contains all the JAR files in its lib folder. The WAR's would declare dependency on this EAR & it works this way.

       

      However I believe that the Classes in the EAR will not be shared and will be loaded for each WAR, which would occupy more memory & there would

      be a performance penalty to pay.

      Another option is create a module with these JAR files & declare dependency on this module.

       

      Some of the JAR's also have servlets, filters etc, these are not packaged in the WAR, so it requires JEE libraries.

      I observed that the JEE libraries which were implicitly available to the WAR files, are not available to the modules & I had to declare dependency like

         <module name="javax.servlet.api"/>

         <module name="javax.servlet.jsp.api"/>

       

      Is my understanding of the Wildfly correct or I am doing something wrong.