mysqlcluster

博客园 首页 新随笔 联系 订阅 管理
Tomcat6.0连接池配置  
 1.配置tomcat下的conf下的context.xml文件,在之间添加连接池配置:   
 <Resource name="jdbc/oracle"
         auth="Container"     
         type="javax.sql.DataSource"     
         driverClassName="oracle.jdbc.driver.OracleDriver "     
         url=" jdbc:oracle:thin:@host:port:databse"     
         username=" user "     
         password="password"     
         maxActive="100"     
        maxIdle="30"     
        maxWait="10000" />     
2.配置你的应用下的web.xml中的之间加入:  
 <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>     
3.把连接数据库的第三方驱动放到common/lib下面就ok了  
posted on 2011-04-30 22:05  mysqlcluster  阅读(279)  评论(0编辑  收藏  举报