Tomcat之数据源配置>>
作者: moonstariver 2004年03月30日,星期二 15:17:05 回复(0 ) | 引用(0 ) | URL
一个在Tomcat下配置DataSource的例子,以备忘:
<?xml version="1.0" encoding="UTF-8"?>
<Server debug="0" port="8081" shutdown="SHUTDOWN">
<Service name="Tomcat-Standalone">
<Connector acceptCount="10" className="org.apache.catalina.connector.http.HttpConnector" connectionTimeout="60000" debug="0" maxProcessors="75" minProcessors="5" port="8080"/>
<Engine debug="0" defaultHost="localhost" name="Standalone">
<Host appBase="F:\tmp\MyTest\Tomcat\webapps" debug="0" name="localhost" unpackWARs="true">
<Context debug="0" docBase="F:\tmp\MyTest\defaultroot" path="" reloadable="true" workDir="F:\tmp\MyTest\Tomcat\work"/>
<Context debug="0" docBase="F:\tmp\MyTest\webapp" path="/webapp" reloadable="true"
workDir="F:\tmp\MyTest\Tomcat\work\webapp">
<Resource name="jdbc/Oracle" auth="Container" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/Oracle">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>oracle.jdbc.driver.OracleDriver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:oracle:thin:@192.168.39.225:1521:ORCL901</value>
</parameter>
<parameter>
<name>username</name>
<value>v</value>
</parameter>
<parameter>
<name>password</name>
<value>v</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>20</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>10</value>
</parameter>
</ResourceParams>
</Context>
</Host>
</Engine>
</Service>
</Server>
作者: moonstariver 2004年03月30日,星期二 15:17:05 回复(0 ) | 引用(0 ) | URL
一个在Tomcat下配置DataSource的例子,以备忘:
<?xml version="1.0" encoding="UTF-8"?>
<Server debug="0" port="8081" shutdown="SHUTDOWN">
<Service name="Tomcat-Standalone">
<Connector acceptCount="10" className="org.apache.catalina.connector.http.HttpConnector" connectionTimeout="60000" debug="0" maxProcessors="75" minProcessors="5" port="8080"/>
<Engine debug="0" defaultHost="localhost" name="Standalone">
<Host appBase="F:\tmp\MyTest\Tomcat\webapps" debug="0" name="localhost" unpackWARs="true">
<Context debug="0" docBase="F:\tmp\MyTest\defaultroot" path="" reloadable="true" workDir="F:\tmp\MyTest\Tomcat\work"/>
<Context debug="0" docBase="F:\tmp\MyTest\webapp" path="/webapp" reloadable="true"
workDir="F:\tmp\MyTest\Tomcat\work\webapp">
<Resource name="jdbc/Oracle" auth="Container" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/Oracle">
<parameter>
<name>factory</name>
<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>oracle.jdbc.driver.OracleDriver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:oracle:thin:@192.168.39.225:1521:ORCL901</value>
</parameter>
<parameter>
<name>username</name>
<value>v</value>
</parameter>
<parameter>
<name>password</name>
<value>v</value>
</parameter>
<parameter>
<name>maxActive</name>
<value>20</value>
</parameter>
<parameter>
<name>maxIdle</name>
<value>10</value>
</parameter>
</ResourceParams>
</Context>
</Host>
</Engine>
</Service>
</Server>