commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Noel J. Bergman" <>
Subject RE: DBCP status?
Date Wed, 02 Jul 2003 20:47:27 GMT
It appears clear that there are two camps, each with fairly strong views.
Personally, I believe that both camps can be accomodated in a way that
should satisfy both.

DBCP should focus on core pooling behavior related to connections and
prepared statements, and leave policy issues to specialized subclasses.  If
DBCP is clean, without any reclaiming of connections and properly setup to
be subclassed, including subclassing a delegating connection, then whomever
needs a specialized connection pool that reclaims connections based upon
some policy can do so.

DelegatingConnection, and the rest of the core objects should be pure and
focused only on the necessary behavior to implement connection pooling.
DBCP should focus on what has to happen when a connection is requested or
returned.  Behavior, not policy, should be the watch word.  There is enough
behavior to deal with related to connection pooling, including ensuring the
proper state of pooled connections.

Some of the "AbandonedTrace" behavior is still necessary to implement the
JDBC specification.  Connections still need to track outstanding statements
and results sets, which are closed by Connection.close().  However, the
"abandoned" semantic is not in the specification.  It is perfectly
permissible to leave a ResultSet or Statement open, and expect the
connection to close it.  Nor is it necessary for DBCP to track leaks,
regardless of whether or not it is implementing recovery.  Both of that
behavior can be implemented by specialized subclasses.  DBCP may wish to
provide abstract classes that facilitate specialization.

	--- Noel

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message