subject: Dedicated Jvm And Its Advantages [print this page] When a website deploys Java specifications, then the hosting companies that specialize in JVM Hosting plans are sought. There are two major types of JVM hosting which are shared JVM and dedicated JVM. A 'Private JVM' is an environment where a single JVM (Java Virtual Machine) is dedicated to a single user; no other user(s) can start/stop your JVM or in any way interfere with or run their application(s) within it. In contrast to a private JVM, a 'shared JVM' plan will normally have multiple users running their web application(s) within a single JVM.
Dedicated JVM packages are appropriate for enterprise websites, complex/higher traffic sites and for applications like CRM and ERP Packages.
Dedicated JVM packages are considered to be more advantageous compared to the shared JVM plan for various reasons. Listed below are some of them
Full Control:
The main advantage is that, in dedicated JVM each user can have their process run independently where as in shared plan the multiple processes are handled at an instance.
In case if we are in need of making some changes and restart the JVM it can be done in dedicated package whereas in shared after the war files are uploaded, an email has to be sent to the hosting company for deploying.
There are also provisions to develop any libraries and classes that you want. The other advantages in the development environment is that full control of defining any special mappings that your java applications, modifying your configuration files for the JVM, interaction with the web server and defining the need to run or even install a different version of the JDK can be done.
The behavior of the Tomcat instance including modifying the server.xml can also be controlled. Different contexts and resources such as JNDI can be set for these files.
Memory Leaks:
In an shared JVM hosting environment, if someone has a memory leak or code that is a high user of memory, all of the people sharing that JVM suffer the same memory problems. These might lead to the bad consequences that can range from server slowdowns to some of the memory exceptions that can even freeze the server. These kinds of problems can be resolved only when a human notices the problem and restarts the engine.
Security Issues:
Dedicated JVM seems to be more stable and secure because the allocated heap memory or the virtual space that is used only by our application. The second thing is that restarting can be done at the private instance. This ensures that the complex/higher traffic sites and application gets high uptime.
Incase of the some applications crash in the servers, the other users get affected, create security issues get affected and we will be restricted from deploying your own classes and libraries without a server administrator.
Support:
When complex frameworks like Hibernate and JSF like frameworks are used, the JVMs seems to be more compatible.
Usually the shared dedicated plans have tomcat servers. Apart from Tomcat servers, Dedicated JVM package supports latest servers like JBoss, Jetty, and Glassfish.