<!--Arbortext, Inc., 1988-2007, 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 CX solbook(>
<refentry id="undeploy-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="">
<!-- @(#)undeploy.1 1.9 07/04/25 SMI; -->
<refmeta><refentrytitle>undeploy</refentrytitle><manvolnum>1</manvolnum>
<refmiscinfo class="date">30 Jan 2007</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>undeploy</primary></indexterm><indexterm>
<primary>removes a deployed component</primary></indexterm>
<refname>undeploy</refname><refpurpose>removes a deployed component</refpurpose>
</refnamediv>
<refsynopsisdiv><title></title>
<synopsis><command>undeploy</command> &synopsis-common; [<option
role="double-dash">droptables</option>=<replaceable>true|false</replaceable>]
 [<option role="double-dash">cascade</option>=false] [<option role="double-dash">
target</option> <replaceable>target</replaceable>]
 <replaceable>component_name</replaceable></synopsis>
</refsynopsisdiv>
<refsect1 role="description"><title></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 role="options"><title></title>
<variablelist termlength="medium">&options-common;
<varlistentry><term><option role="double-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="double-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="double-dash">target</option></term>
<listitem><para>&se-ee-only;Specifies the target from which you are undeploying.
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.</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><?Pub Caret>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="operands"><title></title>
<variablelist termlength="medium">
<varlistentry><term><replaceable>component_name</replaceable></term>
<listitem><para>Name of the deployed component.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="examples"><title></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="double-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 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="deploy-1">deploy(1)</olink>, <olink targetdoc="ASREFMAN" targetptr="deploydir-1">deploydir(1)</olink>, <olink targetdoc="ASREFMAN" targetptr="list-components-1">list-components(1)</olink></para>
</refsect1>
</refentry>
<?Pub *0000005827 0>
