Multiinstance Appliciation architecture and deployment in GlassFish app server.
I need to setup a hosting environment for around 100 customers per one GlassFish server (v 3.1).
Each customer needs custom configured application that can be run independently from each other. (JDBC, JMS, possibility to restart single app)
Running single virtual machine would be preferred, as launching 100 JVMs each using 750MB of RAM doesn't sound like a good idea.
So far I have tested the following solutions, but unfortunately, neither of these has met my requirements:
1. Deploying application on separate Domains. This solution was insufficient because of JVM Ram usage and complexity of running multiple management consoles on multiple ports (we don't need that much separation)
2. Deploying application on multiple instances (named targets on Glassfish) on the same domain. This solution was insufficient because it creates separate JVM process for each instance and consumes too much RAM (several hundred MB for each instance). Otherwise it was closest to what we need.
3. Deploying application on multiple virtual hosts on the same instance. This solution was unacceptable because in Glassfish each virtual server doesn't have a separate configuration.
Can anyone suggest what is the best practice / recommendation for using GlassFish to host multiple application instances? Are we "doomed" to reserve 1GB of ram per customer? Coming from IIS environment, we had separate Application Pools each using 3-5MB of RAM at startup.