How to configure Glassfish to allocate different memory size for JVM per web application

I have 2 Java web applications deployed on my Glassfish Enterprise Server v2.1.1.

I want each of them to have different configurations for JVM options, specially for memory allocation. I have studied this document. But it contains approach for specifying JVM options at the entire server level, while I want to do the same at application level.

Can anyone tell me how can I achieve this?

PS: I’m not a system engineer but whatever suggestion I receive, I’ll try to implement.

Answer

If you don’t want to specify memory options for the application that satisfy both applications, then you need to run multiple instances of your container.

This will give you 2 JVMs with different run time options, but also the overhead of running another glassfish instance.

Sadly for you, memory management are per JVM and thus per server instance.

Attribution
Source : Link , Question Author : RAS , Answer Author : fuero

Leave a Comment