The -asadmin-args argument when the domain is started is used if the
domain needs to be restarted, i.e., these are the arguments that were
passed in to asadmin when the domain was originally started (including
the default values for all of the arguments).
When the jx domain was started, it was probably started with:
asadmin start-domain jx
now the default value for the --port option for asadmin is 4848.
However, the start-domain command doesn't use that option because
start-domain is a local command (it runs in asadmin, not in the server).
So the 4848 is actually ignored. But the code that sets asadmin-args
doesn't know that, it just includes the values for all options.
Tom
On 4/5/2012 10:33 AM, Laird Nelson wrote:
> We have two GlassFish DAS instances running on one machine. Not what
> I'd like, but there it is.
>
> One of them simply runs domain1, i.e. no create-domain statement was
> ever issued manually by an administrator. Consequently this DAS port
> is 4848 (the default).
>
> The other is running a domain called jx. This domain was created with
> the --portbase option set to 7000. Consequently this DAS port is 7048.
>
> When I do ps -ef | grep glassfish, I see "4848" showing up prominently
> in both process listings. Here's the ps output for the
> jx-domain-running GlassFish, which again was set up with a portbase of
> 7000:
>
> jxadmin 15653 1 0 Mar29 ? 00:57:58
> /usr/java/latest/bin/java -cp
> /opt/jenzabar/jx/glassfish-3.1.2/glassfish/modules/glassfish.jar
> [various options omitted for brevity; none contains "7048"]
> com.sun.enterprise.glassfish.bootstrap.ASMain -domainname jx
> -asadmin-args
> --host,,,localhost,,,--port,,,4848,,,--secure=false,,,--terse=false,,,--echo=false,,,--interactive=true,,,start-domain,,,--verbose=false,,,--debug=false,,,--domaindir,,,/opt/jenzabar/jx/glassfish-3.1.2/glassfish/domains,,,jx
> -instancename server -verbose false -debug false -asadmin-classpath
> /opt/jenzabar/jx/glassfish-3.1.2/glassfish/modules/admin-cli.jar
> -asadmin-classname com.sun.enterprise.admin.cli.AsadminMain -upgrade
> false -type DAS -domaindir
> /opt/jenzabar/jx/glassfish-3.1.2/glassfish/domains/jx -read-stdin true
>
> Why does the -asadmin-args argument feature "4848" if this DAS is
> addressable at port 7048? Is this responsible for specifying defaults
> or something?
>
> Just trying to understand the actual ASMain invocation.
>
> Best,
> Laird
>
> --
> http://about.me/lairdnelson
>