5 Replies Latest reply on Aug 13, 2015 1:57 AM by James Livingston

    Static Vs Dynamic Modules

    kiran doshi Newbie

      In our setup we have multiple applications (wars & ears) deployed on a single instance of the Wildfly server.

      There are libraries which is shared amongst these applications.

      We could deploy in one of the two modes

      1) Create an ear for the shared libraries. All other applications will declare dependency on this ear

      2) Create static modules for the libraries. All other applications will declare dependency on these modules.

       

      I have the following questions

      In option 1 will the libraries be deployed for by each war classloader separately, which means the libraries are loaded multiple times.

      In option 2 will the libraries be deployed only once in a different classloader which is accessible to all the  war files

       

      I have also read in discussions that Static modules takes less memory.

      What is the basis of it taking less memory. Is it related to the question I have or there is some other basis

       

      Thanks for your answers