<!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="undeploy-1">
<refmeta><refentrytitle>undeploy</refentrytitle><manvolnum>1</manvolnum>&metainfo;
</refmeta>
<refnamediv><indexterm><primary sortas="undeploy">undeploy &mdash; removes
a deployed component</primary></indexterm><indexterm><primary sortas="removes a component in the domain application server">
removes a deployed component &mdash; undeploy</primary></indexterm><refname>
undeploy</refname><refpurpose>removes a deployed component</refpurpose></refnamediv>
<refsynopsisdiv><title>&synp-tt;</title>
<cmdsynopsis><command>undeploy</command>&synopsis-common;
<?Pub Caret><arg><option role="nodash">&Dash;&Dash;droptables=<replaceable>
true|false</replaceable></option></arg><arg><option role="nodash">&Dash;&Dash;cascade=false
</option></arg><arg><option role="nodash">&Dash;&Dash;target <replaceable>
target</replaceable></option></arg><arg choice="plain"><replaceable>component_name
</replaceable></arg>
</cmdsynopsis></refsynopsisdiv>
<refsect1><title>&desc-tt;</title>
<para>The <command>undeploy</command> command removes the specified deployed
component.</para>
<para>This command is supported in remote mode only.</para>
</refsect1>
<refsect1><title>OPTIONS</title>
<variablelist termlength="medium">&options-common;
<varlistentry><term><option role="nodash">&Dash;&Dash;droptables</option></term>
<listitem><para>If set to true, tables created by application using CMP beans
during deployment are dropped. The default is the corresponding entry in the <classname>
cmp-resource</classname> element of the <filename>sun-ejb-jar.xml</filename>
file. If not specified, it defaults to the entries specified in the deployment
descriptors.</para>
</listitem></varlistentry>
<varlistentry><term><option role="nodash">&Dash;&Dash;cascade</option></term>
<listitem><para>If set to true, it deletes all the connection pools and connector
resources associated with the resource adapter being undeployed. If set to
false, the undeploy fails if any pools and resources are still associated
with the resource adapter. Then, either those pools and resources have to
be deleted explicitly, or the option has to be set to true. If the option
is set to false, and if there are no pools and resources still associated
with the resource adapter, the resource adapter is undeployed. This option
is applicable to connectors (resource adapters) and applications.</para>
</listitem></varlistentry>
<varlistentry><term><option role="nodash">&Dash;&Dash;target</option></term>
<listitem><para>&se-ee-only;Specifies the target from which you are undeploying.
Valid values are:<itemizedlist>
<listitem><para><literal>server</literal>, which undeploys the component from
the default server instance <literal>server</literal> and is the default value
</para>
</listitem>
<listitem><para><literal>domain</literal>, which undeploys the component from
the domain.</para>
</listitem>
<listitem><para><replaceable>cluster_name</replaceable>, which undeploys the
component from every server instance in the cluster.</para>
</listitem>
<listitem><para><replaceable>instance_name</replaceable>, which undeploys
the component from a particular sever instance.</para>
</listitem>
</itemizedlist></para>
</listitem></varlistentry>
</variablelist></refsect1>
<refsect1><title>OPERANDS</title>
<variablelist termlength="medium">
<varlistentry><term><replaceable>component_name</replaceable></term><listitem>
<para>Name of the deployed component.</para>
</listitem></varlistentry>
</variablelist></refsect1>
<refsect1><title>&exam-tt;</title>
<example>
<title>Simple undeployment</title>
<para>Undeploy (uninstall) an enterprise application <filename>Cart.ear</filename>. 
</para>
<screen>asadmin> <userinput>undeploy --user admin --passwordfile password.txt Cart
</userinput>
Command undeploy executed successfully.</screen>
</example>
<example>
<title>Undeploying an enterprise bean with container-managed persistence (CMP)
</title>
<para>Undeploy a CMP bean named <literal>myejb</literal> and drop the corresponding
database tables. In a production environment, database tables contain valuable
information, so use the <option role="nodash">&Dash;&Dash;droptables</option>
option with care.</para>
<screen>asadmin> <userinput>undeploy --user admin --passwordfile password.txt --droptables=true myejb
</userinput>
Command undeploy executed successfully.</screen>
</example>
<example>
<title>Undeploy a connector (resource adapter)</title>
<para>Undeploy the connector module named <literal>jdbcra</literal> and perform
a cascading delete to remove the associated resources and connection pools.
</para>
<screen>asadmin> <userinput>undeploy --user admin --passwordfile password.txt --cascade=true jdbcra
</userinput>
Command undeploy 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="deploy-1"><citerefentry><refentrytitle>deploy</refentrytitle>
<manvolnum>1</manvolnum></citerefentry></link>, <link linkend="deploydir-1"><citerefentry>
<refentrytitle>deploydir</refentrytitle><manvolnum>1</manvolnum></citerefentry></link>, <link
linkend="list-components-1"><citerefentry><refentrytitle>list-components</refentrytitle>
<manvolnum>1</manvolnum></citerefentry></link></para>
</refsect1>
</refentry>
<?Pub *0000006060>
