Tomcat下的apache-tomcat-6.0.29\conf\context.xml配置信息:
<?xml version='1.0' encoding='utf-8'?>
<!-- The contents of this file will be loaded for each web application -->
<Context>
<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<Resource
name="jdbc/demo"
auth="Container"
type="javax.sql.DataSource"
username="testUser"
password="123456"
driverClassName="oracle.jdbc.driver.OracleDriver"
url="jdbc:oracle:thin:@127.0.0.1:1521:ORCL"
maxActive="100"
maxIdle="10"/>
</Context>
name ="jdbc/oracleds":JNDI名称
auth="Container":由容器创建,即TOMCAT来创建连接池
type="javax.sql.DataSource" :数据源类系那个
MaxActive:连接池中最大的数据库连接数
maxIdle:连接池中最大的空闲数据库连接数
maxWait:数据库连接超时等待时间以毫秒为单位
driverClassName:JDBC数据库连接驱动类