Configuring the built-in c3p0 pooling in Hibernate using Spring

前端 未结 2 1394
予麋鹿
予麋鹿 2020-12-05 06:18

I learned that to configure c3p0 pooling in hibernate, we can have write the configuration in hibernate.cfg.xml such this:



        
2条回答
  •  [愿得一人]
    2020-12-05 06:44

    With the spring configuration you are using dbcp instead of cp30. Spring is creating an instance of the data source / connection pool. To configure simillar parameters for dbcp set them has properties directly

    
    
    

    etc. You can find out about the properties available by looking at the javaodoc for BasicDataSource or from the configuration page http://commons.apache.org/dbcp/configuration.html.

提交回复
热议问题