2.4.8 restart-domain
Restarts the DAS of the specified domain.
Synopsis
asadmin [asadmin-options] restart-domain [--help] [--debug={true|false}] [--domaindir domaindir] [--force={true|false}] [--kill={false|true}] [domain-name]
Storage location
Application Server installation directory/javaee/glassfish/bin
Function
The restart-domain subcommand of asadmin stops and then restarts the DAS of the specified domain. If a domain is not specified, the default domain is assumed. If the domains directory contains two or more domains, the domain-name operand must be specified. If the DAS is not already running, the command attempts to start it.
This subcommand is supported in local or remote mode.
Arguments
- --help | -?
-
Displays the help text for the subcommand.
- --debug={true|false}
-
Specifies whether the domain is restarted with Java Platform Debugger Architecture (JPDA) debugging enabled. The default is the current setting of this option for the domain that is being restarted.
Type: Boolean
The following values can be specified:
-
true
The domain is restarted with JPDA debugging enabled and the port number for JPDA debugging is displayed.
-
false
The domain is restarted with JPDA debugging disabled (default). The default is the current setting of this option for the domain that is being restarted.
Default value: false
-
- --domaindir domaindir
-
Specifies the domain root directory, which contains the directory of the domain that is to be restarted.
Type: String
The following values can be specified:
-
Path of the domain root directory
Default value: Application Server installation directory/javaee/glassfish/domains
-
- --force={true|false}
-
Specifies whether the domain must be forcibly stopped just before it is restarted.
Type: Boolean
The following values can be specified:
-
true
The domain is forcibly stopped immediately. This is the default value.
-
false
The subcommand waits until all threads that are associated with the domain are exited before stopping the domain.
Default value: true
-
- --kill={false|true}
-
Specifies whether the domain must be killed before it is restarted using the functionality of the operating system to terminate the domain process.
Type: Boolean
The following values can be specified:
-
true
The domain is killed. The subcommand uses functionality of the operating system to terminate the domain process.
-
false
The domain is not killed. The subcommand uses the functionality of the Java platform to terminate the domain process. This is the default value.
Default value: false
-
- domain-name
-
Specifies the name of the domain you want to restart. Default is the name specified during installation, usually domain1.
Type: String
The following values can be specified:
-
Name of the domain
Default value: domain1
-
Examples
The following example restarts mydomain4 in the default domains directory.
asadmin restart-domain mydomain4
Exit Status
Exit Status |
Explanation |
---|---|
0 |
subcommand executed successfully. |
1 |
error in executing the subcommand. |