<!DOCTYPE REFENTRY PUBLIC "-//Sun Microsystems//DTD DocBook V3.0-Based SolBook Subset V2.0//EN" [
<!--ArborText, Inc., 1988-1999, v.4002-->
<!ENTITY metainfo SYSTEM "metainfo.sgm">
<!ENTITY options-common SYSTEM "options-common.sgm">
<!ENTITY synopsis-common SYSTEM "synopsis-common.sgm">
<!ENTITY % commonents SYSTEM "smancommon.ent">
%commonents;
<!ENTITY % booktitles SYSTEM "booktitles.ent">
%booktitles;
<!ENTITY Dash "&ndash;">
]>
<?Pub UDT _bookmark _target>
<?Pub Inc>
<refentry id="deploy-1">
<refmeta><refentrytitle>deploy</refentrytitle><manvolnum>1</manvolnum>&metainfo;
</refmeta>
<refnamediv><indexterm><primary sortas="deploy">deploy &mdash; deploys the
specified component</primary></indexterm><indexterm><primary sortas="deploys the specified component">
deploys the specified component &mdash; deploy</primary></indexterm><refname>
deploy</refname><refpurpose>deploys the specified component</refpurpose></refnamediv>
<refsynopsisdiv><title>&synp-tt;</title>
<cmdsynopsis><command>deploy</command>&synopsis-common;
<arg><option role="nodash">&Dash;&Dash;virtualservers <replaceable>virtual_servers
</replaceable></option></arg><arg><option role="nodash">&Dash;&Dash;contextroot <replaceable>
context_root</replaceable></option></arg><arg><option role="nodash">&Dash;&Dash;force=true
</option></arg><arg><option role="nodash">&Dash;&Dash;precompilejsp=false
</option></arg><arg><option role="nodash">&Dash;&Dash;verify=false</option></arg>
<arg><option role="nodash">&Dash;&Dash;name <replaceable>component_name</replaceable></option></arg>
<arg><option role="nodash">&Dash;&Dash;upload=true</option></arg><arg><option
role="nodash">&Dash;&Dash;retrieve <replaceable>local_dirpath</replaceable></option></arg>
<arg><option role="nodash">&Dash;&Dash;dbvendorname <replaceable>dbvendorname
</replaceable></option></arg><arg><option role="nodash">&Dash;&Dash;createtables=<replaceable>
true|false</replaceable> | </option><option role="nodash">&Dash;&Dash;dropandcreatetables=<replaceable>
true|false</replaceable></option></arg><arg><option role="nodash">&Dash;&Dash;uniquetablenames=<replaceable>
true|false</replaceable></option></arg><arg><option role="nodash">&Dash;&Dash;deploymentplan <replaceable>
deployment_plan</replaceable></option></arg><arg><option role="nodash">&Dash;&Dash;enabled=true
</option></arg><arg><option role="nodash">&Dash;&Dash;generatermistubs=false
</option></arg><arg><option role="nodash">&Dash;&Dash;availabilityenabled=false
</option></arg><arg><option role="nodash">&Dash;&Dash;libraries <replaceable>
jar_file</replaceable>[(<replaceable>path_separator</replaceable>)<replaceable>
jar_file</replaceable>*]</option></arg><arg><option role="nodash">&Dash;&Dash;target <replaceable>
target</replaceable></option></arg><arg choice="plain"><replaceable>filepath
</replaceable></arg>
</cmdsynopsis></refsynopsisdiv>
<refsect1><title>&desc-tt;</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="nodash">&Dash;&Dash;force
</option> option is set to <literal>true</literal>.</para>
<para>The <option role="nodash">&Dash;&Dash;createtables</option> and <option
role="nodash">&Dash;&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="nodash">&Dash;&Dash;createtables</option> and <option
role="nodash">&Dash;&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><title>OPTIONS</title>
<variablelist termlength="wide">&options-common;
<varlistentry><term><option role="nodash">&Dash;&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="nodash">&Dash;&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="nodash">&Dash;&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="nodash">&Dash;&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="nodash">&Dash;&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="nodash">&Dash;&Dash;name</option></term>
<listitem><para>Name of the deployable component.</para>
</listitem></varlistentry>
<varlistentry><term><option role="nodash">&Dash;&Dash;upload</option></term>
<listitem><para>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.</para>
</listitem></varlistentry>
<varlistentry><term><option role="nodash">&Dash;&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="nodash">&Dash;&Dash;dbvendorname</option></term>
<listitem><para>Specifies the name of the database vendor for which tables
are created. Supported<?Pub Caret> 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="nodash">&Dash;&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="nodash">&Dash;&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="nodash">&Dash;&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="nodash">&Dash;&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="nodash">&Dash;&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. For Standard
and Enterprise Edition, 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="nodash">&Dash;&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="nodash">&Dash;&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="nodash">&Dash;&Dash;libraries</option></term>
<listitem><para>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 JAR files are separated by a colon on Unix and
Linux systems and by a semicolon on Windows systems. The libraries are made
available to the application in the order specified. Place the dependent JAR
files in the <replaceable>domain-dir</replaceable><literal>/lib</literal>
directory.</para>
</listitem></varlistentry>
<varlistentry><term><option role="nodash">&Dash;&Dash;target</option></term>
<listitem><para>&se-ee-only;Specifies the target to which you are deploying.
Valid values are:<itemizedlist>
<listitem><para><literal>server</literal>, which deploys the component to
the default server instance <literal>server</literal> and is the default value.
</para>
</listitem>
<listitem><para><literal>domain</literal>, which deploys the component to
the domain. 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="nodash">&Dash;&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>
<para></para>
</listitem>
<listitem><para><replaceable>cluster_name</replaceable>, which deploys the
component to every server instance in the cluster.</para>
</listitem>
<listitem><para><replaceable>instance_name</replaceable>, which deploys the
component to a particular sever instance.</para>
</listitem>
</itemizedlist></para>
</listitem></varlistentry>
</variablelist></refsect1>
<refsect1><title>OPERANDS</title>
<variablelist termlength="wide">
<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><title>&exam-tt;</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>.
For Sun Java System Application Server Standard and Enterprise Editions, use
the <option role="nodash">&Dash;&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>. For Sun Java
System Application Server Standard and Enterprise Editions, use the <option
role="nodash">&Dash;&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="nodash">&Dash;&Dash;target</option>
option, available with Sun Java System Application Sever Standard and Enterprise
Editions only. To use this example for Platform Edition, 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="nodash">&Dash;&Dash;target</option>
option, available with Sun Java System Application Server Standard and Enterprise
Editions only. To use this example for Platform Edition, 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><title>EXIT STATUS</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><title>&also-tt;</title>
<para><link linkend="undeploy-1"><citerefentry><refentrytitle>undeploy</refentrytitle>
<manvolnum>1</manvolnum></citerefentry></link>, <link linkend="list-components-1"><citerefentry>
<refentrytitle>list-components</refentrytitle><manvolnum>1</manvolnum></citerefentry></link><link
linkend="undeploy-1"></link></para>
</refsect1>
</refentry>
<?Pub *0000016189>
