Re: summary of new features in JDBC 3.0 - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: summary of new features in JDBC 3.0
Date
Msg-id 41802A6D.10703@opencloud.com
Whole thread Raw
In response to Re: summary of new features in JDBC 3.0  (Vadim Nasardinov <vadimn@redhat.com>)
List pgsql-jdbc
Vadim Nasardinov wrote:

> In addition to these, Section 11.7 "ConnectionPoolDataSource
> Properties" (p. 78), defines these:
>
>  TABLE 11-1  Standard Connection Pool Properties
>
>  +------------------------------------------------------------------------+
>  |  Property Name  | Type |                  Description                  |
>  |-----------------+------+-----------------------------------------------|
>  | maxStatements   | int  | The total number of statements that the pool  |
>  |                 |      | should keep open. 0 (zero) indicates that     |
>  |                 |      | caching of statements is disabled.            |
>  |-----------------+------+-----------------------------------------------|
>  | initialPoolSize | int  | The number of physical connections the pool   |
>  |                 |      | should contain when it is created             |
>  |-----------------+------+-----------------------------------------------|
>  | minPoolSize     | int  | The number of physical connections the pool   |
>  |                 |      | should keep available at all times. 0 (zero)  |
>  |                 |      | indicates that connections should be created  |
>  |                 |      | as needed.                                    |
>  |-----------------+------+-----------------------------------------------|
>  | maxPoolSize     | int  | The maximum number of physical connections    |
>  |                 |      | that the pool should contain. 0 (zero)        |
>  |                 |      | indicates no maximum size.                    |
>  |-----------------+------+-----------------------------------------------|
>  | maxIdleTime     | int  | The number of seconds that a physical         |
>  |                 |      | connection should remain unused in the pool   |
>  |                 |      | before the connection is closed. 0 (zero)     |
>  |                 |      | indicates no limit.                           |
>  |-----------------+------+-----------------------------------------------|
>  | propertyCycle   | int  | The interval, in seconds, that the pool       |
>  |                 |      | should wait before enforcing the current      |
>  |                 |      | policy defined by the values of the above     |
>  |                 |      | connection pool properties                    |
>  +------------------------------------------------------------------------+

I never understood why these properties were there. The
ConnectionPoolDataSource does not own and manage the connection pool
(despite the misleading name) -- it just provides the primitives so that
a pooling implementation can be built on top of it -- so why do the
properties live there?

I wonder if it is a persistent typo in the spec, and those properties
are actually meant to manage the statement pool, not the connection
pool. That would make more sense since the statement pool lives entirely
inside the datasource.

As it is, maxStatements is the only one that makes any sort of sense..

-O

pgsql-jdbc by date:

Previous
From: Vadim Nasardinov
Date:
Subject: Re: JDBC CTS 1.2.1
Next
From: Dave Cramer
Date:
Subject: Re: JDBC CTS 1.2.1