commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Timko, Cheryl A." <>
Subject RE: DBCP Connection recycling
Date Wed, 09 Apr 2003 11:57:05 GMT
Be aware, pool.close() will close all the connections idle in the pool.
Connections that are currently being used will not be closed.... Which, in
your case, I am not sure if it really matters.

- Cheryl

-----Original Message-----
From: Ramrakhiani, Vikas [] 
Sent: Wednesday, April 09, 2003 1:32 AM
To: 'Jakarta Commons Users List'
Subject: RE: DBCP Connection recycling

You may use pool.close() and reload the pool again.


-----Original Message-----
From: Saravanan Bellan []
Sent: Wednesday, April 09, 2003 3:15 AM
To: ''
Subject: DBCP Connection recycling

I want the connections in my pool to be recycled after a certain period
of time or certain number of connections. What I mean by recycle is close
actual connection and open a new one. The reason for this is that Postgres
on windows leaks semaphore handles if the same connection is being used for
extended period of time.

I was thinking that the removeAbandoned parameter would do something, but it
kicks in
only during some extreme cases, like the numIdle < 2  and numActive is
to maxActive.

    public synchronized Object borrowObject() throws Exception {
        try {
            if (config != null
                    && config.getRemoveAbandoned()
                    && (getNumIdle() < 2)
                    && (getNumActive() > getMaxActive() - 3) ) {

I want to be able to recycle the connection irrespective of idle
and active connections.

Is there a way to do it? If not can it be taken as a valid enhancement
request(a new parameter timetolive, for eg.)

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

Notice:  This e-mail message, together with any attachments, contains information of Merck
& Co., Inc. (Whitehouse Station, New Jersey, USA) that may be confidential, proprietary
copyrighted and/or legally privileged, and is intended solely for the use of the individual
or entity named in this message.  If you are not the intended recipient, and have received
this message in error, please immediately return this by e-mail and then delete it.


View raw message