Graham Lounder wrote:
Hello All,
I've been using OJB on many projects and find it makes my life a whole lot easier. I currently have a project that has over 1500+ unique logins each day. I've got two tomcat servers setup, each with a connection pool found below. There is a firewall between the tomcat box and the database box. It seems like the connection pool is only making one connection and after an hour, the connection gets discarded with the following message:
15 Jan 16:03:21 WARN [Thread-58] ConnectionFactoryPooledImpl - Validation query for connection failed, discard connection. Message: Io exception: Connection timed out
This warning is ok. It signals that the validation query fails. The ConnectionFactoryPooledImpl class now returns false in validateObject(Object obj) method of commons-pool. Now the commons-pool is responsible to handle this stuff. Connection validate false --> close connection and try the next from the pool or create a new one --> pass it to ConnectionFactoryPooledImpl validateObject method .... and so on till we found a valid connection.
I think the connection is dying on the firewall, but shouldn't the validation query create a new connection?
yes, but this stuff is handled by commons-pool not by ConnectionFactoryPooledImpl. How does the whole stack trace look like?
We are near final 1.0 version. So I recommend to wait until 1.0 was released (Should be out sooner or later ;-) - think in a few days).I'm using ojb 0.9.9. Is there anything I can do to get a reliable connection pool? Should I upgrade to the latest version of OJB or can anyone see a problem with my settings?
But I think the problem is another one.
regards, Armin
<jdbc-connection-descriptor jcd-alias="default" default-connection="true" platform="Oracle" jdbc-level="2.0" driver="oracle.jdbc.driver.OracleDriver" protocol="jdbc" subprotocol="oracle"
<connection-pool maxActive="41" maxIdle="10" maxWait="20000" minEvictableIdleTimeMillis="-1" numTestsPerEvictionRun="10" testOnBorrow="true" testOnReturn="false" testWhileIdle="true" whenExhaustedAction="1" validationQuery="select 1 from dual" /> </jdbc-connection-descriptor>
Thanks, Graham
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
