At 4:56 PM +0100 7/15/01, Andy C wrote:
>Sorry Brad I wasn't clear about the problem !  I don't actually close
>the connections (I was typing the message too fast I guess).  Besides
>it doesn't happen with every use of the database but rather it builds up
>over time.

Yeah, that's tougher. I was having similar problems myself. Solved it
by moving the connection pool management problem out of the
application and handling it at the system level. The same goes for
logfile connections.

To see how this works, go to http://virtualschool.edu/jwaa, click
JavaDox, and look at AbstractServlet. Notice that it creates/destroys
Ctx objects before/after passing the Ctx to the application for use.
Ctx inherits JdbcCtx, which manages a ConnectionPool instance for
each page dispatch. ConnectionPool manages the pool itself.

The notion here is that getting connections from a pool is fast so
there's no point in conserving them. One per dispatch uses them
lavishly, but they are now obtained and released centrally so you
don't have to debug connection pool leaks throughout the application.
--
For industrial age goods there were checks and credit cards.
For everything else there is mybank.dom at http://virtualschool.edu/mybank
Brad Cox, PhD; [EMAIL PROTECTED] 703 361 4751

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to