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

## deploy(1)

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

#### NAME

deploy– deploys the specified component

#### SYNOPSIS

`deploy` ––user admin_user [––passwordfile filename] [––host host_name] [––port port_number] [––secure|`–s`] [––terse=false] [––echo=false] [––interactive=true] [––help] [`––virtualservers virtual_servers`] [`––contextroot context_root`] [`––force=true`] [`––precompilejsp=false`] [`––verify=false`] [`––name component_name`] [`––upload=true`] [`––retrieve local_dirpath`] [`––dbvendorname dbvendorname`] [`––createtables=true|false |` `––dropandcreatetables=true|false`] [`––uniquetablenames=true|false`] [`––enabled=true`] [`––deploymentplan deployment_plan`] [`––availabilityenabled=false`] [`––generatermistubs=false`] [`––target target`] filepath

#### DESCRIPTION

Deploys an EJB, web, connector, or application. If the component is already deployed or already exists, it is forcefully redeployed if the `––force` option is set to `true`.

The `––createtables` and `––dropandcreatetables` options are booleans and therefore can take the values of true or false. These options are only used during deployment of CMP beans that have not been mapped to a database (i.e., no `sun-cmp-mappings.xml` descriptor is provided in the module's `META-INF` directory). They are ignored otherwise.

The `––createtables` and `––dropandcreatetables` options are mutually exclusive; only one should be used. If drop and/or create tables fails, the deployment does not fail; a warning message is provided in the log file.

This command is supported in remote mode only.

#### 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.

`––virtualservers`

  Comma separated list of virtual server names.

`––contextroot`

  Valid only if the archive is a web module. It is ignored for other archive types; defaults to filename without extension.

`––force`

  Makes sure the component is redeployed even if the specified component has already been deployed or already exists. Use this option when redeploying an existing application, otherwise you see an error.

`––precompilejsp`

  By default this option is set to false, which does not allow the JSP to pre-compile during deployment. Instead JSPs are compiled during runtime.

`––verify`

  If set to true, the syntax and semantics of the deployment descriptor is verified.

`––name`

  Name of the deployable component.

`––upload`

  When set to true, uploads the deployable file to the administration server. If the filepath of the deployable file is mounted to the server machine, or if the administration server is running locally, set the upload option to false.

`––retrieve`

  Retrieves the client stub JAR file from the server machine to the local directory.

`––dbvendorname`

  Name of database vendor being used. Default is the ```database-entry-name` entry in the `cmp-resource()` element of the `sun-ejb-jar.xml` file. If not specified the default is SQL92, and the DDL files to create and drop tables are generated in SQL92 format.

`––createtables`

  Creates tables at deployment of an application with unmapped CMP beans. Default is the `create-tables-at-deploy` entry in the `cmp-resource` element of the `sun-ejb-jar.xml` file.

`––dropandcreatetables`

  Drops tables at redeployment of an already deployed application with unmapped CMP beans. If not specified, the tables are dropped if the `drop-tables-at-undeploy` entry in the `cmp-resource` element of the `sun-ejb-jar.xml` file is set to true. The new tables are created if the `create-tables-at-deploy` entry in the `cmp-resource` element of the `sun-ejb-jar.xml` file is set to true. On redeployment the tables created by the previous deploy are dropped before creating the new tables.

`––uniquetablenames`

  Guarantees unique table names for all the beans and results in a hashcode added to the table names. This is useful if you have an application with case-sensitive bean names.

`––enabled`

  If set to true (default), allows users to access the application. If set to false, users will not be able to access the application.

  For Enterprise Edition, this option enables the application on the specified target instance or cluster. If you deploy to the target `domain`, this option is ignored, since deploying to the domain doesn't deploy to a specific instance or cluster.

`––deploymentplan`

  Takes the deployment plan, which is a JAR containing Sun-specific descriptors, and deploys it. This should be passed along when deploying a pure EAR file. A pure EAR file is an EAR without Sun-specific descriptors.

`––generatermistubs`

  If set to true, static RMI-IIOP stubs are generated and put into the `client.jar`. If set to false (default) the stubs are not generated.

`––availabilityenabled`

  In Enterprise Edition, if set to true, high-availability is enabled for SFSB checkpointing (and potentially passivation). If set to false (default) all SFSB checkpointing is disabled for the application or EJB module. Set this option to true only high availability is configured and enabled.

`––target`

  In Enterprise Edition, specifies the target to which you are deploying. Valid values are:

  - `server`, which deploys the component to the default server instance `server` and is the default value.

  - `domain`, which deploys the component to the domain. If `domain` is the target for an initial deployment, the application is deployed to the domain, but no server instances or clusters reference the application. If `domain` is the target for a redeployment (the `––force` option is set to true), and dynamic reconfiguration is enabled for the clusters or server instances that reference the application, the referencing clusters or server instances automatically get the new version of the application. If redeploying, and dynamic configuration is disabled, the referencing clusters or server instances do not get the new version of the application until the clustered or standalone server instances are restarted.

  - cluster_name, which deploys the component to every server instance in the cluster.

  - instance_name, which deploys the component to a particular sever instance.

#### OPERANDS

filepath

  Path to the deployable file on the local machine if the `upload` option is set to `true`; otherwise the absolute path to the file on the server machine.

#### EXAMPLES

##### Example 1 Deploying a J2EE application

Deploy (install) the J2EE application packaged in the `Cart.ear` file.

This syntax deploys the application to the default server instance `server`. For Sun Java System Application Server, Enterprise Edition, use the `––target` option to deploy to a different server instance or to a cluster.

    asadmin> deploy --user admin --passwordfile filename Cart.ear
    Command deploy executed successfully

##### Example 2 Deploying a Web application with the default context root

Deploy the Web application in the `hello.war` file at the hello context root.

This syntax deploys the application to the default server instance `server`. For Sun Java System Application Server, Enterprise Edition, use the `––target` option to deploy to a different server instance or to a cluster.

    asadmin> deploy --user admin --passwordfile myfile hello.war
    Command deploy executed successfully

##### Example 3 Deploying an enterprise bean (EJB component)

Deploy an enterprise bean with container-managed persistence (CMP) and create the database tables used by the bean.

This example uses the `––target` option, available with Sun Java System Application Sever Enterprise Edition only. To use this example for Standard Edition, omit that option. The target in this example is an existing cluster, `cluster1`.

    asadmin> deploy --user admin --passwordfile filename --createtables=true
    --target cluster1 EmployeeEJB.jar
    Command deploy executed successfully

##### Example 4 Deploying a connector module (resource adapter)

Deploy a connector module packaged in a RAR file.

This example uses the `––target` option, available with Sun Java System Application Sever Enterprise Edition only. To use this example for Standard Edition, omit that option. The target in this example is an existing standalone server instance that does not belong to a cluster.

    asadmin> deploy --user admin --passwordfile filename --target myinstance jdbcra.rar
    Command deploy executed successfully

#### EXIT STATUS

0

  command executed successfully

1

  error in executing the command

#### SEE ALSO

undeploy(1), list-components(1)NULL

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