Shailender You can configure your connection pool to close resources after a period of time with the following options:
GenericObjectPool genericObjectPool = new GenericObjectPool(null); genericObjectPool.setMaxActive(value); genericObjectPool.setMaxIdle(value); genericObjectPool.setMaxWait(value); Defined here: http://jakarta.apache.org/commons/pool/apidocs/org/apache/commons/pool/impl/ GenericObjectPool.html However not closing you connections is bad practice. You should not configure the GenericObjectPool to close your resources as a way of escaping bad code. I guess must people will tell you the same thing. Imagine if you did not pool your Database resources, you would end up with an application with no connections available. Always in your finally do: try { conn.close(); } catch (Throwable te) { // Unecessary catch block } Regards, Mark -----Original Message----- From: Shailender Jain [mailto:[EMAIL PROTECTED] Sent: 09 May 2005 11:27 To: user@struts.apache.org Subject: Connection Leakage Hello All, I have got a application which is running live. (Struts with the usage of DBCP for connection pooling) We have found a problem that at many places we have not closed the connections. To solve this problem we thought of increasing the number of Maximum active connection. We are also thinking if there is a way by which we can configure the connection pool so that it should close the connection after some time if it is not done by the code. Thanks Shailender Jain --------------------------------------------------------------------- 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]