简体   繁体   中英

Java Application Servers and JVM

When you deploy many applications to a java application server, do those applications all run in the same JVM ie 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应用程序服务器在单个JVM中运行,因此在Java应用程序服务器实例下部署的每个应用程序都与其他所有应用程序在同一VM中运行,而每个应用程序都具有不同的类加载器

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

Why have one JVM per application?

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.

Yes if the application server is not clustered.

Otherwise it could work on different host machine and jvm.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM