<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™ JDBC Interface"><link rel="up" href="datasource.html" title="Chapter 11. Connection Pools and Data Sources"><link rel="prev" href="datasource.html" title="Chapter 11. 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> </td><th align="center" width="60%">Chapter 11. Connection Pools and Data Sources</th><td align="right" width="20%"> <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>™ 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 11.1. ConnectionPoolDataSource Configuration Properties">Table 11.1, “<code class="classname">ConnectionPoolDataSource</code> Configuration Properties”</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 11.1. <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>™ 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>™ 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>™ 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 “Custom SSLSocketFactory”</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> </td><td align="center" width="20%"><a accesskey="u" href="datasource.html">Up</a></td><td align="right" width="40%"> <a accesskey="n" href="ds-ds.html">Next</a></td></tr><tr><td valign="top" align="left" width="40%">Chapter 11. Connection Pools and Data Sources </td><td align="center" width="20%"><a accesskey="h" href="index.html">Home</a></td><td valign="top" align="right" width="40%"> Applications: <code class="classname">DataSource</code></td></tr></table></div></body></html>