tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ajay kumar <>
Subject Re: still not clear with connection pooling in tomcat
Date Mon, 11 Apr 2005 10:09:00 GMT
       I also struggled for the Tomcat Connection Pooling problem for
one week and i got the solution.
write the follwing code snippets in respective files:


write the following code in server.xml in Context tag
<ResourceParams name="jdbc/TestDB">
		<value>writer the driver class which you are using</value>
		<value>write the url here</value>

and also add the following code in the file in which you are using
database code and import javax.naming.* and javax.sql.* packages..

     Context ctx=new InitialContext();
     DataSource ds=(DataSource)ctx.lookup("java:/comp/env/jdbc/TestDB");
     Connection con=ds.getConnection();  
     Statement st = con.createStatement(); 

Make sure that commons-dbcp,commons-collections and commons-pool files
in common/lib directory.
         I hope that this mail will help you in finding out the solution.


-Ajay Kumar

On Apr 10, 2005 1:20 AM, Krishnakant Mane <> wrote:
> thanks a lot doug,
> if I have any problem I will trouble again.
> just a couple of questions.
> there were two parameters in the email you sent the
> other day.
> I did not get the meaning of those parameters stating
> that active connections should be 100 and the other
> with 30 as the value.
> what is the difference between max active and inactive
> connections?
> and just a curious question,
> is tomcat really used on heavy duty commertial
> websites?
> thanks
> Krishnakant.
> Send instant messages to your online friends
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message