aspose file tools
The moose likes Web Services and the fly likes Jdbc Connection pooling using apche tomcat6.0.14 and axis2--please help me Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Jdbc Connection pooling using apche tomcat6.0.14 and axis2--please help me" Watch "Jdbc Connection pooling using apche tomcat6.0.14 and axis2--please help me" New topic
Author

Jdbc Connection pooling using apche tomcat6.0.14 and axis2--please help me

Deepti Guduru
Greenhorn

Joined: May 22, 2008
Posts: 12
Hi All,
Iam doing a project using axis2 webservices.Iam using apache tomcat6.0.14 as a server.Iam able to complete the project using jdbc connection. But now my task is to do jdbc connections using connection pooling.I googled it, but unable to find anything. please help me .

This is my simple DatabaseConnection program.
public class DBConnection {

private Connection conn;
private Statement stmt;
private String url = "jdbc:mysql://localhost/cmpe273";
private String driver = "com.mysql.jdbc.Driver";
private String login = "root";
private String password = "root123";

public DBConnection() {
conn = null;
stmt = null;
getConnection();

}

public Connection getConnection() {
try {
Class.forName(driver).newInstance();
conn = (Connection) DriverManager.getConnection(url, login,
password);
System.out.println(url);

} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (SQLException sqlex) {
sqlex.printStackTrace();

} catch (Exception ex) {
ex.printStackTrace();
}
return conn;
}
}
NarendraBabu Bandaru
Greenhorn

Joined: May 17, 2008
Posts: 20
Hi,

Please have a look into the below URL for more details.

http://www.onjava.com/pub/a/onjava/2006/04/19/database-connection-pooling-with-tomcat.html

I think Web container will take care of DB Connection pooling.

Thanks,
NAREN
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Jdbc Connection pooling using apche tomcat6.0.14 and axis2--please help me
 
Similar Threads
a mistake for bean
DBUtility for closing connections
ThreadLocal and DB connection...
jsf and database connection problem
Application not accessing attached JAR file