dev@glassfish.java.net

Re: asadmin vs java -jar

From: Bill Shannon <bill.shannon_at_sun.com>
Date: Thu, 03 Sep 2009 14:22:22 -0700

Kedar Mhaswade wrote on 9/3/09 1:44 PM:
> 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.

Right, we need to fix that, but I still don't understand how you
(Bobby) got into this situation. The failure was caused by a bad
Java agent specification. How did that happen? Did the v2 domain
actually start even with the bad Java agent specification?