I can recommend the DBConnectionManager class by Gefion Software, which
was written up in a recent trade magazine. Follow this URL for details:
http://www.WebDevelopersJournal.com/columns/connection_pool.html
It's very simple to implement, and quite flexible for multiple pools,
database vendors, etc.
Constantin
---
Maxime Poulin wrote:
>
>
> Hi all !
>
> I have this application which has an Applet to communicate
> with servlets to access database information. The servlets are
> separated by "subjects". For example, to access the inventory, the
> applet calls SSInventory (servlet) or to access People information,
> the applet uses SSPeople.
>
> In the previous version of the application, each servlet had
> as a static variable a DBConnection instance. That instance was
> created in the init() method of the servlet. This means that once a
> servlet is initialized, it has a DBConnection instance, even though
> the servlet remains not used for days. In this case, we had 13
> servlets, so 13 "pending" connections.
>
> In the new version, I was hoping to improve this little fact.
> I was thinking of a connection pool, which would be kept in some
> service servlet. This connection pool would create new connections as
> needed or used unused connections. The thing is that our application
> can be used by a company with about 50 employees or with 10 000
> employees.
>
> So how do I manage this connection pool ? Is it a good idea ?
> What is the best way to manage connections to the database ?
>
> Thanks you all !
>
> Max.
___________________________________________________________________________
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