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.


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.

  • Thanks for reply. Is it possible to achieve this thing with multiple domain creation and each application running on different domain? – RAS Feb 20 '17 at 5:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.