C3P0 Configurations! Where and How?

后端 未结 4 1531
后悔当初
后悔当初 2021-01-11 17:03

We are implementing a Web App using JPA2.0 and Hibernate3.0. Connection pool configurations are set in persistence.xml located in META-INF folder.


persistence.

4条回答
  •  独厮守ぢ
    2021-01-11 17:19

    I had this same problem with the proprieties that I put in persistence.xml didn't affect c3p0.

    Looking into http://www.mchange.com/projects/c3p0/index.html#configuration_files I tried to put an xml file named c3p0-config.xml and put it in WEB-INF/classes and it work perfectly.

    Here is an example of a c3p0-config.xml file:

    
      
        con_test
        30000
        30
        10
        30
        100
        10
        200
    
        
          10
          1
          0
        
    
      
    
    

提交回复
热议问题