dev@glassfish.java.net

Re: asadmin vs java -jar

From: Kedar Mhaswade <Kedar.Mhaswade_at_Sun.COM>
Date: Thu, 03 Sep 2009 13:44:31 -0700

Bobby Bissett wrote:
> This falls under the category of "things I don't know that I don't know."
>
> Given the asadmin pipe issue in another thread, I was going to have
> upgrade tool do a Runtime.exec() of "java -jar glassfish.jar [etc]"
> rather than "asadmin [etc]." Is there any downside to doing this? I'd be
> switching this:
>
> asadmin start-domain --upgrade [--user <b> [--passwordfile <c>]] <domain>
>
> to this:
>
> java -jar modules/glassfish.jar -upgrade true <domain>
>
> It may mean problems finding or specifying a Java to use since it's not
> checking asenv.conf, but using the same Java that the asupgrade tool is
> using should be fine for upgrade. What other headaches am I causing
> myself if I go this route?

In most cases, it should be fine. The issue however comes when:
1- your startup must not ignore the JVM options defined in domain.xml.
2- your keystore password is other than "changeit" (which is the
default) [1].

Thus, if you need support for both the above (which is what most of
the production domains would want) you'll need to do most of the heavy
lifting that launcher is doing in asadmin start-domain case.

BTW, I will try to fix the issue that you are running into, w.r.t.
asadmin start-domain. It's a bit tricky to get right.

>
> Also, are there versions of --user and --password file to use here? I
> can't find them and it seems to accept anything I try.

For startup, user name and password is not required for v3.

1 -
http://wiki.glassfish.java.net/Wiki.jsp?page=GlassFishV3AdminSecurity#section-GlassFishV3AdminSecurity-MasterPasswordRelatedChanges

-Kedar

> Thanks,
> Bobby
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>