----------------------------------------------------------------
BEFORE YOU POST, search the faq at <http://java.apache.org/faq/>
WHEN YOU POST, include all relevant version numbers, log files,
and configuration files. Don't make us guess your problem!!!
----------------------------------------------------------------
on 4/11/00 6:01 AM, Jonathan Patton <[EMAIL PROTECTED]> wrote:
> I have a couple of Java servlets that connect to a database. I wanted them
> to all share a database connection instead of each one making their own
> database connection each time they run.
And yet another pool can be found here...
<http://java.apache.org/turbine/>
Read the "Getting Started" document on that page on how to use it.
The nice thing about this pool is that it is singleton based so you don't
have to worry about passing connections around once you have them. You
simply get a connection when you need it (from ANYWHERE in your code) and
then release it back when you are done. It also works with many different
databases and can create pools to many different databases all at the same
time.
I don't suggest that you pool connections in the users Session because if
you have 200 concurrent sessions, then you have 200 open databases
connections. That is a bad thing.
-jon
--
Scarab -
Java Servlet Based - Open Source
Bug/Issue Tracking System
<http://scarab.tigris.org/>
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]