users@glassfish.java.net

Re: asadmin version cmd

From: kedar <Kedar.Mhaswade_at_Sun.COM>
Date: Wed, 08 Nov 2006 09:58:35 -0800

Hi Cathy Mucci,

The Version Command output should be an invariant. I don't
think the "output" of the version command is an interface that
you can rely on.

So, it always better to rely on the "Version" class that we
have exposed. In your GlassFish installation, take a look at:
appserv-ext.jar:
com.sun.appserv.server.util.Version class. At the moment, you'll
need to do a javap on that to find out its methods.
This class exposes various methods to get things like: full-version
(which asadmin displays), major version, minor version, build id etc.
I think you should rely on it.

Regards,
Kedar

Cathy Mucci wrote:
>
> We are looking for ways to programatically determine the version of
> AppServer installed on various platforms/servers.
>
> Is the the output returned from the asadmin version command is parsable?
> Is it localized text? In other words, is there an option to guarantee
> the output text that can be parsed by a script and work in any locale?
>
> Your feedback is appreciated.
>
> Thank you,
> Cathy Mucci
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>