web 连接池配置
TOMCAT?J2EE項目連接池配置
web?項目的?web.xml
????<web-app>
?<resource-ref>
????<description>DB?Connection</description>
????<res-ref-name>jdbc/oracle</res-ref-name>
????<res-type>javax.sql.DataSource</res-type>
????<res-auth>Container</res-auth>
??</resource-ref>
</web-app>
?
Eclipse?下下面tomcat?server?文件:
?
Server.xml
?
?
?
<GlobalNamingResources><!-- Editable user database that can also be used byUserDatabaseRealm to authenticate users--><Resource auth="Container" description="User database that can be updated and saved" factory="org.apache.catalina.users.MemoryUserDatabaseFactory" name="UserDatabase" pathname="conf/tomcat-users.xml" type="org.apache.catalina.UserDatabase"/><Resource auth="Container" driverClassName="oracle.jdbc.driver.OracleDriver" maxActive="50" maxWait="5000" maxldle="10" name="jdbc/oracle" password="titi123love" type="javax.sql.DataSource" url="jdbc:oracle:thin:@127.0.0.1:1521:xe" username="titi"/> </GlobalNamingResources>?
?
?
Content.xml
??<Resource?auth="Container"?driverClassName="oracle.jdbc.driver.OracleDriver"?maxActive="50"?maxWait="5000"?maxldle="10"?name="jdbc/oracle"?password="titi123love"?type="javax.sql.DataSource"?url="jdbc:oracle:thin:@127.0.0.1:1521:xe"?username="titi"/>?
轉(zhuǎn)載于:https://www.cnblogs.com/cici-new/p/3965591.html
總結(jié)
- 上一篇: sqlprofiler 常用调试方法
- 下一篇: JavaScript-变量与作用域链