Hitachi

Hitachi Application Server V10 Command Reference Guide (For Windows® Systems)


2.4.4 create-service

Configures the starting of the DAS or server instance on an unattended boot on OS.

Synopsis

asadmin [asadmin-options] create-service [--help] [--name service-name]
    [--serviceproperties service-properties] [--dry-run={false|true}]
    [--force={false|true}]
    [--domaindir domain-dir] [--nodedir node-dir] [--node node]
    [domain-or-instance-name]

Storage location

Application Server installation directory/javaee/glassfish/bin

Function

The create-service subcommand configures the starting of a Domain Administration Server (DAS) or a server instance on an unattended boot on the OS.

If no operand is specified and the domains directory contains only one domain, the subcommand configures the starting of the DAS for the default domain. If no operand is specified and the domains directory contains multiple domains, an error occurs.

If the operand specifies an instance, the create-service subcommand does not contact the domain administration server (DAS) to determine the node on which the instance resides. To determine the node on which the instance resides, the subcommand searches the directory that contains the node directories. If multiple node directories exist, the node must be specified as an option of the subcommand.

This subcommand is supported in local mode only

Execution permission

Administrator account

Files

The subcommand creates the following Windows Services Wrapper files for the service in the domain-dir\bin directory or the instance-dir\bin directory:

Arguments

--help | -?

Displays the help text for the subcommand.

--name service-name

Specifies the name of the service (Windows systems only) that you will use when administering the service through the service management features of the Windows operating system.

Type: String

The following values can be specified:

  • Name of the instance or domain

Default value: Name of the instance or domain that is specified as operand.

--serviceproperties service-properties

Specifies a colon(:)-separated list of various properties that are specific to the service.

To customize the display name of the service in the list of Windows Services, set the required name to the DISPLAY_NAME property.

Type: String

The following values can be specified:

  • Name of the service property

Default value: If you do not specify the DISPLAY_NAME property, then the display name of the service in the list of Windows Services is Name of the instance or domain Hitachi Java EE Server.

--dry-run={false|true} | -n

Previews your attempt to create a service. Indicates issues and the outcome that will occur if you run the command without using the --dry-run option.

Type: Boolean

The following values can be specified:

  • true

  • false

Default value: false

--force={false|true}

Specifies whether the service is created even if validation of the service fails.

Type: Boolean

The following values can be specified:

  • true

    The service is created even if validation of the service fails.

  • false

    The service is not created. This is the default value.

Default value: false

--domaindir domain-dir

Specifies the absolute path of the directory on the disk that contains the configuration of the domain. If this option is specified, the operand must specify a domain.

Type: File

The following values can be specified:

  • Absolute path of the directory

Default value: Application Server installation directory/javaee/glassfish/domains

--nodedir node-dir

Specifies the directory that contains the instance's node directory. If this option is specified, the domain-or-instance-name must specify a instance.

Type: String

The following values can be specified:

  • Instance nodes directory

Default value: Application Server installation directory/javaee/glassfish/nodes

--node node

Specifies the node on which the instance resides. This option may be omitted only if the directory specified by the --nodedir option contains only one node directory. Otherwise, this option is required. If this option is specified, the domain-or-instance-name must specify an instance.

Type: String

The following values can be specified:

  • Name of the node

Default value: N/A

domain-or-instance-name

Specifies the name of the domain or instance to configure. If no operand is specified, the default domain is used.

Type: String

The following values can be specified:

  • Name of the domain or instance

Default value: N/A

Examples

The following example creates a service for the default domain.

asadmin create-service

Exit Status

Exit Status

Explanation

0

command executed successfully.

1

error in executing the command.