File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Connection Pooling in tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Connection Pooling in tomcat" Watch "Connection Pooling in tomcat" New topic
Author

Connection Pooling in tomcat

Glenny Dsilva
Ranch Hand

Joined: May 09, 2005
Posts: 42
I am using servlets tomcat 5.0 webserver and mysql as database in my project.

I want to use connection pooling.

If i want 50 active connections in my application.

How do i configure it in my web application.

Can someone explain or give me a url to configure it.
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

Presuming you are happy using Tomcat's default connection pool (DBCP) you just configure your DataSource to use up to 50 connections with the "maxActive" parameter. If you read through the Tomcat documentation, particularaly the part about JNDI resources, you'll see how its done.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Glenny,

There is a forum devoted to Apache Tomcat on this site.
Your question will probably get better responses there.

Here is the documentation Paul mentioned:
http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-resources-howto.html


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
Don't get me started about those stupid light bulbs.
 
subject: Connection Pooling in tomcat