type=page
status=published
title=restart-domain
next=restart-instance.html
prev=remove-library.html
~~~~~~
restart-domain
==============

[[restart-domain-1]][[GSRFM00218]][[restart-domain]]

restart-domain
--------------

restarts the DAS of the specified domain

[[sthref1978]]

Synopsis

[source,oac_no_warn]
----
asadmin [asadmin-options] restart-domain [--help] 
[--debug ={true|false}] 
[--domaindir domaindir] 
[--force={true|false}] [--kill={false|true}] 
[domain-name]
----

[[sthref1979]]

Description

The `restart-domain` subcommand stops and then restarts the domain
administration server (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 subcommand attempts to start it.

The `restart-domain` subcommand does not exit until the subcommand has
verified that the domain has been stopped and restarted.

This subcommand is supported in local or remote mode. If you specify a
host name, the subcommand assumes you are operating in remote mode,
which means you must correctly authenticate to the remote server. In
local mode, you normally do not need to authenticate to the server as
long as you are running the subcommand as the same user who started the
server.

[[sthref1980]]

Options

asadmin-options::
  Options for the `asadmin` utility. For information about these
  options, see the link:asadmin.html#asadmin-1m[`asadmin`(1M)] help page.
`--help`::
`-?`::
  Displays the help text for the subcommand.
`--debug`::
  Specifies whether the domain is restarted with
  http://java.sun.com/javase/technologies/core/toolsapis/jpda/[Java
  Platform Debugger Architecture (JPDA)]
  (http://www.oracle.com/technetwork/java/javase/tech/jpda-141715.html)
  debugging enabled. +
  Possible values are as follows: +
  `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.
`--domaindir`::
  The domain root directory, which contains the directory of the domain
  that is to be restarted. If specified, the path must be accessible in
  the file system. The default location of the domain root directory is
  as-install`/domains`.
`--force`::
  Specifies whether the domain is forcibly stopped immediately before it
  is restarted. +
  Possible values are as follows: +
  `true`;;
    The domain is forcibly stopped immediately (default).
  `false`;;
    The subcommand waits until all threads that are associated with the
    domain are exited before stopping the domain.
`--kill`::
  Specifies whether the domain is killed before it is restarted by using
  functionality of the operating system to terminate the domain process. +
  Possible values are as follows: +
  `false`;;
    The domain is not killed. The subcommand uses functionality of the
    Java platform to terminate the domain process (default).
  `true`;;
    The domain is killed. The subcommand uses functionality of the
    operating system to terminate the domain process.

[[sthref1981]]

Operands

domain-name::
  The name of the domain you want to restart. Default is the name
  specified during installation, usually `domain1`.

[[sthref1982]]

Examples

[[GSRFM738]][[sthref1983]]

Example 1   Restarting a Domain

This example restarts `mydomain4` in the default domains directory.

[source,oac_no_warn]
----
asadmin> restart-domain mydomain4
Successfully restarted the domain
Command restart-domain executed successfully. 
----

[[sthref1984]]

Exit Status

0::
  subcommand executed successfully
1::
  error in executing the subcommand

[[sthref1985]]

See Also

link:asadmin.html#asadmin-1m[`asadmin`(1M)]

link:delete-domain.html#delete-domain-1[`delete-domain`(1)],
link:list-domains.html#list-domains-1[`list-domains`(1)],
link:start-domain.html#start-domain-1[`start-domain`(1)],
link:stop-domain.html#stop-domain-1[`stop-domain`(1)]

Java Platform Debugger Architecture (JPDA)
(`http://www.oracle.com/technetwork/java/javase/tech/jpda-141715.html`)


