users@glassfish.java.net

Re: Domains and port allocations

From: Tom Mueller <tom.mueller_at_oracle.com>
Date: Thu, 08 Sep 2011 13:59:04 -0500

If all of the instances are on separate machines, then it is fine for
one instance to have the same ports as another instance. But if you have
multiple instances on a single machine, and you want to run the
instances at the same time, then those instances have to have different
ports.

> Additionally, is there away to make one of the domains I create the
default
> port that will allow me to delete domain1?

I'm not sure if I understand your question.

The default port for asadmin is 4848. You can certainly make another
domain using port 4848 for its admin port. There is no need to keep
domain "domain1" around; it can be deleted at any time. If you still
have domain1 around, make sure it is not running when you try to create
another domain that uses port 4848 or use the --checkports=false option;
otherwise you cannot create a domain that is going to use an admin port
that is already in use.

The asadmin command looks at the AS_ADMIN_PORT environment variable. If
you want the asadmin command to connect by default to a particular
domain's admin port that is different from 4848, you can set
AS_ADMIN_PORT, and then you don't have to specify --port on every command.

Tom