<!--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;
]>
<!--Arbortext, Inc., 1988-2007, v.4002-->
<?Pub UDT _bookmark _target>
<?Pub EntList bull rArr sect>
<?Pub Inc>
<refentry id="create-jdbc-connection-pool-1">
<!-- @(#)create-jdbc-connection-pool.1 1.12 07/07/25 SMI; -->
<refmeta><refentrytitle>create-jdbc-connection-pool</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>create-jdbc-connection-pool</primary>
</indexterm><indexterm><primary>registers the JDBC connection pool</primary>
</indexterm>
<refname>create-jdbc-connection-pool</refname><refpurpose>registers
the JDBC connection pool</refpurpose></refnamediv>
<refsynopsisdiv><title></title>
<synopsis><command>create-jdbc-connection-pool</command> &synopsis-common; [<option
role="double-dash">target</option> <replaceable>target</replaceable>]
 [<option role="double-dash">datasourceclassname</option> <replaceable>classname
</replaceable>] [<option role="double-dash">restype</option> <replaceable>
res_type</replaceable>]
 [<option role="double-dash">steadypoolsize</option> <replaceable>poolsize
</replaceable>] [<option role="double-dash">maxpoolsize</option> <replaceable>
poolsize</replaceable>]
 [<option role="double-dash">maxwait</option> <replaceable>time</replaceable>] [<option
role="double-dash">poolresize</option> <replaceable>limit</replaceable>]
 [<option role="double-dash">idletimeout</option> <replaceable>time</replaceable>] [<option
role="double-dash">isolationlevel</option> <replaceable>isolation_level</replaceable>]
 [<option role="double-dash">isolationguaranteed</option>=<replaceable>true
</replaceable>] [<option role="double-dash">isconnectvalidatereq</option>=<replaceable>
false</replaceable>]
 [<option role="double-dash">validationmethod</option> <replaceable>auto-commit
</replaceable>] [<option role="double-dash">validationtable</option> <replaceable>
tablename</replaceable>]
 [<option role="double-dash">failconnection</option>=<replaceable>false</replaceable>] [<option
role="double-dash">allownoncomponentcallers</option>=<replaceable>false</replaceable>]
 [<option role="double-dash">nontransactionalconnections</option>=<replaceable>
false</replaceable>]
 [<option role="double-dash">description</option> <replaceable>text</replaceable>] [<option
role="double-dash">property</option> <replaceable>(name=value)</replaceable>
 [:<replaceable>name=value</replaceable>]*] <replaceable>connectionpoolid
</replaceable></synopsis>
</refsynopsisdiv>
<refsect1 role="description"><title></title>
<para>The <command>create-jdbc-connection-pool</command> command registers
a new JDBC connection pool with the specified JDBC connection pool
name.</para>
<para>This command is supported in remote mode only.</para>
</refsect1>
<refsect1 role="options"><title></title>
<variablelist termlength="wide">&options-common;
<varlistentry><term><option role="double-dash">target</option></term>
<listitem><para>This option is deprecated.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">datasourceclassname</option></term>
<listitem><para>The name of the vendor&mdash;supplied JDBC datasource
resource manager.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">restype</option></term>
<listitem><para>The interface that the datasource class implements.
Must be one of <classname>javax.sql.DataSource</classname>, <classname>javax.sql.ConnectionPoolDataSource
</classname> or <classname>javax.sql.XADataSource</classname>. It
leads to an error when this option has a legal value and the indicated
interface is not implemented by the datasource class. This option
has no default value.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">steadypoolsize</option></term>
<listitem><para>The minimum and initial number of connections maintained
in the pool. The default value is 8.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">maxpoolsize</option></term>
<listitem><para>The maximum number of connections that can be created.
The default value is 32.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">maxwait</option></term>
<listitem><para>The amount of time a caller will wait before a connection
timeout is sent. The default is 60 seconds. A value of 0 forces the
caller to wait indefinitely.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">poolresize</option></term>
<listitem><para>Quantity by which the pool will scale-up or scale-down
the number of connections. Scale-up: When the pool has no free connections,
pool will scale-up by this quantity. Scale-down: All the invalid and
idle connections are removed, sometimes resulting in removing connections
of quantity greater than this value. Steadypoolsize will be ensured.
Possible values are from 0 to MAX_INTEGER. The default value is 2<?Pub
Caret>. </para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">idletimeout</option></term>
<listitem><para>The maximum time, in seconds, that a connection can
remain idle in the pool. After this time, the implementation can close
this connection. This timeout value must be kept shorter than the
server side timeout value to prevent the accumulation of unusable
connections in the application. The default value is 300.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">isolationlevel</option></term>
<listitem><para>The transaction-isolation-level on the pooled database
connections. This option does not have a default value. If not specified,
the pool operates with the default isolation level that the JDBC driver
provides. </para>
<para>You can set a desired isolation level using one of the standard
transaction isolation levels: <literal>read-uncommitted</literal>, <literal>
read-committed</literal>, <literal>repeatable-read</literal>, <literal>serializable
</literal>. Applications that change the isolation level on a pooled
connection programmatically risk polluting the pool. This could lead
to program errors.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">isisolationguaranteed</option></term>
<listitem><para>This is applicable only when a particular isolation
level is specified for transaction-isolation-level. The default value
is true.</para>
<para>This option assures that every time a connection is obtained
from the pool, isolation level is set to the desired value. This could
have some performance impact on some JDBC drivers. Administrators
can set this to false when the application does not change <option
role="double-dash">isolationlevel</option> before returning the connection.
</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">isconnectvalidatereq</option></term>
<listitem><para>If set to true, connections are validated or checked
to see if they are usable before giving out to the application. The
default value is false.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">validationmethod</option></term>
<listitem><para>The name of the validation table used to perform a
query to validate a connection. Valid settings are: <literal>auto-commit</literal>, <literal>
meta-data</literal>, or <literal>table</literal>. The default value
is <literal>auto-commit</literal>.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">validationtable</option></term>
<listitem><para>The name of the validation table used to perform a
query to validate a connection.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">failconnection</option></term>
<listitem><para>If set to true, all connections in the pool must be
closed when a single validation check fails. The default value is
false. One attempt is made to re-establish failed connections.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">allownoncomponentcallers</option></term>
<listitem><para>A pool with this property set to true, can be used
by non-J2EE components, that is, components other than EJBs or Servlets.
The returned connection is enlisted automatically with the transaction
context obtained from the transaction manager. </para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">nontransactionalconnections
</option></term>
<listitem><para>A pool with this property set to true returns non-transactional
connections. This connection does not get  automatically enlisted
with the transaction manager.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">description</option></term>
<listitem><para>Text providing details about the specified JDBC connection
pool.</para>
</listitem>
</varlistentry>
<varlistentry><term><option role="double-dash">property</option></term>
<listitem><para>Optional attribute name/value pairs for configuring
the connection pool.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="operands"><title></title>
<variablelist termlength="medium">
<varlistentry><term><replaceable>connectionpoolid</replaceable></term>
<listitem><para>The name of the JDBC connection pool to be created.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
<refsect1 role="examples"><title></title>
<example><title>Using create-jdbc-connection-pool command</title>
<screen>asadmin> <userinput>create-jdbc-connection-pool --user admin 
--passwordfile passwords.txt --host localhost --port 7070 
--datasourceclassname org.apache.derby.jdbc.ClientDataSource --restype javax.sql.XADataSource 
--property portNumber=1527:password=APP:user=APP:serverName=
localhost:databaseName=sun-appserv-samples:connectionAttributes=\\;
create\\\\=true sample_derby_pool</userinput>
Command create-jdbc-connection-pool executed successfully</screen>
<para>Where, the sample_derby_pool is created. The escape character
backslash (\\) is used in the <option>--property</option> option to
distinguish the semicolon (;). Two backslashes (\\\\) are used to
distinguish the equal (=) sign.</para>
</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="delete-jdbc-connection-pool-1">delete-jdbc-connection-pool(1)</olink>, <olink targetdoc="asrefman" targetptr="list-jdbc-connection-pools-1">list-jdbc-connection-pools(1)</olink></para>
</refsect1>
</refentry>
<?Pub *0000011432 0>
