Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can I have multuple JVM in an application server .

 
Shyam Ramath
Greenhorn
Posts: 21
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How many JVM can be started with in a Application server ? . Can I start a JVM with in a JVM ..

 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13062
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you can have multiple JVMs running in a single computer - why would you expect a problem?

Just like any other program you would have to watch out for conflicting use of resources - for example you can't have two Tomcat instances using the same ports.

Bill
 
Shyam Ramath
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
William Brogden wrote:Yes you can have multiple JVMs running in a single computer - why would you expect a problem?

Just like any other program you would have to watch out for conflicting use of resources - for example you can't have two Tomcat instances using the same ports.

Bill


In a tomcat I have a web application deployed , from that application can I start a JVM ?. ie to execute a job I need a separate JVM .
I know we can start a process which will be a separate JVM . A thread with in the tomcat JVM ( which may be costly operation ) .
Is there any JVM which allows a Virtual machine with in the same Virtual machine . Hope you are clear
 
Henry Wong
author
Marshal
Pie
Posts: 21127
78
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shyam Ramath wrote:In a tomcat I have a web application deployed , from that application can I start a JVM ?. ie to execute a job I need a separate JVM .
I know we can start a process which will be a separate JVM . A thread with in the tomcat JVM ( which may be costly operation ) .
Is there any JVM which allows a Virtual machine with in the same Virtual machine . Hope you are clear


I am assuming you mean virtualization like VmWare or Xen? Then no, the JVM doesn't do that level of virtualization.

Henry
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13062
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know we can start a process which will be a separate JVM . A thread with in the tomcat JVM ( which may be costly operation ) .
Is there any JVM which allows a Virtual machine with in the same Virtual machine . Hope you are clear


There is little to be gained by starting a separate JVM because execution will still be limited by the CPU / memory / IO / etc of the host computer.

Unless your separate process requires a huge amount of memory, you might as well start this extra process as a Thread controlled by Tomcat. If there are other machines on your network which have free resources, Java has lots of ways to communicate with processes elsewhere on the network.

Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic