proxool 配法 实时监控 hibernate

1.proxool.xml
<!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --> <? xml version='1.0' encoding='gb2312' ?>
< something-else-entirely >
    
< proxool >
        
< alias > MYPool </ alias > <!-- 连接池的别名 -->
        
< driver-url >
            jdbc:oracle:thin:@127.0.0.1:1521:rwcm
        
</ driver-url >
        
<!-- JDBC驱动程序rdwk21_# -->
        
< driver-class >
            oracle.jdbc.driver.OracleDriver
        
</ driver-class >
        
< driver-properties >
            
< property  name ="user"  value ="root"   />
            
< property  name ="password"  value ="root"   />
        
</ driver-properties >
        
<!--  proxool自动侦察各个连接状态的时间间隔(毫秒),侦察到空闲的连接就马上回收,超时的销毁 -->
        
< house-keeping-sleep-time > 90000 </ house-keeping-sleep-time >
        
<!--  指因未有空闲连接可以分配而在队列中等候的最大请求数,超过这个请求数的用户连接就不会被接受 -->
        
< maximum-new-connections > 20 </ maximum-new-connections >
        
<!--  最少保持的空闲连接数 -->
        
< prototype-count > 5 </ prototype-count >
        
<!--  允许最大连接数,超过了这个连接,再有请求时,就排在队列中等候,最大的等待请求数由maximum-new-connections决定 -->
        
< maximum-connection-count > 100 </ maximum-connection-count >
        
<!--  最小连接数 -->
        
< minimum-connection-count > 10 </ minimum-connection-count >
    
</ proxool >
</ something-else-entirely >
2.hibernate.cfg.xml
<!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --> < session-factory >
        
< property  name ="hibernate.connection.provider_class" >
            org.hibernate.connection.ProxoolConnectionProvider
        
</ property >
        
< property  name ="hibernate.proxool.pool_alias" > MYPool </ property >
        
< property  name ="hibernate.proxool.xml" > proxool.xml </ property >
        
< property  name ="hibernate.connection.release_mode" >
            auto
        
</ property >
        
< property  name ="show_sql" > false </ property >
    
</ session-factory >
3.web.xml
<!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> -->      <!--  
        在应用中实时监控连接池开始
     
-->
     
< servlet >  
         
< servlet-name > Admin </ servlet-name >  
         
< servlet-class > org.logicalcobwebs.proxool.admin.servlet.AdminServlet </ servlet-class >  
     
</ servlet >
     
< servlet-mapping >  
         
< servlet-name > Admin </ servlet-name >  
         
< url-pattern > /showProxoolSnapshot </ url-pattern >  
     
</ servlet-mapping >
     
<!--   
        在应用中实时监控连接池结束
     
-->


你可能感兴趣的:(oracle,Hibernate,xml,servlet,jdbc)