Managing GlassFish without NetBeans

Starting and stopping GlassFish in NetBeans is easy and convenient. However, in enterprise environments the stop/start process will be managed by scripts wrapping the asadmin utility. A full description of the utility can be found in the GlassFish User Administration Guide at https://glassfish.java.net/docs/4.0/administration-guide.pdf.

The asadmin utility is used to perform administrative tasks for the GlassFish server from the command line or from a script. You can use this utility instead of the GlassFish administration console interface we used earlier in this chapter. Almost every action that can be performed in the administration console has an equivalent command that can be executed with asadmin.

The asadmin utility is found in the {as-install}/bin directory. Commands should be run from within this directory if the full path to asadmin is not provided. To start the domain, you can execute the following command:

asadmin start-domain domain1

The domain1 argument represents the name of the domain to start. Executing this command from the Windows command prompt will result in the following output:

Managing GlassFish without NetBeans

Stopping a running GlassFish domain is just as simple. Use the following command:

asadmin stop-domain domain1

This will result in the following output:

Managing GlassFish without NetBeans

We will continue to start and stop GlassFish within NetBeans but will revisit asadmin in Chapter 13, Moving Your Application to Production.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.35.193