Tomcatの5種類データベースの構成コード

構成コード:

<?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_startnews24″
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_stand”
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>