Sun Java System Application Server Enterprise Edition 8.1 2005Q2 Reference Manual

## create-instance(1)

NAME | SYNOPSIS | DESCRIPTION | OPTIONS | OPERANDS | EXAMPLES | EXIT STATUS | SEE ALSO

#### NAME

create-instance– creates an instance

#### SYNOPSIS

`create-instance` ––user admin_user [––passwordfile filename] [––host host_name] [––port port_number] [––secure|`–s`] [––terse=false] [––echo=false] [––interactive=true] [––help] [`––config` config_name | `––cluster` cluster_name] `––nodeagent` nodeagent_name [`––systemproperties (name=value)[:name=value]*`] instance_name

#### DESCRIPTION

Use the create-instance command to create a new server instance residing on a local or remote machine. For a server instance to be functional it must have:

- A reference to a node agent which defines the machine where the server instance resides.

- A reference to a configuration which defines the configuration of the instance. A server instance that is joining a cluster receives its configuration from its parent cluster.

The node agent does not need to be created or started to create the instance; however, if the node agent is running, a remote server instance is created in a stopped state. If the node agent is not running, domain.xml is updated with the instance information and a new server instance is created the next time the node agent is started.

There are three types of server instances that can be created. Each server instance can only be of one type:

1. Standalone server instance: the configuration for this instance is not shared by any other server instances or clusters. When a standalone server instance is created, a standalone configuration is also created based on the `default-config` configuration. If no configuration or cluster is identified, a standalone server instance is created by default.

2. Shared server instance: the configuration for this instance is shared with other server instances or clusters. A server instance is considered shared if its configuration is shared by any other server instances.

3. Clustered server instance: the configuration for this instance is shared with other instances in the cluster. A server instance that is a member of the cluster inherits its configuration from that cluster. Any server instance that is not part of a cluster is considered an unclustered server instance.

When creating server instances Application Server attempts to resolve possible port conflicts. It also assigns random ports, currently not in use and not already assigned to other instances on the same node agent. Use the `––systemproperties` option to create additional instances on the same node agent and specify system properties to resolve the port conflicts. System properties can be manipulated after instance creation using the system property commands.

#### OPTIONS

`–u` `––user`

  The authorized domain application server administrative username.

`–w` `––password`

  The `––password` option is deprecated. Use `––passwordfile` instead.

`––passwordfile`

  This option replaces the `–– password` option. Using the `––password` option on the command line or through the environment is deprecated. The `––passwordfile` option specifies the name of a file containing the password entries in a specified format. The entry for the password must have the AS_ADMIN_ prefix followed by the password name in capital letters. For example, to specify the domain application server password, use an entry with the following format: `AS_ADMIN_PASSWORD`=password, where password is the actual administrator password. Other passwords that can be specified include AS_ADMIN_MAPPEDPASSWORD, AS_ADMIN_USERPASSWORD, AS_ADMIN_SAVEDMASTERPASSWORD, AS_ADMIN_MQPASSWORD, AS_ADMIN_ALIASPASSWORD, and so on.

`–H` `––host`

  The machine name where the domain application server is running. The default value is localhost.

`–p` `––port`

  The port number of the domain application server listening for administration requests. The default port number for Enterprise Edition is 4849.

`–s` `––secure`

  If set to true, uses SSL/TLS to communicate with the domain application server.

`–t` `––terse`

  Indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well-formatted data for consumption by a script. Default is false.

`–e` `––echo`

  Setting to true will echo the command line statement on the standard output. Default is false.

`–I` `––interactive`

  If set to true (default), only the required password options are prompted.

`–h` `––help`

  Displays the help text for the command.

`––config`

  Creates a shared server instance. The configuration name must exist and must not be named `default-config` or server-config. If the configuration name provided is a standalone configuration, an error is displayed.

`––cluster`

  Creates a clustered server instance that inherits its configuration from the named cluster.

`––nodeagent`

  The name of the node agent defining the machine where the server will be created. The node agent does not need to be running or even created. If the node agent does not exist, a placeholder will automatically be created in domain.xml.

`––systemproperties`

  Defines system properties for the server instance. These properties override property definitions in the server instance's configuration. Currently, these properties allow a way for a server instance to override port settings defined in its configuration. This is necessary if for example two clustered instances (sharing the same configuration) reside on the same machine. The following properties are available:

  Property | Definition
  --- | ---
  http-listener-1–port | This port is used to listen for HTTP requests. This property specifies the port number for http-listener-1. Valid values are 1–65535. On UNIX, creating sockets that listen on ports 1–1024 requires superuser privileges.
  http-listener-2–port | This port is used to listen for HTTPS requests. This property specifies the port number for http-listener-2. Valid values are 1–65535. On UNIX, creating sockets that listen on ports 1–1024 requires superuser privileges.
  orb-listener-1–port | This property specifies which ORB listener port for IIOP connections orb-listener-1 listens on.
  IIOP_SSL_LISTENER_PORT | This port is used for secure IIOP connections.
  IIOP_SSL_MUTUALAUTH_PORT | This property specifies which ORB listener port for IIOP connections the IIOP listener called SSL_MUTUALAUTH listens on.
  JMS_SYSTEM_CONNECTOR_PORT | This property specifies the port number on which the JMX connector listens. Valid values are 1–65535. On UNIX, creating sockets that listen on ports 1–1024 requires superuser privileges.

#### OPERANDS

instance_name

  The unique name of the instance being created. Each instance in the domain must have a unique name across all node agents, server instances, cluster names, and configuration names.

#### EXAMPLES

##### Example 1 Using the create-instance command

    asadmin> create-instance --user admin --passwordfile password.txt
    --host myhost --port 4849 --nodeagent agent1 instance1
    Command create-instance executed successfully

Where: instance1 is created on a machine where node agent, agent1 resides.

##### Example 2 Using the create-instance command with systemproperties

    asadmin> create-instance --user admin --passwordfile password.txt
    --host myhost --port 4849 --nodeagent apple_agent --systemproperties HTTP_LISTENER_PORT=58294:
    HTTP_SSL_LISTENER_PORT=58297:IIOP_LISTENER_PORT=58300:IIOP_SSL_LISTENER_PORT=58303:
    IIOP_SSL_MUTUALAUTH_PORT=58306:JMX_SYSTEM_CONNECTOR_PORT=58309 instance2
    Command create-instance executed successfully

Where: instance2 is created on a remote machine apple where node agent, apple_agent resides.

#### EXIT STATUS

0

  command executed successfully

1

  error in executing the command

#### SEE ALSO

delete-instance(1),list-instances(1), start-instance(1), stop-instance(1)

J2EE SDK 1.4 Last Revised 31 Jan 2005

NAME | SYNOPSIS | DESCRIPTION | OPTIONS | OPERANDS | EXAMPLES | EXIT STATUS | SEE ALSO

- © 2010, Oracle Corporation and/or its affiliates