tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralph Einfeldt" <ralph.einfe...@uptime-isc.de>
Subject RE: DB Connection
Date Tue, 27 May 2003 06:07:51 GMT
There are some advantages in using a connection pool:

- With several databases it takes some time to connect to a
  database (mysql is quite fast in this respect)
- You can limit the number of concurrent connections without 
  limiting the number of concurrent users in the same way.
  (Request for a connection are queued, so instead of simply
  getting an error the user has just to wait a little bit 
  longer for his data)
- Some pools provide means to identify or handle a connection 
  leak
- You can get well defined error messages if the pool can't get
  a connection within a configured timeslot.

For your last question:

I don't like the idea of automatically closing abandoned 
connections. I prefer to get clear warnings or errors
if this happens, as this enforced the elimination of the 
cause and not just to cure the symptoms.

> -----Original Message-----
> From: Jan Behrens [mailto:jan@diekleinedomain.de]
> Sent: Monday, May 26, 2003 11:19 PM
> To: Tomcat Users List
> Subject: RE: DB Connection
> 
> I understand that, in using a  connection pool i can get 
> Tomcat to handle the number of connections at any given 
> time. Is that correct? If I still have to ensure that all 
> ResultSet's and connections have to be closed, then where 
> is the advantage? And, would it be a good idea to 
> automatically close abandoned connections after a certain 
> amount of time?

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message