oracle数据库链接池的配置

连接池

Tomcat的配置文件apache-tomcat-7.0.40-windows-x64\apache-tomcat-7.0.40\confcontext.xml

<Resource

name="jdbc/easybuy"     

auth="Container"

type="javax.sql.DataSource"

factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"

maxActive="100"      

maxIdle="30" maxWait="10000"   

username="root"  

password="sa"

driverClassName="oracle.jdbc.OracleDriver"

url="jdbc:oracle:thin:@localhost:1521:orcl

/>

web.xml

<resource-ref >

<description >databaseConnection</description >

<res-ref-name >链接池的name</res-ref-name >

<res-type >javax.sql.DataSource</res-type >

<res-auth >Container</res-auth >

</resource-ref >

 

posted @ 2017-01-01 15:24  codedom  阅读(1035)  评论(0编辑  收藏  举报