It is for me a very old question ..
Since 3 years I manipule JDBC and connection single or pool my experience is
that one :
1) if your application is read only and not many concurents clients, and if
all yours clients are the permission to access, a single connection in the
init method with a user and password ad hoc is sufficient.
But a little thing: : I think that 2 or more statements created on the same
connection are executed in sequence ..but I am not sure ..
2) If your application, in one servlet, have to update the database, with
the single thread servlet it is possible to have only one connection, but
don't forget to close the statement and resultset !! So all the servlets are
executed in sequence ..
3) If you have to manage commit and rollback, it is for one connection, so
you have to open one connection for one client, so the pool is necessary ..
CH
----- Original Message -----
From: "Alfredo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, March 02, 2001 8:59 PM
Subject: Tomcat + MySQL + Connection Pooling
> Hi everyone,
>
> The question is, do I need connection pooling?
>
> I'm using Tomcat + MySQL with a few servlets in a three tier app. I'm
> wondering why I should use CP if I'm already creating the DB connection in
> the init() method of the servlets, and so it persists and is shared along
> all the instances of that servlet.
>
> Thanks in advance for any help you can provide ( and sorry if this post
has
> already been answered :-) )
>
>
___________________________________________________________________________
> 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