Hello
This is my first post to a board here so I hope I am providing enough infromation.
I am running a complex Tomcat Application and in my server XML file I have a resource like this.
Code:
<Resource auth="Container"
driverClassName="oracle.jdbc.driver.OracleDriver"
maxActive="10" initialSize="3" maxIdle="10" minIdle="10" name="jdbc/LiferayPool" password="password" type="javax.sql.DataSource"
maxWait="10000" url="jdbc:oracle:thin:@localhost:1521:xe" username="upointLiferay_5103"
testOnBorrow="true" validationQuery="SELECT 1 from DUAL" validationInterval="600000"
/>
My hope was that it would run the validation query when ever I check a connection out of the pool. Instead it runs the query thousands of times. I noticed that even if I put testOnBorrow=false, it still executes the queries. It seems to be doing it once before every SQL call instead of doing it once every 60 seconds per connection. My goal is to automatically get rid of connections that were invalidated by unscheduled database outages. I'm hoping it's jsut something silly I'm doing but can't seem to figure it out.
I played with the min and max active/idle connections thinking the pool was reaching 0 thus treating every connection like a brand new one.
Any thoughts?