![]() Step 1: MySQL Database Driver - Copy the MySQL Connector/J JDBC Driver's jar-file (e.g., mysql-connector-java-5.1.xx-bin.jar) into Tomcat's " lib", i.e., $CATALINA_HOME/lib. ![]() ![]() To configure Tomcat/MySQL for supporting Database Connection Pooling (DBCP): After the request is completed, the connection is not closed, but returned to the pool to handle further request. A server-side program, in response to a client request, picks up an already-created connection from the pool. ![]() Instead, we usually set up a database connection pool, which maintains a number of database connections. I shall denote Tomcat's and MySQL's installed directory as $CATALINA_HOME and $MYSQL_HOME respestively.Ĭreating a new database connection for each client request is grossly inefficient, due to the high overhead involved in opening/maintaining/closing the connection. Otherwise, read " How to Install and Get Started with Tomcat" and " How to Install and Get Started with MySQL". I shall assume that you are familiar with Tomcat and MySQL. Reference: "Apache Tomcat 7.0 JNDI Datasource How-To". Java Web Database Applications Database Connection Pooling in Tomcat with MySQL
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |