Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DBCP connection pool exhausted for OpenJPA

 
Suman Majhilya
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In our project we are using OpenJPA-1.0.0 -nightly build. In the OpenJPA properties we have set maxActive as 150. But some times we are getting the exception for connection pool exhaustion.



We run our application on apache tomcat 5.5 server.
In our dev environment, we can print the number of connections being used by using BasicDataSource.getNumActive() method. But we do not want to change the production code to print the same on the log.

1. Is there any tool that we can use externally to check how many connections are being used at any instance?
2. Is it advisable to increase the maxActive value to 250 / 300? How can we determine the optimum maxActive number needed for our application?
3. Is there any framework like c3p0 compatible with OpenJPA that will increase the connection pool size dynamically?

I am trying to use Apache JMeter for database monitoring, but not sure if it'll display what I want.

Thanks,
Suman
 
Vijitha Kumara
Bartender
Posts: 3913
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may find some tips about the c3p0 connection pooling etc... here.

And welcome to the CodeRanch!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic