asadmin common options (remote, secure, log)

With recent versions of GlassFish 3.0 (and beyond), the asadmin syntax has been cleaned up a bit and you might find your old syntax not working anymore for instance for doing remote operations on a given server and port.

asadmin now has a well-defined set of “common” options such as --host, --port, --terse that are independent of the subcommand used (start-domain, deploy, etc.). The full list of such options is documented here.

For instance, here’s how to redeploy hello.war to a GlassFish server running on myserver.mydomain with admin port set to 4848 while preserving sessions :

      asadmin --host mymachine.myport --port 4848 redeploy --properties keepSessions=true hello.war


Author: alexismp

Google Developer Relations in Paris.