--- "Noel J. Bergman" <[EMAIL PROTECTED]> wrote: > 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().
Agreed, but the way it was implemented was completely wrong. The behavior should not have been in a superclass and forced unrelated classes to subclass it. > 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. I agree. Let DBCP focus on it's core responsibilities and provide easy hooks to allow logging, policy decisions, etc. David > DBCP may wish to > provide abstract classes that facilitate specialization. > > --- Noel > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
