commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Steitz" <>
Subject Re: [dbcp] Re: unexpected close
Date Fri, 16 May 2008 07:24:32 GMT
Are you sure the errors are being reported for each connection close,
or are they just being reported when the app shuts down?  If the
latter, issueing bds.close() as part of application shutdown should
address the problem.   BasicDataSource does not close physical
connections when they are returned to the pool, so if your app never
invokes close on the BasicDataSource itself, the connections will be
abandoned on the client (DBCP) side when the app shuts down.  This
does not cause postgres to leak connections, since the client is
dropping the connection, but you see the message in the logs
indicating that a connection has been dropped.  To get rid of the
error message, you need to get DBCP to close the underlying physical
connections.  BasicDataSource's close method does that.


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

View raw message