admin@glassfish.java.net

Re: "asadmin create-jvm-options --?" actually creates "--?"

From: Bill Shannon <bill.shannon_at_oracle.com>
Date: Mon, 03 Jan 2011 19:35:38 -0800

Kedar!

Kedar JavaNet wrote on 01/03/2011 06:45 PM:
>
>
> On Sun, Dec 12, 2010 at 1:51 PM, Bill Shannon <bill.shannon_at_oracle.com
> <mailto:bill.shannon_at_oracle.com>> wrote:
>
> Anissa Lam wrote on 12/12/2010 10:20 AM:
>
>
> I wasn't sure how create-jvm-options works, so i use --? like any other CLI
> command, hoping to see its usage. Surprised to see that
>
> ~ 246) asadmin create-jvm-options --?
> Created 1 option(s)
> Command create-jvm-options executed successfully.
>
> Is this a bug or by-design ?
>
>
> By design. There's no way to distinguish valid jvm options from valid
> asadmin options, so it considers them all to be jvm options.
>
>
> My understanding is a bit dated, but this means that this command is different
> from others?

Yes.

> The other problem (which I am not sure how to address well) is if once you
> manage to get an invalid JVM option in domain.xml using valid means, your server
> won't start! So, I guess, I am saying that we should try harder (I tried, way
> back when, guess it was not enough) not to corrupt domain.xml with invalid JVM
> options. (I know JVM options are rather unpredictable).

Perhaps we need a "start in safe mode" that causes it to use only
known good JVM options? Perhaps also ignore user apps and only
allow the admin console app?