The Source for Java Technology Collaboration

Home » java.net Forums » GlassFish » GlassFish

Thread: How to configure GlassFish to support virtual servers with separate JVMs?

Welcome, Guest Help
Login Login
Guest Settings Guest Settings
Reply to this Thread Reply to this Thread Search Forum Search Forum Back to Thread List Back to Thread List

Permlink Replies: 2 - Last Post: Oct 16, 2006 9:06 AM by: claudio
snies00

Posts: 12
How to configure GlassFish to support virtual servers with separate JVMs?
Posted: Oct 14, 2006 3:42 PM
  Click to reply to this thread Reply

Please forgive a question from a glassfish newbie. After wading through documentation and web searches for three days I have not been able to find an answer for this question.

Currently I have installed Glassfish (aka SJS AS PE 9.0?) and deployed my application consisting of an ear containing four webapps successfully.

The next task is that I need to install Glassfish on our production servers. Currently each server runs Tomcat configured with multiple virtual hosts each running within its own JVM instance. The application (4 webapps) is installed in each virtual host with the web.xml files configured uniquely for each virtual host. For example, the virtual host "http://host1.pls.com" runs within its own JVM and is configured to connect to MySQL instance "host1"; virtual host "http://host2.pls.com" runs within its own JVM and is configured to connect to MySQL instance "host2", etc.

Thus my question is: is there a way to configure GlassFish to operate similar to my current Tomcat setup? At first I thought I could simply create a new virtual host within the GUI admin console, but then ran across a blog indicating that I would need to create separate server instances for each virtual host to run in a separate JVM. Is this correct, and if so, how to I create multiple server instances? The asadmin command "create-instance" does not seem to exist within my glassfish installation.

Any help would be GREATLY appreciated!

snies00

Posts: 12
Re: How to configure GlassFish to support virtual servers with separate JVM
Posted: Oct 15, 2006 6:25 AM   in response to: snies00
  Click to reply to this thread Reply

Last night I ran across a blog that might shed some light on this issue.

Another requirement that I failed to mention is the need to start/stop each customer's virtual host separately. Based on the info in the blog it seems that I need to create multiple standalone (non-clustered) server instances. That makes sense to me in that each instance then runs within its own JVM. This is important also to maintain separate class-loader spaces since each host's servlet is configured with different parameters.

Given this new info my question is - does either GlassFish or SJS AS 9.0 (platform edition) support the ability to define multiple server instances? If so, could someone tell me how to accomplish it (or point me to some additional reading)?

I would appreciate any help as my deadline is rapidly approaching and I am starting to get desperate.

claudio

Posts: 58
Re: How to configure GlassFish to support virtual servers with separate JVM
Posted: Oct 16, 2006 9:06 AM   in response to: snies00
  Click to reply to this thread Reply

I can see SunAppserver 9 can only support different VM for different domains. So new domains need to be created. Enterprise and Standard Edition is capable to create standalone instances, but SunAppServer 9 SE or EE is not available (at least is not listed at sun.com/downloads)

The good (or bad) factor is that, each domain, has its own admin console.

That adds much more administration tasks, as the resources cannot be shared, either the deployed apps.

If its not a problem, you can install Sun AppServer 8.1 EE or SE and create the standalone instances. It is Java EE 1.4.




 XML java.net RSS