users@glassfish.java.net

Re: Two instances of Glassfish on the same machine!

From: kedar <Kedar.Mhaswade_at_Sun.COM>
Date: Tue, 22 Dec 2009 12:23:32 -0800

Hassan Schroeder wrote:
> On Tue, Dec 22, 2009 at 12:06 PM, kedar <Kedar.Mhaswade_at_sun.com> wrote:
>
>>> Have you tried it? I have 2 instances, one using ports 4848 + 8080
>>> and one on 4849 + 8081. No problems other than having to remember
>>> to specify the non-default admin port from the command line �:-)
>> Alternatively, set AS_ADMIN_PORT as an environment variable in the
>> other setup and you don't have to specify that on command line
>> every time.
>
> I'm not sure I understand "the other setup". An environment variable
> will be present regardless of which instance I'm trying to start.

>
> Can you clarify what you're suggesting?

I mean if you are administering domain2 which has admin port 4849, you should
do:

export AS_ADMIN_PORT=4849
asadmin cmd ...

This cmd will be directed to the domain domain2.

You don't have to do: asadmin cmd --port 4849 ...
I am not suggesting that you put the environment variable in your shell
login script (e.g. .bashrc).

>