RE: [Proxool-user] connection removed when still in use
UNMAINTAINED!
Brought to you by:
billhorsman
From: Bill H. <bi...@lo...> - 2004-02-16 15:16:21
|
Milliblast, On Mon, 2004-02-16 at 15:00, ice blast wrote: > ---- > 138078 [Thread-3] WARN proxool.smsService - Unable to set status of > connection 1 from ACTIVEto AVAILABLE. It remains NULL > ---- That sounds like you are repeatedly closing a connection. It's a bad message that we are going to fix in 0.8.4. To be clear, your loop should do this: while (...) { try { connection = DriverManager.getConnection("proxool.alias"); ... } finally { if (connection != null) { connection.close(); connection = null; } } } The finally clause ensures that all is cleaned up nicely if you hit an exception. Don't worry about the expense of getting a connection each time: that's what connection pools are good at. It's really quick to get a connection. - Bill |