You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tony Fountain <tf...@benefitconcepts.com> on 2007/10/25 19:19:49 UTC

Suggestions for connection pooling

Platform:
Apache Tomcat 5.5.23 running as windows service
JVM 1.5.0_12-b04 (Sun)
Windows 2003 Server
 
We are running software on this platform that we purchased and
integrated into our product.  We replaced the default authentication
class of the product with our own implementation.  This resulted in a
Java class that performs many database calls to SQL Server 2005.  This
all works and I'm in a mode of optimizing it and found that I'm creating
a database connection for every call (sometimes a single action sends
many requests).  I've been researching options for implementing
connection pooling but I have found many variations and no really solid
examples.  I'm pretty new to Java / Tomcat so I'm in search of
suggestions and recommendations from more experienced individuals on the
following topics:

*	How configure a JNDI resource (versus hardcoding the connection
in the class - which is what I do now).  I've tried this with some
examples and have been unable to get it to work.
*	How can I implement connection pooling?  Do I need to roll my
own solution or is there a magical way to tap into Tomcat and allow it
to manage the connection pool (latter is preferred).

Config file and Java code examples would be very helpful as well.  Also,
keep in mind that even though the JVM is at 1.5, the product is compiled
at 1.4 if that makes a difference.
 
Thanks!
Tony