Sun GlassFish Enterprise Server v3 Application Deployment Guide

ProcedureTo Disable an Application or Module

Use the disable subcommand in remote mode to immediately deactivate a deployed application or module without removing it from the server. Disabling a component makes the component inaccessible to clients. However, the component is not overwritten or uninstalled, and can be enabled by using the asadmin enable subcommand.

By default, a deployed application or module is enabled.

  1. Ensure that the server is running.

    Remote commands require a running server.

  2. Obtain the exact name of the application or module that you are disabling.

    To list deployed applications or modules, use the list-applications(1) subcommand. If you do not specify a type, all deployed applications and modules are listed. For example, valid types can be web, ejb, connector, application, jruby, and webservice.

    To see the status of deployed components, use the show-component-status(1) subcommand.

  3. Deactivate the application or module by using the disable(1) subcommand.

    Information about the options and properties of the subcommand is included in this help page.

Example 2–10 Listing Deployed Web Applications

This example lists all deployed web applications.

asadmin> list-applications --type web
hellojsp <web>
Command list-applications executed successfully.

Example 2–11 Disabling a Web Application

This example disables the hellojsp application.

asadmin> disable hellojsp
Command disable executed successfully.

See Also

You can also view the full syntax and options of the subcommand by typing asadmin help disable at the command line.