Private JVM, and Its Advantages When Looking For Java and JSP Web Hosting
When building a web site or web application that is driven by one of the many Java specifications like JSP, Servlets, JSF you will likely also be looking for a host that specializes in JSP Web Hosting. In your search you will find that Java hosting is somewhat specialized. However within this class you will find hosts that offer shared JVM’s and others that offer private JVM’s. So what is the difference other than price?
The best way to explain the difference between a private JVM and a shared JVM is to look at the differences of living in an apartment complex versus owning your own home. In the case of the apartment you are usually allowed (or disallowed) to do certain items by management, you wont be able to change where your walls are and if the guy downstairs starts a fire in his apartment you may want to get out of your place until the fire department arrives. With your own home you have the freedom to configure the inside how you want to. You won’t have to fight other people for a good parking spot either.
Consider your own Java development environment now. When developing a Java application you usually try to work in an environment that you can control so that you get your best results. For instance, if you make changes and need to restart the JVM – you can. You can also develop any libraries and classes that you want. In your development environment you also have the capability to modify your configuration files for the JVM – how it interacts with the web server and define any special mappings that your java applications need to run or even install a different version of the JDK.
In addition, your development environment is not affected by the computer next to or across from you. It is its own instance of the application server and you are the administrator. In hosting, this is very much the same things that you get with a Private JVM. You get the control to configure your environment to your applications needs. Oftentimes if you use a shared JVM you find that the server administrator does not have the same urgency as you do when you need to restart the global instance.
Frequently it is heard that users applications run loose and end up crashing the application server. Another common complaint of shared JVM’s is the fact that like crashing a JVM, other users have a higher chance of creating security issues – whether intentional or not – that will negatively impact any user running in the same instance. You are also likely to be restricted from deploying your own classes and libraries without a server administrator and once you do deploy these they are placed in the global instance available for anyone on the server to use.
In conclusion, if you are developing a custom Java application that uses frameworks such as Struts, Lenya, EJB, Tapestry, Shale or any other popular Java application frameworks you will likely want to invest in a host that will provide a private JVM environment that will be very similar to your own development environment. If you will be developing your application on your hosting account directly you will definitely want to have a private JVM. While a completely dedicated hosting solution may be best, if looking for a cost compromise, shared hosting with a private JVM may be the solution for you, with shared hosting plus a shared JVM generally not being worth the hassle.