commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk Verbeeck <dirk.verbe...@pandora.be>
Subject Re: DBCP & mysql hanging after a period of time
Date Wed, 31 Mar 2004 19:05:09 GMT
You can change the "WhenExhaustedAction" using this setter:
((GenericObjectPool) connectionPool).setWhenExhaustedAction(...)
  - WHEN_EXHAUSTED_BLOCK
  - WHEN_EXHAUSTED_FAIL
  - WHEN_EXHAUSTED_GROW

An AbandonedObjectPool has a AbandonedConfig configuration object.
See http://jakarta.apache.org/commons/dbcp/configuration.html for 
details about the configuration options.

If it is database/network connection problem then you should really 
consider using a validationquery.
poolableConnectionFactory.setValidationQuery("...")

-- Dirk

Nathan Ewing wrote:

> What is the best way to change the DEFAULT_WHEN_EXHAUSTED_ACTION? (of
> course this will only prolong the problem until it fills up the queue)
> 
> I don't think my code is causing the connections to be lost, which means
> the root of the problem is out of my control, or is somewhere else (The
> connections are closing in mysql, but not in dbcp).
> 
> Will AbandonedObjectPool allow me to close out connections that DBCP is
> losing, or is there another way?
> 
> 	Thanks,
> 	Nathan




---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message