当前位置: > Linux服务器 > Tomcat >

Tomcat的5种数据库的配置代码

时间:2014-10-23 18:18来源:linux.it.net.cn 作者:it
<?xml version="1.0" encoding="UTF-8"?>
 
<Context docBase="F:\XXX\WebApp" path="/final" reloadable="true">
 
<Resource
auth="Container"
name="jdbc/final"
type="javax.sql.DataSource"
driverClassName="org.h2.Driver"
username="sa"
password=""
maxIdle="20"
maxWait="-1"
url="jdbc:h2:tcp://localhost:9092/test"
maxActive="20"/>
 
 
<Resource
auth="Container"
name="jdbc/final"
type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
username="root"
password="root"
maxIdle="2"
maxWait="5000"
url="jdbc:mysql://localhost:3306/secondtest?useUnicode=true&amp;characterEncoding=utf-8"
maxActive="2"/>
 
 
 
<Resource
auth="Container"
name="jdbc/finaltest"
type="javax.sql.DataSource"
driverClassName="com.ibm.db2.jcc.DB2Driver"
factory="org.objectweb.jndi.DataSourceFactory"
username="db2admin"
password="1"
maxIdle="20"
maxWait="-1"
url="jdbc:db2://172.31.5.94:50000/test_st"
maxActive="20"/>
 
 
<Resource
auth="Container"
name="jdbc/final"
type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver"
factory="org.objectweb.jndi.DataSourceFactory"
username="test_st"
password="x1"
maxIdle="20"
maxWait="-1"
url="jdbc:oracle:thin:@172.31.5.94:1521:orcl"
maxActive="20"/>
    
 
<Resource
auth="Container"
name="jdbc/final"
type="javax.sql.DataSource"
driverClassName="net.sourceforge.jtds.jdbc.Driver"
username="sa"
password="@1"
maxIdle="20"
maxWait="-1"
url="jdbc:jtds:sqlserver://172.31.5.94:1433/test_st;user=sa;password=@1"
maxActive="20"/>
 
 
 
</Context>
(责任编辑:IT)
------分隔线----------------------------
栏目列表
推荐内容