> Database connection pools.
>
> If I have the code in each of my servlets, i.e. the code that calls
> the connection pool servlet and this code.
>
> pool = new ConnectionPool(dba, user, passwd,
> "oracle.jdbc.driver.OracleDriver", 2,1);
>
> Is this not the same as making a new connection with each servlet.
>
> How does this improve my connection timing?
        Ummm... It doesn't, but that's because you're mis-applying the
pattern.  The idea is to have N Connections in the ConnectionPool, and
then call dbConn = pool.getConnection();  The pool object keeps an
internal counter, and keeps track of how many of its connections are in
use.  The pool should generally be implemented as a singleton.
        I'd recommend reading Grand's book "Patterns in Java", if you haven't
yet...

--
Within C++ is a smaller, cleaner language
struggling to get out.
It's called Java.

Thomas Moore
[EMAIL PROTECTED]        Home Account
Software.Engineer         [EMAIL PROTECTED]
phone://732.462.1880:268  NJ Patterns Group Home Page
employer://Celwave, RF    http://members.home.net/twmoore/cjpg

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to