users@glassfish.java.net

Re: How to install 2 glassfish servers in one machine

From: <glassfish_at_javadesktop.org>
Date: Thu, 20 May 2010 07:24:54 PDT

The two servers can share the same copy of the GlassFish system JARs - avoiding having to install two copies and keep two copies up-to-date:

asadmin create-domain --portbase 4900 domain2

The on-line help for create-domain is quite good. Use

asadmin create-domain --help

to read all about it. The value 4900 is just an example. You can provide whatever value you like that does not conflict with other software (including other GlassFish domains) that use ports on your system.

You can then start and stop each domain independently by name. You can operate on each domain separately - such as deploying apps to the domain you want - by specifying the correct --port portNumber setting on each asadmin command. See

asadmin help

to read about the options which apply to all asadmin commands.

Hope that helps.

- Tim
[Message sent by forum member 'tjquinn']

http://forums.java.net/jive/thread.jspa?messageID=470703