I was exploring the connection pool solution for my servlets for some time
already. And there was a lot of discussion previously on this mailing list.
You can search the archives.

Here are the links I have found here:

http://www.javaexchange.com <http://www.javaexchange.com>
http://www.javaworld.com <http://www.javaworld.com>
http://WebDevelopersJournal.com/columns/connection_pool.html
<http://WebDevelopersJournal.com/columns/connection_pool.html>
http://www.ewin.org/~bret/java/ <http://www.ewin.org/~bret/java/>
http://www.javaworld.com/javaworld/jw-06-1998/jw-06-object-pool.html
<http://www.javaworld.com/javaworld/jw-06-1998/jw-06-object-pool.html>

None of them is automatically reducing its size. But it wold be easy to add
this functionality since most of them have remove method to free connection.
So you can just extend the existing one you choose and, say, add some
housekeeping thread to do it. Frankly, I don't believe that would be an
issue. But I am gonna check. I have written application that tests pool by
having multiple threads grabbing the connection and running the simple
query. So I can check how many connections were actually opened. I will
definitely do it. Let me know if you are interested in the results.

BTW, I am myself leaning towards http://www.ewin.org/~bret/java/
<http://www.ewin.org/~bret/java/>  solution. That guy also has more generic
one, check this:
http://www.javaworld.com/javaworld/jw-06-1998/jw-06-object-pool.html
<http://www.javaworld.com/javaworld/jw-06-1998/jw-06-object-pool.html>  but
there is no source code there and actually I got some exceptions running it.
But I think that idea is just the right one since it is in line with the
JDBC 2.0 standard extension.

HTH,
Mike

        -----Original Message-----
        From:   Alvin Lau [SMTP:[EMAIL PROTECTED]]
<mailto:[SMTP:[EMAIL PROTECTED]]>
        Sent:   Friday, March 26, 1999 8:39 AM
        To:     [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
        Subject:        Re: Connection Pool

        What i mean is that if each of my servlets has its own connection
pool,
        each pool contains 30 connections, and I have 10 servlets, then I
have 300
        connections in total if the pool doesn't reduce its size.

        The first time i see connection pool is in john hunter's book, and
that
        pool doesn't reduce its size after a connection return. can you tell
me
        where i can donwload a better package? I don't want to write it by
myself.

        thank anyway,

        alvin


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

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

___________________________________________________________________________
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