Hi,
While load testing an application that uses JPA/hibernate/spring with oracle database 10G, I found that although some 200 parallel users are simulated which should have made 200 DB connections, it never makes more than 40. This was monitored on the enterprise oracle server tool, by monitoring the real time hits on the schema.
I read that in the absence of any connection pooling, hibernate uses an internal pool which I earlier thought, was restricting the number of hits to 40 by having a max pool size like that. So, I configured C3p0 pool in the persistence.xml which is configured through Spring's Application context.
Doing the above config for the c3p0 pool doesn't make a diff to the num of concurrent database hits.
Persistence.xml has the c3p0 entry as:
Code:
<property name="hibernate.connection.provider_class" value="org.hibernate.connection.C3P0ConnectionProvider" />
<property name="hibernate.c3p0.min_size" value="50"/>
<property name="hibernate.c3p0.max_size" value="300"/>
<property name="hibernate.c3p0.timeout" value="3000"/>
<property name="hibernate.c3p0.max_statements" value="100"/>
<property name="hibernate.c3p0.idle_test_period" value="3000"/>
Please advise if I am thinking in the wrong direction or any other pointers to the solution.
Thanks very much.
Gaurav Awasthi