I agree that it is a wrong configuration. Accidentally some one had  set
this configuration and I haven't seen any exceptions. But seeing the
behaviour which I explained. So, I raised this issue.

--Bhaskar

> -----Original Message-----
> From: David Smith [mailto:[EMAIL PROTECTED] 
> Sent: Monday, October 15, 2007 6:51 PM
> To: Tomcat Users List
> Subject: Re: Issues with eviction configuration
> 
> Regarding testOnBorrow, the method signature is below:
> 
> BasicDataSource.setTestOnBorrow( boolean )
> 
> Note this is not an arbitrary string, but specifically true 
> or false.  
> Your config would most likely throw an exception.  The 
> validation query must be set via validationQuery.  I would 
> strongly recommend you read the javadocs in the DBCP project 
> -- http://commons.apache.org/dbcp.
> 
> --David
> 
> Bhaskar wrote:
> 
> >Hi,
> >I am currently using dbcp 1.2.1 with common pool 1.3. 
> Currently i have 
> >following settings in server.xml:
> >maxActive = 50
> >maxIdle = 30
> >factory=org.apache.commons.dbcp.BasicDataSourceFactory
> >maxWait=10000
> >timeBetweenEvictionRunsMillis=900000
> >numTestsPerEvictionRun=50
> >minEvictableIdleTimeMillis=1800000
> >testWhileIdle=true
> >testOnBorrow = 'select 1 from dual'
> >
> >Note that I have NOT set the validationQuery. And 
> testOnBorrow's value 
> >has NON boolean value. If this the case, how does eviction 
> logic work? 
> >During each eviction run, since testWhileIdle is set to true and 
> >validationQuery is not set, will it still validate each connection?
> > 
> >Issue is, morning when i checked netstat, i saw 30 connections 
> >established to oracle but in the afternoon it became 25. How is it 
> >possible? With the above configuration, It can go below 30 only when 
> >the connection is found to be invalid in eviction run. Is there any 
> >other possibility? (note that from oracle, nobody went and 
> killed the session so, this path is ruledout).
> >But since i don't have validationQuery how does eviction logic 
> >validates the connection object and  takes out the 
> connection from pool?
> > 
> >Can some one throw the light please?
> >
> >Thanks,
> >Bhaskar
> > 
> >System info:
> >---------------  S Y S T E M  ---------------
> > 
> >OS:Red Hat Enterprise Linux AS release 4 (Nahant Update 2)
> > 
> >uname:Linux 2.6.9-22.ELsmp #1 SMP Mon Sep 19 18:32:14 EDT 2005 i686 
> >libc:glibc 2.3.4 NPTL 2.3.4
> >rlimit: STACK 10240k, CORE infinity, NPROC 64511, NOFILE 1024, AS 
> >infinity load 
> >average:32521507848154406741802153150725333911402357057208120
> 8587916205
> >35910
> >4.00
> >1311988116060425697605000272997870240973529468951702809433435
> 0846478688
> >26738
> >8972635621073035569668699711945132023521611632108064208733510
> 8750767273
> >03847
> >5800621827641579806615210529115622778654545791307446324043502
> 9386688050
> >95862
> >304768.00 0.00
> > 
> >CPU:total 4 family 15, cmov, cx8, fxsr, mmx, sse, sse2
> > 
> >Memory: 4k page, physical 998k(311k free), swap 2047k(2047k free)
> > 
> >vm_info: Java HotSpot(TM) Server VM (1.4.2_13-b06) for 
> linux-x86, built 
> >on Oct 18 2006 09:55:11 by unknown with unknown compiler
> >
> >
> >  
> >
> 
> 
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org To 
> unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to