db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Kalén <mka...@apache.org>
Subject Commons DBCP (was: Re: [OJB 1.1] Initial version check in)
Date Wed, 11 Aug 2004 11:02:01 GMT
Armin Waibel wrote:

> ** only supported by ConnectionFactoryDBCPImpl and deprecated. Should be 
> removed.
> <!ATTLIST connection-pool
>     connection-factory              CDATA #IMPLIED
>     **logAbandoned                    (true|false) #IMPLIED
>     **removeAbandoned                 (true|false) #IMPLIED
>     **removeAbandonedTimeout          CDATA #IMPLIED

On the Jakarta Commons DBCP Wiki pages I found the following info (see 
Q: I see in the javadocs that AbandonedConnectionPool was deprecated (DBCP 1.1). What 
replaced it?

A: The original reason for deprecation was the danger in reusing a abandoned connection 
without knowing if it is safe to do so. There was a discussion about it in april. Some 
people wanted to remove it completely.

I took a different approach. In 1.1 an abandoned connection will not be reused but closed

(and a new one created). The classes remained deprecated because I think the AbandonedPool

should move to the pool package (and made more generic/safe).

The abandoned connection feature on BasicDataSource will remain supported in one form or 
another. I'm not using it on my tomcat production configurations but there are junit tests

to make sure everything works.

So if you are using the Abandoned* classes directly then it is possible you are affected 
by a future refactoring (we will try to remain compatible if possible of course). If you 
use BasicDataSource then you can be sure the feature will remain.

So when we implement the custom connection attributes in OJB1.1 we should probably also 
upgrade to Commons DBCP 1.2.1 and try to use the BasicDataSource instead of AbandonedConfig.


To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org

View raw message