TOMCAT连接池

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两个参数

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值