Paul
Paul

Reputation: 111

Java Application Servers and JVM

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?

Upvotes: 5

Views: 1528

Answers (4)

Leo
Leo

Reputation: 6570

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.

Upvotes: 1

Vivek
Vivek

Reputation: 1125

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

Why have one JVM per application?

Upvotes: 1

Saddam Abu Ghaida
Saddam Abu Ghaida

Reputation: 6729

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

Upvotes: 3

venergiac
venergiac

Reputation: 7697

Yes if the application server is not clustered.

Otherwise it could work on different host machine and jvm.

Upvotes: 0

Related Questions