Charles, see also my reply to Nanda Kumar's thread "Cannot get a connection, pool exhausted" for a coding example. HTH :)
> -----Original Message----- > From: Steve Kirk [mailto:[EMAIL PROTECTED] > Sent: Wednesday 26 October 2005 14:01 > To: 'Tomcat Users List' > Subject: RE: Tracking > > > > Charles, I don't know of a way to have TC clear up conns for > you, but you > really should clear up connections explicitly. To some > extent DBCP will > clear up "abandoned" connections (to which you had a variable > reference, > which goes out of scope when you have finished processing the > request), but > this is bad style rally and you should not rely on it. > > The "standard" way to clear up connections is to use a > try/catch/finally > structure in your code. > > eg > (I'm assuming that you are using DBCP) > > Connection c = MyClass.getConnection(); // or however > you get a conn from > the pool > try > { > // use the connection to do whatever > } > catch(Exception e) > { > // handle exceptions > } > finally > { > c.close(); > } > > > -----Original Message----- > > From: Charles P. Killmer [mailto:[EMAIL PROTECTED] > > Sent: Tuesday 25 October 2005 21:05 > > To: Tomcat Users List > > Subject: Tracking > > > > My bigger problem is that I am using Connection pooling. And > > if I don't > > close every connection when I am down with it, the server stops > > responding. Restart Tomcat and everything is back to normal. > > Is there > > a setting to have Tomcat close all connections for me when a request > > finishes? > > > > --------------------------------------------------------------------- > 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]