tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Smith <>
Subject Re: Is Connection Pooling still necessary?
Date Thu, 17 Apr 2008 17:08:48 GMT
Pooling still makes sense although in modern servlet containers it's 
provided.  Outside the JVM, there's the overhead of making the 
connection and authenticating that can eat up significant amounts of 
time in busy sites with large numbers of queries to the db.  Those costs 
are completely outside the JVM and would occur in stuff built with any 
of the other languages.

Overall, do some performance testing on your webapp.  If it's need of a 
database is so low that connections timeout and get recycled between 
borrows from the pool, you probably could get away with out the pooling.


Jonathan Mast wrote:

>I'm developing a webapp that is going to be making frequent DB operations.
>I know that DB connections are expensive and that developers pool
>connections to prevent the overhead of frequent instantiation.  Is this
>design pattern still necessary?  I ask because I vaguely recall skimming
>over an article that stated that this design pattern is not needed anymore
>with newer versions of Java.
>Currently, our webapps make infrequent calls to our database and as such I
>simply use a static getConnection() method to create new Connections, which
>I explicitly close at the end of their use.
>I realize that our setup, Tomcat 5.5 on Java 1.4.2, will almost certainly
>require connection pooling.  But does newer versions of Java obviate this
>Any pointers to relevant (ie. JDK 1.4.2) tutorials on this topic would be
>greatly appreciated.

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message