<!--Arbortext, Inc., 1988-2008, v.4002-->
<!DOCTYPE REFENTRY PUBLIC "-//Sun Microsystems//DTD SolBook 3.5//EN" [
<!ENTITY options-common SYSTEM "options-common.sgm">
<!ENTITY synopsis-common SYSTEM "synopsis-common.sgm">
<!ENTITY % commonents SYSTEM "common.ent">
%commonents;
]>
<?Pub UDT _bookmark _target>
<?Pub EntList bull rArr sect>
<?Pub Inc>
<refentry id="deploy-1"><?Pub Tag atict:info tracking="off" ref="2"><?Pub Tag atict:user
user="hl34125" fullname=""><?Pub Tag atict:user user="pmdavies" fullname=""><?Pub Tag
atict:user user="ah95648" fullname="">
<!-- @(#)deploy.1 1.14 07/08/02 SMI; -->
<refmeta><refentrytitle>deploy</refentrytitle><manvolnum>1</manvolnum>
<refmiscinfo class="date">3 Oct 2008</refmiscinfo>
<refmiscinfo class="sectdesc">&man1;</refmiscinfo>
<refmiscinfo class="software">&software;</refmiscinfo>
<refmiscinfo class="arch">generic</refmiscinfo>
<refmiscinfo class="copyright">Copyright (c) 2007, Sun Microsystems, Inc.
All Rights Reserved</refmiscinfo>
</refmeta>
<refnamediv><indexterm><primary>deploy</primary></indexterm><indexterm><primary>deploys
the specified component</primary></indexterm>
<refname>deploy</refname><refpurpose>deploys the specified component</refpurpose>
</refnamediv>
<refsynopsisdiv><title></title>
<synopsis><command>deploy</command> &synopsis-common;[<option role="double-dash">
virtualservers</option> <replaceable>virtual_servers</replaceable>]
[<option role="double-dash">contextroot</option> <replaceable>context_root</replaceable>] [<option
role="double-dash">force</option>=true]
[<option role="double-dash">precompilejsp</option>=false] [<option
role="double-dash">verify</option>=false]
[<option role="double-dash">name</option> <replaceable>component_name</replaceable>] [<option
role="double-dash">upload</option>=true]
[<option role="double-dash">retrieve</option> <replaceable>local_dirpath</replaceable>] [<option
role="double-dash">dbvendorname</option> <replaceable>dbvendorname</replaceable>]
[<option role="double-dash">createtables</option>=<replaceable>true|false</replaceable> | <option
role="double-dash">dropandcreatetables</option>=<replaceable>true|false</replaceable>]
[<option role="double-dash">uniquetablenames</option>=<replaceable>true|false</replaceable>] [<option
role="double-dash">deploymentplan</option> <replaceable>deployment_plan</replaceable>]
[<option role="double-dash">enabled</option>=true] [<option role="double-dash">generatermistubs
</option>=false]
[<option role="double-dash">availabilityenabled</option>=false]
[<option role="double-dash">libraries</option> <replaceable>jar_file</replaceable>[(<replaceable>
path_separator</replaceable>)<replaceable>jar_file</replaceable>*]]
[<option role="double-dash">target</option> <replaceable>target</replaceable>] <replaceable>
filepath</replaceable></synopsis>
</refsynopsisdiv>
<refsect1 role="description"><title></title>
<para>Deploys an enterprise application, web application, EJB module, connector
module, or application client module. If the component is already deployed
or already exists, it is forcefully redeployed if the <option role="double-dash">
force</option> option is set to <literal>true</literal>.</para>
<para>The <option role="double-dash">createtables</option> and <option
role="double-dash">dropandcreatetables</option> options are booleans and therefore
can take the values of <parameter>true</parameter> or <parameter>false</parameter>.
These options are only used during deployment of CMP beans that have not been
mapped to a database (i.e., no <filename>sun-cmp-mappings.xml</filename> descriptor
is provided in the module's <filename>META-INF</filename> directory). They
are ignored otherwise.</para>
<para>The <option role="double-dash">createtables</option> and <option
role="double-dash">dropandcreatetables</option> 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.</para>
<para>This command is supported in remote mode only.</para>
</refsect1>
<refsect1 role="options"><title></title>
<variablelist termlength="wholeline">&options-common;
<varlistentry><term><option role="double-dash">virtualservers</option></term>
<listitem><para>One or more virtual server IDs. Multiple IDs are separated
by commas. </para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">contextroot</option></term>
<listitem><para>Valid only if the archive is a web module. It is ignored for
other archive types; defaults to filename without extension.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">force</option></term>
<listitem><para>If set to true, makes sure the component is redeployed even
if the specified component has already been deployed or already exists. The
default is true. </para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">precompilejsp</option></term>
<listitem><para>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.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">verify</option></term>
<listitem><para>If set to true, the syntax and semantics of the deployment
descriptor is verified.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">name</option></term>
<listitem><para>Name of the deployable component.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">upload</option></term>
<listitem><para>When set to true, uploads the deployable file to the administration
server. The deployable file imust be accessible from the client. If the file
is accessible to both server and client, set the upload option to false.</para>
</listitem><?Pub Caret>
</varlistentry>
<varlistentry><term><option role="double-dash">retrieve</option></term>
<listitem><para>Retrieves the client stub JAR file from the server machine
to the local directory.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">dbvendorname</option></term>
<listitem><para>Specifies the name of the database vendor for which tables
are created. Supported values include <literal>db2</literal>, <literal>mssql</literal>, <literal>
oracle</literal>, <literal>derby</literal>, <literal>javadb</literal>, <literal>postgresql
</literal>, <literal>pointbase</literal>, and <literal>sybase</literal>, case-insensitive.
If not specified, the value of the <literal>database-vendor-name</literal> attribute
in <literal>sun-ejb-jar.xml</literal> is used. If no value is specified, a
connection is made to the resource specifie by the <literal>jndi-name</literal> subelement
of the <literal>cmp-resource</literal> element in the <literal>sun-ejb-jar.xml</literal> file,
and the database vendor name is read. If the  connection cannot be established,
or if the value is not recognized, SQL-92 compliance is presumed.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">createtables</option></term>
<listitem><para>Creates tables at deployment of an application with unmapped
CMP beans. Default is the <literal>create-tables-at-deploy</literal> entry
in the <command>cmp-resource</command> element of the <filename>sun-ejb-jar.xml</filename> file. 
</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">dropandcreatetables</option></term>
<listitem><para>If set to true, when the component is redeployed, the tables
created by the previous deployment are dropped before creating the new tables.
Applies to already deployed applications with unmapped CMP beans. If not set
to true, the tables are dropped if the <command>drop-tables-at-undeploy</command> entry
in the <command>cmp-resource</command> element of the <filename>sun-ejb-jar.xml</filename> file
is set to true. The new tables are created if the <command>create-tables-at-deploy
</command> entry in the <command>cmp-resource</command> element of the <filename>
sun-ejb-jar.xml</filename> file is set to true.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">uniquetablenames</option></term>
<listitem><para>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.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">deploymentplan</option></term>
<listitem><para>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.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">enabled</option></term>
<listitem><para>If set to true (default), allows users to access the application.
If set to false, users will not be able to access the application. In a domain
whose profile is the &cluster-profile-name; profile or the &enterprise-profile-name;
profile, this option enables the application on the specified target instance
or cluster. If you deploy to the target <literal>domain</literal>, this option
is ignored, since deploying to the domain doesn't deploy to a specific instance
or cluster.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">generatermistubs</option></term>
<listitem><para>If set to true, static RMI-IIOP stubs are generated and put
into the <filename>client.jar</filename>. If set to false (default) the stubs
are not generated.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">availabilityenabled</option></term>
<listitem><para>&se-ee-only; This option controls whether high-availability
is enabled for SFSB checkpointing and potentially passivation. If set to false
(default) all SFSB checkpointing is disabled for the specified application
or EJB module. If set to true, the specified application or module is enabled
for high-availability. Set this option to true only if high availability is
configured and enabled at higher levels, such as the server and container
levels.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">libraries</option></term>
<listitem><para>A comma-separated list of library JAR files. Specify the library
JAR files by their relative or absolute paths. Specify relative paths relative
to <replaceable>instance-root</replaceable><literal>/lib/applibs</literal>.
The libraries are made available to the application in the order specified.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">target</option></term>
<listitem><para>&se-ee-only; Specifies the target to which you are deploying.
Valid values are:</para>
<itemizedlist>
<listitem><para><literal>server</literal>&hyphen; Specifies the default server
instance as the target.  <literal>server</literal> is the name of the default
server instance and is the default value.</para></listitem>
<listitem><para><replaceable>domain_name</replaceable>&hyphen; Specifies a
certain domain as the target.  If <literal>domain</literal> is the target
for an initial deployment, the application is deployed to the domain, but
no server instances or clusters reference the application. If <literal>domain</literal> is
the target for a redeployment (the <option role="double-dash">force</option> 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.</para></listitem>
<listitem><para><replaceable>cluster_name</replaceable>&hyphen; Specifies
a certain cluster as the target.</para></listitem>
<listitem><para><replaceable>instance_name</replaceable>&hyphen; Specifies
a certain server instance as the target.</para></listitem>
</itemizedlist>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="operands"><title></title>
<variablelist termlength="wholeline">
<varlistentry><term><replaceable>filepath</replaceable></term>
<listitem><para>Path to the deployable file on the local machine if the <literal>
upload</literal> option is set to <literal>true</literal>; otherwise the absolute
path to the file on the server machine.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="examples"><title></title>
<example><title>Deploying an Enterprise application</title>
<para>This syntax deploys the Enterprise application packaged in the <filename>Cart.ear
</filename> file to the default server instance <literal>server</literal>.
In a domain whose profile is the &cluster-profile-name; profile or the &enterprise-profile-name;,
use the <option role="double-dash">target</option> option to deploy to a different
server instance or to a cluster.</para>
<screen>asadmin> <userinput>deploy --user admin --passwordfile filename Cart.ear</userinput>
Command deploy executed successfully</screen>
</example>
<example><title>Deploying a Web application with the default context root</title>
<para>This syntax deploys the Web application in the <filename>hello.war</filename> file
to the default server instance <literal>server</literal>. In a domain whose
profile is the &cluster-profile-name; profile or the &enterprise-profile-name;,
use the <option role="double-dash">target</option> option to deploy to a different
server instance or to a cluster.</para>
<screen>asadmin> <userinput>deploy --user admin --passwordfile myfile hello.war</userinput>
Command deploy executed successfully</screen>
</example>
<example><title>Deploying an enterprise bean (EJB component)</title>
<para>Deploy an enterprise bean with container-managed persistence (CMP) and
create the database tables used by the bean.</para>
<para>This example uses the <option role="double-dash">target</option> option,
which is available only in domains that are configured to support clusters,
such as domains that are created with the &cluster-profile-name; profile or
the &enterprise-profile-name; profile. To use this example in a domain that
is not configured to support clusters, omit that option. The target in this
example is an existing cluster, <literal>cluster1</literal>.</para>
<screen>asadmin> <userinput>deploy --user admin --passwordfile filename
--createtables=true --target cluster1 EmployeeEJB.jar</userinput>
Command deploy executed successfully</screen>
</example>
<example><title>Deploying a connector module (resource adapter)</title>
<para>Deploy a connector module packaged in a RAR file.</para>
<para>This example uses the <option role="double-dash">target</option> option,
which is available only in domains that are configured to support clusters,
such as domains that are created with the &cluster-profile-name; profile or
the &enterprise-profile-name; profile. To use this example in a domain that
is not configured to support clusters, omit that option. The target in this
example is an existing standalone server instance that does not belong to
a cluster.</para>
<screen>asadmin> <userinput>deploy --user admin --passwordfile filename
--target myinstance jdbcra.rar</userinput>
Command deploy executed successfully</screen>
</example>
</refsect1>
<refsect1 role="exit-status"><title></title>
<variablelist termlength="medium">
<varlistentry><term>0</term>
<listitem><para>command executed successfully</para>
</listitem>
</varlistentry>
<varlistentry><term>1</term>
<listitem><para>error in executing the command</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="see-also"><title></title>
<para><olink targetdoc="asrefman" targetptr="undeploy-1">undeploy(1)</olink>, <olink
targetdoc="asrefman" targetptr="list-components-1">list-components(1)</olink></para>
</refsect1>
</refentry>
