Home > Back-end >  Tomcat database connection pool will appear in a few days, The connection is closed.
Tomcat database connection pool will appear in a few days, The connection is closed.

Time:09-27

Project is using SSM architecture, database connection pool is tomcat, which is SQLSERVER2005

Configure the following

& lt; Bean id="dataSource" destroy - method="close" & gt;

& lt; ! - the Connection Info - & gt;

& lt; The property name="driverClassName" value="https://bbs.csdn.net/topics/${. JDBC driver}"/& gt;

& lt; The property name="url" value="https://bbs.csdn.net/topics/${. JDBC url}"/& gt;

& lt; The property name="username" value="https://bbs.csdn.net/topics/${JDBC. Username}"/& gt;

& lt; The property name="password" value="https://bbs.csdn.net/topics/${JDBC. Password}"/& gt;



& lt; The property name="initialSize" value="https://bbs.csdn.net/topics/5"/& gt;

& lt; The property name="maxActive" value="https://bbs.csdn.net/topics/100"/& gt;

& lt; The property name="maxIdle" value="https://bbs.csdn.net/topics/30"/& gt;

& lt; The property name="minIdle" value="https://bbs.csdn.net/topics/5"/& gt;

& lt;/bean>

CodePudding user response:

Should be the problem of SQLSERVER2005. And you can do it in a connection pool, see will disconnect

CodePudding user response:

Configuration validation - query
  • Related