2.8.19 undeploy
Removes a deployed component.
Synopsis
asadmin [asadmin-options] undeploy [--help] [--target target] [--cascade={false|true}] name
Storage location
Application Server installation directory/javaee/glassfish/bin
Function
The undeploy subcommand of asadmin uninstalls a deployed application or module and removes it from the repository. This subcommand is supported in remote mode only.
If the removal of the EJB timer application failed because a timeout occurred while accessing the database, then you can no longer deploy the application. In this case, do the following to redeploy the EJB timer application:
-
Restart the server instance.
-
Undeploy the EJB timer application.
-
Deploy the EJB timer application.
Precondition
Domain Administration Server (DAS) is running.
Arguments
- --help | -?
-
Displays the help text for the subcommand.
- --cascade={false|true}
-
Specifies whether the related resources are deleted or not.
If set to true, deletes all the connection pools and connector resources associated with the resource adapter being undeployed.
If set to false, the undeploy fails if any pools and resources are still associated with the resource adapter. Then, either those pools and resources must be deleted explicitly, or the option must be set to true.
If the option is set to false, and if there are no pools and resources still associated with the resource adapter, the resource adapter is undeployed. This option is applicable to connectors (resource adapters) and applications.
Type: Boolean
The following values can be specified:
-
true
-
false
Default value: false
-
- --target target
-
Specifies the target from where you are undeploying.
Type: String
The following values can be specified:
-
server
Undeploys the component from the default server instance server and is the default value.
-
domain
Undeploys the component from the domain.
-
cluster_name
Undeploys the component from every server instance in the cluster.
-
instance_name
Undeploys the component from a particular stand-alone server instance.
Default value: server
-
- name
-
Specifies the name of the deployed component.
The name can include an optional version identifier, which follows the name and is separated from the name by a colon (:). The version identifier must begin with a letter or number. It can contain alphanumeric characters plus underscore (_), dash (-), and period (.) characters. To delete multiple versions, you can use an asterisk (*) as a wildcard character.
Type: String
The following values can be specified:
-
Name of the component
Default value: N/A
-
Examples
The following example removes an enterprise application named Cart.ear on the server instance instance1.
asadmin undeploy --target instance1 Cart
Exit Status
Exit Status |
Explanation |
---|---|
0 |
subcommand executed successfully. |
1 |
error in executing the subcommand. |