Tomcat configures sqlserver connection pool

Source: Internet
Author: User

Tomcat configures sqlserver connection pool

1. Go to the conf folder directory under the Tomcat directory and find server. xml
In the Tomcat server. xml file, set the connection statement in the </context> label and <! -Path indicates the directory of your application./dbtest indicates that the path is in the Tomcat webapps directory.
<! -Docbase = "dbtest" indicates the path name when you stop the program. For example, the following execution path is http: // localhost: 8080/dbtest -->
<Context Path = "/dbtest" docbase = "dbtest"
DEBUG = "5" reloadable = "true" crosscontext = "true">
<! -- Maxactive: the maximum number of connection pools. Make sure there are sufficient connections. -->
<! -- Maxidle: the maximum number of idle connections. If it is set to-1, it indicates no limit. -->
<! -- Maxwait: The maximum waiting time (the maximum waiting time for the reverse connection pool to be available), in the unit of nanoseconds, that is, set to 10000 equal to 10 seconds. If it is set to-1, it indicates uncertainty -->
<! -- Username and password: account and password used to connect to the database -->
<! -- Driverclassname: The driver used to connect to the database. For example, sqlserver is
Com. Microsoft. JDBC. sqlserver. sqlserverdriver. -->
<! -- URL: The Path to the database, as shown in figure
JDBC: Microsoft: sqlserver: // localhost: 1433; databasename = kb_rate -->
 
 
 
<Resource Name = "default_jdbc" auth = "Container" type = "javax. SQL. datasource"
Maxactive = "100" maxidle = "30" maxwait = "10000"
Username = "javauser" Password = "javadude"
Driverclassname = "com. Microsoft. JDBC. sqlserver. sqlserverdriver"
Url = "JDBC: Microsoft: sqlserver: // localhost: 1433; databasename = kb_rate" "/>
 
 
 
</Context>

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.