<!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 Dash "&ndash;">
<!ENTITY % commonents SYSTEM "smancommon.ent">
%commonents;
<!ENTITY % booktitles SYSTEM "booktitles.ent">
%booktitles;
]>
<?Pub UDT _bookmark _target>
<?Pub Inc>
<refentry id="add-resources-1">
<refmeta><refentrytitle>add-resources</refentrytitle><manvolnum>1</manvolnum>&metainfo;
</refmeta>
<refnamediv><indexterm><primary sortas="add&mdash;resources">add-resources &mdash;
creates the resources specified in an XML file specified</primary></indexterm>
<indexterm><primary sortas="registers the resource in the XML file specified">
registers the resource in the XML file specified &mdash; add-resources</primary>
</indexterm><refname>add-resources</refname><refpurpose>creates the resources
specified in an XML file</refpurpose></refnamediv>
<refsynopsisdiv><title>&synp-tt;</title>
<cmdsynopsis><command>add-resources</command>&synopsis-common;
<arg choice="opt">&Dash;&Dash;target <replaceable>target</replaceable></arg>
<arg choice="plain"><replaceable>xml_file_path</replaceable></arg>
</cmdsynopsis></refsynopsisdiv>
<refsect1><title>&desc-tt;</title>
<para>The <command>add-resources</command> command creates the resources named
in the specified XML file. The <replaceable>xml_file_path</replaceable> is
the path to the XML file containing the resources to be created. The <literal>
DOCTYPE</literal> must be specified as <filename><replaceable>install_dir
</replaceable>/lib/dtds/sun-resources_1_2.dtd</filename> in the <filename>
resources.xml</filename> file.</para>
<para>This command is supported in remote mode only.</para>
</refsect1>
<refsect1><title>&opts-tt;</title>
<variablelist termlength="medium">&options-common;
<varlistentry><term><option role="nodash">&Dash;&Dash;target</option></term>
<listitem><para>Specifies the target for which you are creating the resources.
Valid values are<itemizedlist><?Pub Caret>
<listitem><para><literal>server</literal>, which creates the resources for
the default server instance <literal>server</literal> and is the default value
</para>
</listitem>
<listitem><para><literal>domain</literal>, which creates the resources for
the domain</para>
</listitem>
<listitem><para><replaceable>cluster_name</replaceable>, which creates the
resources for every server instance in the cluster</para>
</listitem>
<listitem><para><replaceable>instance_name</replaceable>, which creates the
resources for a particular server instance</para>
</listitem>
</itemizedlist></para>
</listitem></varlistentry>
</variablelist></refsect1>
<refsect1><title>&oper-tt;</title>
<variablelist termlength="medium">
<varlistentry><term><replaceable>xml_file_path</replaceable></term><listitem>
<para>The path to the XML file containing the resource(s) to be created.</para>
<para>An example XML file follows. Replace <literal>&lt;install_dir></literal>
with the location of your Application Server installation.</para>
</listitem></varlistentry>
</variablelist><para><screen>&lt;?xml version="1.0" encoding="UTF-8"?>
&lt;!DOCTYPE resources PUBLIC 
   "-//Sun Microsystems Inc.//DTD Application Server 9.0 Domain//EN" 
   "*&lt;install_dir>/lib/dtds/sun-resources_1_2.dtd*">

&lt;resources>
 &lt;jdbc-connection-pool name="SPECjPool" steady-pool-size="100" 
   max-pool-size="150" max-wait-time-in-millis="60000" 
   pool-resize-quantity="2" idle-timeout-in-seconds="300" 
   is-isolation-level-guaranteed="true" 
   is-connection-validation-required="false" 
   connection-validation-method="auto-commit" 
   fail-all-connections="false" 
   datasource-classname="oracle.jdbc.pool.OracleDataSource">
  &lt;property name="URL" 
    value="jdbc:oracle:thin:@iasperfsol12:1521:specdb"/>
  &lt;property name="User" value="spec"/>
  &lt;property name="Password" value="spec"/>
  &lt;property name="MaxStatements" value="200"/>
  &lt;property name="ImplicitCachingEnabled" value="true"/>
 &lt;/jdbc-connection-pool>
 &lt;jdbc-resource enabled="true" pool-name="SPECjPool" 
   jndi-name="jdbc/SPECjDB"/> 
&lt;/resources></screen></para>
</refsect1>
<refsect1><title>&exam-tt;</title>
<example>
<title>Using the add-resources command</title>
<para>The following command creates resources using the contents of the XML
file <filename>resource.xml</filename>:</para>
<screen>asadmin> <userinput>add-resources --user admin --passwordfile passwords.txt 
--host localhost --port 4848 resource.xml</userinput>
 =========================
Added Resource Type: jdbc-connection-pool
 =========================
Added Resource Type: jdbc-resource
 =========================
Added Resource Type: persistence-manager-factory-resource
Command add-resources executed successfully.

</screen>
</example>
</refsect1>
<refsect1><title>&exit-tt;</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="create-jdbc-connection-pool-1"><citerefentry><refentrytitle>
create-jdbc-connection-pool</refentrytitle><manvolnum>1</manvolnum></citerefentry></link>, <link
linkend="create-jdbc-resource-1"><citerefentry><refentrytitle>create-jdbc-resource
</refentrytitle><manvolnum>1</manvolnum></citerefentry></link>, <link linkend="create-jms-resource-1"><citerefentry>
<refentrytitle>create-jms-resource</refentrytitle><manvolnum>1</manvolnum>
</citerefentry></link>, <link linkend="create-jndi-resource-1"><citerefentry>
<refentrytitle>create-jndi-resource</refentrytitle><manvolnum>1</manvolnum>
</citerefentry></link>, <link linkend="create-javamail-resource-1"><citerefentry>
<refentrytitle>create-javamail-resource</refentrytitle><manvolnum>1</manvolnum>
</citerefentry></link>, <link linkend="create-persistence-resource-1"><citerefentry>
<refentrytitle>create-persistence-resource</refentrytitle><manvolnum>1</manvolnum>
</citerefentry></link>, <link linkend="create-custom-resource-1"><citerefentry>
<refentrytitle>create-custom-resource</refentrytitle><manvolnum>1</manvolnum>
</citerefentry></link></para>
</refsect1>
</refentry>
<?Pub *0000006455>
