commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk Verbeeck <dirk.verbe...@pandora.be>
Subject Re: dbcp bug
Date Tue, 19 Aug 2003 22:09:19 GMT
As far as I know you should be able to use these options with the 
BasicDataSource.
Look at the factory for the supported parameter names:
http://cvs.apache.org/viewcvs.cgi/jakarta-commons/dbcp/src/java/org/apache/commons/dbcp/BasicDataSourceFactory.java?rev=1.5&content-type=text/vnd.viewcvs-markup

More comments on this page:
http://jakarta.apache.org/commons/dbcp/apidocs/org/apache/commons/dbcp/BasicDataSource.html

You want to set "validationQuery" to something like "select 1 from dual" 
or with sybase just "select 1" I think
and enable "testOnBorrow", "testOnReturn" or "testWhileIdle".
With this last option you want to set "minEvictableIdleTimeMillis".

Just use these parameters in your tomcat server.xml configuration.
It they don't work its a bug.


Dirk


Noel J. Bergman wrote:

>Liam,
>
>  
>
>>Is there a plan for a new release in the near future?
>>    
>>
>
>Possibly after some current changes settle.  It might make sense to do a
>release with the fixes before changing how abandoned handling works.
>
>  
>
>>I am also interested in how dbcp deals with closed or 'stale'
>>connections i.e. in the event of a db outage.
>>    
>>
>
>There are several options for when even the currently available binary will
>handle those.  If you look at
>
>
>http://cvs.apache.org/viewcvs.cgi/james-server/src/java/org/apache/james/uti
>l/dbcp/
>
>you can see how we turn that on in our server app.  A problem is that the
>current code does not expose the property to client code, but that was
>easily handled.  The options that are turned on for our code are on testing
>on borrow and return; I didn't bother to enable the periodic checking.
>
>	--- Noel
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>
>
>
>
>  
>




Mime
View raw message