首页 > Web开发 > 详细

web 连接池配置

时间:2014-09-11 07:40:32      阅读:343      评论:0      收藏:0      [点我收藏+]

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 文件:

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>

 

 

 

 

 

 

 

 

 

 

 

Server.xml

    <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>

<Context docBase="D:/Program Files/DEV/Tomcat6/webapps/transfer" path="">

<ResourceLink global="jdbc/oracle" name="jdbc/oracle" type="javax.sql.DataSource"/>

</Context>

 

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"/> 

web 连接池配置

原文:http://www.cnblogs.com/cici-new/p/3965591.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!