The configuration in Tomcat, which was previously used, can be found:
- <! -- For MySQL database connection pool -->
- <Context Path = "/tomcattest" docbase = "D:/Eclipse/workspace/tomcattest" workdir = "D: /Eclipse/workspace/tomcattest/work/org/Apache/jsp "DEBUG =" 5 "reloadable =" true "crosscontext =" true ">
- <Logger classname = "org. Apache. Catalina. Logger. filelogger" prefix = "localhost_dbtest_log." suffix = ". txt" timestamp = "true"/>
- <Resource Name = "JDBC/test" auth = "Container" type = "javax. SQL. datasource"/>
- <Resourceparams name = "JDBC/test">
- <Parameter>
- <Name> factory </Name>
- <Value> org. Apache. commons. DBCP. basicperformancefactory </value>
- </Parameter>
- <! -- Class name for mm. MySQL JDBC driver -->
- <Parameter>
- <Name> driverclassname </Name>
- <Value> org. gjt. Mm. MySQL. Driver </value>
- </Parameter>
- <! -- The JDBC connection URL for connecting to your MySQL db.
- The autoreconnect = true argument to the URL makes sure that
- Mm. MySQL JDBC driver will automatically reconnect if mysqld closed
- The connection. mysqld by default closes idle connections after 8 hours. -->
- <Parameter>
- <Name> URL </Name>
- <Value> JDBC: mysql: // localhost: 3306/test? Autoreconnect = true </value>
- </Parameter>
- <! -- MySQL db username and password for DB connections -->
- <Parameter>
- <Name> username </Name>
- <Value> root </value>
- </Parameter>
- <Parameter>
- <Name> password </Name>
- <Value> admin </value>
- </Parameter>
- <! -- Maximum number of DB connections in pool. Make sure you
- Configure your mysqld max_connections large enough to handle
- All of your DB connections. set to 0 for no limit. -->
- <Parameter>
- <Name> maxactive </Name>
- <Value> 100 </value>
- </Parameter>
- <! -- Maximum number of idle dB connections to retain in pool.
- Set to 0 for no limit. -->
- <Parameter>
- <Name> maxidle </Name>
- <Value> 30 </value>
- </Parameter>
- <! -- Maximum time to wait for a DB connection to become available in MS,
- In this example 10 seconds. An exception is thrown if this timeout
- Is exceeded. Set to-1 to wait indefinitely. -->
- <Parameter>
- <Name> maxwait </Name>
- <Value> 10000 </value>
- </Parameter>
- </Resourceparams>
- </Context>