File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Some Query related to Connection Pooling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Some Query related to Connection Pooling" Watch "Some Query related to Connection Pooling" New topic
Author

Some Query related to Connection Pooling

shreeram babu
Greenhorn

Joined: Jul 27, 2005
Posts: 1
i m using mysql driver on tomcat webserver and using JNDI based connectionpooling.
and i made a connection succesfully.

i have made a connection accordingly as given in tomcat documentation on Connection pooling.

i have a number of querys

1. In the initial context , why we write string "java:/comp/env"
what its significance ? Does it point to particular location in the tomcat?

2. I have used org.apache.commons.dbcp.BasicDataSourceFactory . Does this class do the connection pooling? I think its just implementing data source interface. please explain.
i have used a commons-dbcp-1.2.1.jar .
and also i used mysql-connector-java-3.1.10-bin.jar for driver

3. there is MysqlConnectionPoolDataSource.class and MysqlDatasource.class in mysql-connector-java-3.1.10-bin.jar . Can I use this file for connection pooling and datasource connection . If yes then how shd i do it ? please explain.

4. I also want to make a class file for connection pooling instead of relying on tomcat to do the connection pooling for me. can i use these jar files for my own connection pooling? if yes then how should i do it ? please explain.
 
 
subject: Some Query related to Connection Pooling