TOMCAT5连接池
<Context path="/jira" docBase="@JIRA_WEBAPP@" debug="0"> <Resource name="jdbc/JiraDS" auth="Container" type="javax.sql.DataSource"/> <ResourceParams name="jdbc/JiraDS"> <parameter> <name>driverClassName</name> <!-- NOTE: if you change the database type, you will need to change it in WEB-INF/classes/entityengine.xml --> <value>org.hsqldb.jdbcDriver</value> </parameter> <parameter> <name>url</name> <value>jdbc:hsqldb:@JIRA_HOME@/jira_database</value> </parameter> <parameter> <name>username</name> <value>sa</value> </parameter> <parameter> <name>password</name> <value></value> </parameter> <!-- NOTE: If NOT using hsqldb, delete the next two parameters --> <!-- Give unused connections 4 secs before eviction. --> <parameter> <name>minEvictableIdleTimeMillis</name> <value>4000</value> </parameter> <!-- Check for evictions every 5 secs. --> <parameter> <name>timeBetweenEvictionRunsMillis</name> <value>5000</value> </parameter> <parameter> <name>factory</name> <value>org.apache.commons.dbcp.BasicDataSourceFactory</value> </parameter> </ResourceParams> </Context>
TOMCAT5.5连接池
<Context path="/jira" docBase="@JIRA_WEBAPP@" debug="0"> <!-- NOTE: If you use a database other than hsqldb: * delete the minEvictableIdleTimeMillis and timeBetweenEvictionRunsMillis attributes * change the database type in atlassian-jira/WEB-INF/classes/entityengine.xml --> <Resource name="jdbc/JiraDS" auth="Container" type="javax.sql.DataSource" username="sa" password="" driverClassName="org.hsqldb.jdbcDriver" url="jdbc:hsqldb:@JIRA_HOME@/database/jiradb" minEvictableIdleTimeMillis="4000" timeBetweenEvictionRunsMillis="5000"/> </Context>
TOMCAT6连接池
<Context path="/jira" docBase="@JIRA_WEBAPP@" debug="0"> <!-- NOTE: If you use a database other than hsqldb: * delete the minEvictableIdleTimeMillis and timeBetweenEvictionRunsMillis attributes * change the database type in atlassian-jira/WEB-INF/classes/entityengine.xml --> <Resource name="jdbc/JiraDS" auth="Container" type="javax.sql.DataSource" username="sa" password="" driverClassName="org.hsqldb.jdbcDriver" url="jdbc:hsqldb:@JIRA_HOME@/database/jiradb" minEvictableIdleTimeMillis="4000" timeBetweenEvictionRunsMillis="5000"/> </Context>
连接MYSQL数据库时删除minEvictableIdleTimeMillis、timeBetweenEvictionRunsMillis两个参数