|
We are trying to figure out whether there is a better way to deploy multiple Grails application to one JBoss server. We are able to deploy the multiple WAR files and the applications runs fine.
Our challenge is that there are other java applications deployed to the same JBoss server as well. The archive we got from "grails war..." is pretty big - about 27 Meg each war file. Thus, at deployment time, it has a rather big memory foot print.
Since pretty much all these Grails war files contain a lot of the same jars, is there a way to have Grails application deployed in a shared server environment? In other words, can we have only one set of the "common" libraries shared by multiple Grails application, thus reduce the overall size of the war file to be deployed?
I can see the beauty of bundle everything together into one archive and have it to be totally self-contained. It just seemed very inefficient if we have multiple Grails app deployed on the same server. Thanks! Tony
|
|
On 06/02/2012 19:51, tony.yuan wrote:
> In other words, can we have > only one set of the "common" libraries shared by multiple Grails > application, thus reduce the overall size of the war file to be > deployed? It's possible but only if you are *certain* that the (deprecated) static ApplicationHolder and ConfigurationHolder are not used anywhere in any of your applications or in any of the plugins that they depend on. RequestContextHolder is OK as that is thread-local. http://grails.org/doc/latest/guide/conf.html#providingDefaultDependencies Ian -- Ian Roberts | Department of Computer Science [hidden email] | University of Sheffield, UK --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email |
|
In reply to this post by tony.yuan
What makes you think that moving common jars into a common place will make a smaller memory footprint? Do you mean during deployment or the actual runtime? Each app has it's own classloader, so even if they share the same jar, necessary classes will be loaded for each app ( aka per app)... The only thing you'd gain would be smaller WAR files...
On Mon, Feb 6, 2012 at 1:51 PM, tony.yuan <[hidden email]> wrote: We are trying to figure out whether there is a better way to deploy multiple Grails application to one JBoss server. We are able to deploy the multiple WAR files and the applications runs fine. Our challenge is that there are other java applications deployed to the same JBoss server as well. The archive we got from "grails war..." is pretty big - about 27 Meg each war file. Thus, at deployment time, it has a rather big memory foot print. Since pretty much all these Grails war files contain a lot of the same jars, is there a way to have Grails application deployed in a shared server environment? In other words, can we have only one set of the "common" libraries shared by multiple Grails application, thus reduce the overall size of the war file to be deployed? I can see the beauty of bundle everything together into one archive and have it to be totally self-contained. It just seemed very inefficient if we have multiple Grails app deployed on the same server. Thanks! Tony |
|
Thanks for the reply.
I mean in the deployment time. Our hosting service team has been seeing the memory foot print going up a lot when deploying the grails war. If taken the grails war out, the deployment of all other apps are taking a much smaller memory foot print. We are just starting to develop grails applications. And I wonder if all other grails users are experiencing the same issue. Thanks! |
|
You can generate the war file with --nojars. But, apparently not all the jars can be removed. And, as Octavian points out, that may only make the war files smaller, not memory usage.
http://stackoverflow.com/questions/3825517/making-war-smaller http://stackoverflow.com/questions/8468149/how-to-deploy-multiple-applications-in-tomcat-share-jars-and-have-different-dat I don't know if this is an issue for you: We have seen permgen space keep going up and up if we hot-redeploy. Eventually the container, and all the apps running in it, runs out of memory. It seems the only solution for grails apps seems to be restarting the webserver for each redeploy, not just the app. |
| Powered by Nabble | Edit this page |
