Multiple Grails Applications on Tomcat

I'm going to deploy multiple grails applications on top of a single Tomcat server, and I have the following doubts:

  • In terms of memory usage: does it make sense to embed the grails shared libraries in shared / lib instead of putting them in application file files? Is there a list of these cans?
  • If so, is there a mechanism to not pack these cans into a war file for the production environment? I am using NetBeans 6.7.
  • I am going to use Tomcat 5.5; is there any experience recommending using 6.0 instead?

thanks

+7
tomcat grails libs
source share
2 answers

I think the best practices are to keep libraries in the war, because if you update the library that you shared, you will be sure that it is compatible with all of your applications that use it. We do this with grails and spring in general, so we don’t have to go back and do compatibility testing every time we update.

I also believe that tomcat loads an instance of the class for each application, so you do not store it in memory, using it as a general class.

See also:

Does Tomcat run the same library file into memory twice if they are in two web applications?

+5
source share

1) placing banners in shared / lib or common / lib can reduce the amount of memory needed in PermGen. IMHO the biggest advantage is that loading a military file is much faster. But keep in mind that, according to TripWird, shared banks associate all deployed applications with the same version of Grails. The update becomes a game of "nothing or everything."

2) if you use

grails prod war --nojars 

then the entire jar file is excluded from the war.

+5
source share

All Articles