hi tom,
have a servlet that implements the multithreaded model. within that servlet
create multiple database connections which can be configured by the user. i
mean the user will decide on the no. of database connections or you can
create a prefixed number. add all these thread references(the database
connections ) to a hashtable or to any data structure which java provides
and keep a count of the no of connections. have a thread which will look out
for database connections (i mean ping for it). everytime a request comes
across get a reference to the existing thread(connection) from the hashtable
(i mean notify the thread) and decrease the thread count. once the
connection is released instead of closing the connection release it back
into the pool.
-----Original Message-----
From: boby on nestinfotech.com <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Wednesday, February 02, 2000 6:55 PM
Subject: How to implement connection pooling?
>Hi,
>Can anybody shed light on what is the most effective way for connection
>pooling? Mine is a simple application, wherein the servlet retrieves data
>from a database based on query from an HTML forms.
>Thanx in advance
>
>Boby Thomas
>
>___________________________________________________________________________
>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
___________________________________________________________________________
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