spring+hibernate的c3p0 连接池配置

网上关于C3P0在spring中的配置,几乎没有完全正确的(至少我还没发现)。查了c3p0的文档,又试验过N次。得出如下配置是正确的:


 
   class="com.mchange.v2.c3p0.ComboPooledDataSource">
     value="oracle.jdbc.driver.OracleDriver">
  

     value="jdbc:oracle:thin:@127.0.0.1:1521:db">
  

  
  
  1
  20
  1800
  2
  0
  2
  1800
  30
  true
  false
 

 
   class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
  
   
  

  
   
    
     org.hibernate.dialect.Oracle9Dialect
    

       true
       true
                auto                     
                true
                true
    
   

  

  
   
    ht/gisoa/entity/CmppSubmitCache.hbm.xml
    ht/gisoa/entity/CmppDeliver.hbm.xml
    ht/gisoa/entity/CmppSubmit.hbm.xml
    ht/gisoa/entity/CmppReport.hbm.xml
    ht/gisoa/entity/SGpstraceinfo.hbm.xml
    ht/gisoa/entity/SDeviceinfo.hbm.xml
    ht/gisoa/entity/SLbstraceinfo.hbm.xml
    ht/gisoa/entity/Lbsschemainfo.hbm.xml
   

  

 

你可能感兴趣的:(java,c3p0,spring,hibernate,jdbc,oracle,bean)