关于TOMCAT配置多个连接池的问题

关于TOMCAT配置多个连接池
如果是TOMCAT5的话
META-INF下的context.xml
对这段进行修改
      name="jdbc/aa"
      type="javax.sql.DataSource"
      driverClassName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
      password="123456"
      maxIdle="10"
      maxWait="-1"
      username="123"
      url="jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=aa"
      maxActive="20"/>
添加在原来的后面就可以了,需要对参数进行适当的修改

如果是TOMCAT4的话
更改conf下server.xml

   
    
            
         
           
              factory
              org.apache.commons.dbcp.BasicDataSourceFactory
           

  
    
              url
              jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=GB2312
           

   
              driverClassName
              com.mysql.jdbc.Driver
          

           
              username
              root
           

           
              password
              123456
           

   
   
    maxWait
    5000
   

   
    maxIdle
    36
   

   
    maxActive
    36
   

         

         

      
       
       
       
         factory
          org.apache.commons.dbcp.BasicDataSourceFactory
       

       
         url
          jdbc:oracle:thin:@192.168.0.10:1521:ering
       

       
         driverClassName
           oracle.jdbc.driver.OracleDriver
       

       
          username
           admin
       

       
         password
          123456
       

               
       
          maxWait
            1000
       

       
          maxIdle
            10
       

       
          maxActive
           20
       

      

      
     

你可能感兴趣的:(J2EE类,tomcat,sqlserver,microsoft,database,jdbc,oracle)