Using connection pooling to connect to IBM DB2 database __ Database

Source: Internet
Author: User
Tags connection pooling db2 ibm db2 ibm db2 database

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.