dev@glassfish.java.net

Re: new asadmin command

From: Byron Nevins <Byron.Nevins_at_Sun.COM>
Date: Tue, 14 Jul 2009 14:35:57 -0700
Kudos to Bill!

I have one suggestion and one Tip based on Bill's work:

Suggestion:  Change the env. variable to ASADMIN_OLD instead of checking for a false value to ASASMIN_NEW.  I.e. it ain't new anymore, the previous has now become old and the new has become regular.  You can just drop the ASADMIN_OLD anytime later...

Tip:  The new syntax makes scripts much easier to create.  Say you want a generic script that always hits a remote server at host=foo and port =666
(windows style script):

asadmin --host foo --port 666 %*

-- You could not do this before.  In the olden days you would do this hideous type of script instead:

asadmin %1 --host foo --port 666 %2 %3 %4 %5 %6

============================================================


Bill Shannon wrote:
As some of you know, I've been fixing some problems in the asadmin
command to make it more compatible with v2.  All my work has been
done "on the side", without impacting the existing v3 asadmin.

After talking to Kedar and Byron, I think it's time to change that.

Right now you can experiment with the new version of asadmin by setting
the system environment variable ASADMIN_NEW=true, e.g.,

export ASADMIN_NEW=true
asadmin ...

If you haven't already, please try that out and let me know of any problems.

*If I don't hear complaints, I'm going to switch the default tomorrow.*

After the change, you'll be able to set ASADMIN_NEW=false to get the old
behavior, at least for a short time until we're completely convinced
that the new version is working properly.


The new version of asadmin has the following important differences:

The --path option to (e.g.) the deploy command that appeared in v3 has
been removed.  Specify the path as the operand to the command.

The asadmin "program options", e.g.

    --host
    --port
    --user
    --passwordfile
    --terse
    --interactive
    --secure

can and should be specified *before* the command name, e.g.,

$ asadmin --host myhost --port 5555 list-applications

Although we still support supplying them after the command name,
you'll get a warning about deprecated syntax.

Other than those things, let me know where the new asadmin behaves
differently than what you expect based on the v2 asadmin.

Thanks.

---------------------------------------------------------------------
To unsubscribe, e-mail: admin-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: admin-help@glassfish.dev.java.net