Re: [Proxool-user] Should conn.close( ) always be called?
UNMAINTAINED!
Brought to you by:
billhorsman
From: kunalashar <kun...@ne...> - 2009-08-18 07:12:16
|
Thanks Bill! ----- Original Message ----- From: Bill Horsman <bi...@lo...> To: pro...@li... Date: Mon, 17 Aug 2009 09:59:06 -0700 Subject: Re: [Proxool-user] Should conn.close( ) always be called? > Hi, > > 1. You do need to call close(). That is your signal that you've finished > with the connection and that it's available for use by someone else. > > 2. No, it does not affect performance. Closing the connection doesn't really > close it - it just marks it as available again. That's the whole point of a > connection pool. > > - > Bill > > 2009/8/15 Kunaal Ashar <kun...@ai...> > > > 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. > > > > > > ------------------------------------------------------------------------------ > > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > > trial. Simplify your report design, integration and deployment - and focus > > on > > what you do best, core application coding. Discover what's new with > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > _______________________________________________ > > Proxool-user mailing list > > Pro...@li... > > https://lists.sourceforge.net/lists/listinfo/proxool-user > > > > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > _______________________________________________ > Proxool-user mailing list > Pro...@li... > https://lists.sourceforge.net/lists/listinfo/proxool-user > > |