users@glassfish.java.net

Re: glassfish-3.1.1

From: Vince Kraemer <vince.kraemer_at_oracle.com>
Date: Thu, 13 Oct 2011 22:05:52 -0700

On 10/13/11 6:15 PM, Kaushal Shriyan wrote:
> [snip]
> Hi Vince
>
> Thanks a Lot it worked. Also what all ports needs to be changed in the
> config when i set up multiple instance/installation of glassfish
> application server.

Hi Kaushal,

The primary cause of the issue that you encountered was the fact that
some of the ports used by the domain were not called out explicitly in
the text of the domain.xml file. This makes it easy to miss one...
which is what happened to you.

The easy way to avoid this kind of situation is to create your domains
explicitly using create-domain and adding the portbase option. This
creates domains which have all the ports used by the determined and
assigned explicitly by the command...

I would encourage you to do the following when you set up multiple
domains that you want to run simultaneously...

asadmin create-domain --portbase 2000 firstdomain
asadmin start-domain firstdomain
asadmin create-domain --portbase 3000 seconddomain
asadmin start-domain seconddomain

etc, etc, etc.

This makes the asadmin command (or the engineers that are responsible
for the command) responsible for the content of domain.xml... instead of
the end-user... who is the least likely to be able to catch mistakes.

I actual broke one of my own rules when I suggested my fix earlier
today. My 'rule' is this: GF engineers should NEVER tell someone to
edit the domain.xml directly.

vbk

>
> Regards
>
> Kaushal