From: Kunaal A. <kun...@ai...> - 2009-08-16 05:29:12
|
I'm writing new DB connection code, and thought I'd try proxool as the connection pool implementer. Normally, a programmer would ensure that every DriverManager.getConnection(...) is followed by a connection.close(). But when using Proxool, is the close needed? I'm confused because: a. The proxool documentation here shows the close() being called, yet b. I read someplace that proxool adds shutdown hooks that close all connections when the program exits. My program's paramount concern is performance (up to 200 DB writes/second), so I'm not sure how Proxool's getConnection()/close() will impact performance. My questions are: 1. Is the close() needed, or can I rely on Proxool to close my connections? 2. If I have to explicitly call the close() myself every time, won't that adversely affect performance? Thanks in advance. |