Recently on the forum saw someone summed up the use of connection pooling, unfortunately he only summed up the Oracle and SQL Server two. Now, I'm adding the IBM DB2 Connection pooling technology. For your reference.
Tomcat configuration:
<context path= "/browser-entered name" docbase= "absolute path"
debug= "5" reloadable= "true" crosscontext= "true" >
<logger classname= "Org.apache.catalina.logger.FileLogger"
Prefix= "Localhost_mysqltest_log." suffix= ". txt"
Timestamp= "true"/>
<resource name= "jdbc/database name" auth= "Container" type= "Javax.sql.DataSource"/>
<resourceparams name= "jdbc/database name" >
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>100</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>30</value>
</parameter>
<parameter>
<name>maxWait</name>
<value>10000</value>
</parameter>
<parameter>
<name>username</name>
User name </value> of <value> database
</parameter>
<parameter>
<name>password</name>
<value> Password for database </value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>COM.ibm.db2.jdbc.app.DB2Driver</value>
</parameter>
<parameter>
<name>url</name>
<VALUE>JDBC:DB2: Database name </value>
</parameter>
</ResourceParams>
</Context>
Remember to have the DB2 drive. The methods that are available for each version may be different. V7.2 is found under Java12 in the installation directory. If not, you can double-click Jdbc20.exe build. Remember to turn it into a. jar file to use.
The
level is limited, please feel free.
This article refers to the notification address: http://blog.csdn.net/swordsman_82/services/trackbacks/393670.aspx