admin@glassfish.java.net

Re: Determining GlassFish version

From: Tom Mueller <tom.mueller_at_oracle.com>
Date: Fri, 25 Jun 2010 08:50:39 -0500

Bill,
Why isn't --terse passed to the remote command? Seems like there are
many cases where a remote command should produce different, easily
parsable, output if --terse is specified.

Tom


On 6/24/2010 6:16 PM, Bill Shannon wrote:
> Paul M Davies (Oracle) wrote on 06/24/2010 09:13 AM:
>> Hi,
>>
>> I'm not sure that --terse will give you exactly what you want. The
>> --terse option eliminates messages that asadmin outputs about the
>> progress of the subcommand. It doesn't affect the information that
>> the subcomand retrieves:
>>
>> asadmin version
>> Version = Oracle GlassFish Server 3.0.1 (build 22)
>> Command version executed successfully.
>>
>> asadmin --terse version
>> Version = Oracle GlassFish Server 3.0.1 (build 22)
>
> Since "version" is an asadmin local command, we *could* change the
> implementation to print the information differently if --terse is
> specified.
>
> "version" is also a remote command, which the local command uses
> to get the version from the server if it's running. The remote
> command doesn't know about --terse, and it currently returns the
> full string for the version - "Oracle GlassFish Server 3.0.1 (build 22)".
>
> So, --terse could easily get rid of the "Version = ", but if you want
> to get rid of the product name you're going to need an option that's
> passed to the remote command so that it can return different information.
> (I don't think you want the new terse/short format output to only work
> in the local case.)
>
> You could have the local command specify a different option when it
> calls the remote command, if --terse was specified. But I think it's
> probably going to be better to use a new option for this.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>