Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 76f2c8a59960813d44c2bf099ec032a3 > files > 8

postgresql-jdbc-manual-9.2.1002-6.mga4.noarch.rpm

<html><head><META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Application Servers: ConnectionPoolDataSource</title><meta content="DocBook XSL Stylesheets V1.78.1" name="generator"><link rel="home" href="index.html" title="The PostgreSQL&trade; JDBC Interface"><link rel="up" href="datasource.html" title="Chapter&nbsp;11.&nbsp;Connection Pools and Data Sources"><link rel="prev" href="datasource.html" title="Chapter&nbsp;11.&nbsp;Connection Pools and Data Sources"><link rel="next" href="ds-ds.html" title="Applications: DataSource"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table summary="Navigation header" width="100%"><tr><th align="center" colspan="3">Application Servers: <code class="classname">ConnectionPoolDataSource</code></th></tr><tr><td align="left" width="20%"><a accesskey="p" href="datasource.html">Prev</a>&nbsp;</td><th align="center" width="60%">Chapter&nbsp;11.&nbsp;Connection Pools and Data Sources</th><td align="right" width="20%">&nbsp;<a accesskey="n" href="ds-ds.html">Next</a></td></tr></table><hr></div><div class="sect1"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="ds-cpds"></a>Application Servers: <code class="classname">ConnectionPoolDataSource</code></h2></div></div></div><p>
    <span class="productname">PostgreSQL</span>&trade; includes one implementation
    of <code class="classname">ConnectionPoolDataSource</code> named
    <code class="classname">org.postgresql.ds.PGConnectionPoolDataSource</code>.
   </p><p>
    <acronym class="acronym">JDBC</acronym> requires that a
    <code class="classname">ConnectionPoolDataSource</code> be configured via
    JavaBean properties, shown in <a class="xref" href="ds-cpds.html#ds-cpds-props" title="Table&nbsp;11.1.&nbsp;ConnectionPoolDataSource Configuration Properties">Table&nbsp;11.1, &ldquo;<code class="classname">ConnectionPoolDataSource</code> Configuration Properties&rdquo;</a>,
    so there are get and set methods for each of these properties.
   </p><div class="table"><a name="ds-cpds-props"></a><p class="title"><b>Table&nbsp;11.1.&nbsp;<code class="classname">ConnectionPoolDataSource</code> Configuration Properties</b></p><div class="table-contents"><table summary="ConnectionPoolDataSource Configuration Properties" border="1"><colgroup><col><col><col></colgroup><thead><tr><th>Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code class="literal">serverName</code></td><td><span class="type">String</span></td><td><span class="productname">PostgreSQL</span>&trade; database server
         host name</td></tr><tr><td><code class="literal">databaseName</code></td><td><span class="type">String</span></td><td><span class="productname">PostgreSQL</span>&trade; database name</td></tr><tr><td><code class="literal">portNumber</code></td><td><span class="type">int</span></td><td>
        TCP port which the <span class="productname">PostgreSQL</span>&trade;
        database server is listening on (or 0 to use the default port)
       </td></tr><tr><td><code class="literal">user</code></td><td><span class="type">String</span></td><td>User used to make database connections</td></tr><tr><td><code class="literal">password</code></td><td><span class="type">String</span></td><td>Password used to make database connections</td></tr><tr><td><code class="literal">ssl</code></td><td><span class="type">boolean</span></td><td>
        If <code class="literal">true</code>, use SSL encrypted connections
        (default <code class="literal">false</code>)
       </td></tr><tr><td><code class="literal">sslfactory</code></td><td><span class="type">String</span></td><td>
        Custom <code class="classname">javax.net.ssl.SSLSocketFactory</code>
        class name (see <a class="xref" href="ssl-factory.html" title="Custom SSLSocketFactory">the section called &ldquo;Custom SSLSocketFactory&rdquo;</a>)
       </td></tr><tr><td><code class="literal">defaultAutoCommit</code></td><td><span class="type">boolean</span></td><td>
        Whether connections should have autocommit enabled or disabled
        when they are supplied to the caller.  The default is
        <code class="literal">false</code>, to disable autocommit.
       </td></tr></tbody></table></div></div><br class="table-break"><p>
    Many application servers use a properties-style syntax to
    configure these properties, so it would not be unusual to enter
    properties as a block of text.  If the application server provides
    a single area to enter all the properties, they might be listed
    like this:
</p><pre class="programlisting">
serverName=localhost
databaseName=test
user=testuser
password=testpassword
</pre><p>
    Or, if semicolons are used as separators instead of newlines, it
    could look like this:
</p><pre class="programlisting">
serverName=localhost;databaseName=test;user=testuser;password=testpassword
</pre><p>
   </p></div><div class="navfooter"><hr><table summary="Navigation footer" width="100%"><tr><td align="left" width="40%"><a accesskey="p" href="datasource.html">Prev</a>&nbsp;</td><td align="center" width="20%"><a accesskey="u" href="datasource.html">Up</a></td><td align="right" width="40%">&nbsp;<a accesskey="n" href="ds-ds.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">Chapter&nbsp;11.&nbsp;Connection Pools and Data Sources&nbsp;</td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%">&nbsp;Applications: <code class="classname">DataSource</code></td></tr></table></div></body></html>