问题描述:

When you deploy many applications to a java application server, do those applications all run in the same JVM i.e. the JVM that's started when the application server starts up?

Do you have the option to run each of those applications in a separate JVM? If so why would you want to do this?

网友答案:

java application server runs in a single JVM, so every app deployed under java application server instance runs in the same VM as every other application while every app has a different class loader

网友答案:

Go through this questions's answer..hope all queries will be answered :

Why have one JVM per application?

网友答案:

Yes if the application server is not clustered.

Otherwise it could work on different host machine and jvm.

网友答案:

I am afraid you can't run in different JVMs because the appserver have to manage the objects life cycle. That's what JEE is all about. Also, that's why JEE states that you should not use threads in your app, because you want the container to take care of the concurrency for you.

Of course, in a clustered environment, you can have several JVMs, but still be the same for the app server + container.

相关阅读:
Top