Spring2.5 configure the proxool connection pool

Source: Internet
Author: User
Tags sleep

Configure the proxool connection pool according to the normal steps, configure automatic monitoring in web. xml, and perform a simple test to ensure that the connection pool works properly. Configure proxool. xml as follows:

1. proxool. xml

<? Xml version = "1.0" encoding = "ISO-8859-1"?>
<! -- The proxool configuration can be embedded within your own application's.
Anything outside the "proxool" tag is ignored. -->
<Something-else-entirely>
<Proxool>
<Alias> MyPool </alias>
<Driver-url> jdbc: microsoft: sqlserver: // localhost: 1433; DatabaseName = test; SelectMethod = cursor </driver-url>
<Driver-class> com. microsoft. jdbc. sqlserver. SQLServerDriver </driver-class>
<Driver-properties>
<Property name = "user" value = "testuser"/>
<Property name = "password" value = "testpwd"/>
</Driver-properties>
<Maximum-connection-count> 80 </maximum-connection-count>
<Minimum-connection-count> 20 </minimum-connection-count>
<House-keeping-sleep-time> 180000 <Prototype-count> 5 </prototype-count>
<House-keeping-test-SQL> select CURRENT_DATE </Proxool>
</Something-else-entirely>
 

2. applicationContext. there are two ways to configure the proxool connection pool in xml: one is to use the proxool configured above. xml file, another way is directly in applicationContext. for configuration in xml, see method 1 first:

<Bean id = "TestSource" class = "org. springframework. jdbc. datasource. DriverManagerDataSource">
<Property name = "driverClassName">
<Value> org. logicalcobwebs. proxool. ProxoolDriver </value>
</Property>
<Proper</

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.