Tomcat4.1 Solve the method of connecting pool leakage

xiaoxiao2021-03-06  109

In web applications, you should explicitly turn off the result set, declaration, and connection (Esultset, Statement, Connection). Instead, these resources can be reused, and the linking pool is disclosed, which ultimately leads to the WEB application. In Tomcat4.1, there is a solution. It is to prevent the connection pool from leakage by setting Jakarta-Commons DBCP. The configuration is in the elements tag of the ResourceParams of Server.xml's Resource Elements, setting the RemoveabandONED value True. For example, the following settings: ... Removeabandoned true ... Tomcat4.1 The value of the default REMOVEABANDONED is False. There is also a parameter RemoveabandONEDTIMEOUT to set up a database connection to the longest idle time. For example, as follows: ... RemoveabandONEDTimeout 60 ... Tomcat4.1 The default is 300 seconds. If you need a logging discarding connection resource, you can set it as follows ... logabandoned true ... Tomcat's default is False.

转载请注明原文地址:https://www.9cbs.com/read-100712.html

New Post(0)