It's not a secret anymore!
The moose likes Object Relational Mapping and the fly likes DBCP connection pool exhausted for OpenJPA Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "DBCP connection pool exhausted for OpenJPA" Watch "DBCP connection pool exhausted for OpenJPA" New topic

DBCP connection pool exhausted for OpenJPA

Suman Majhilya

Joined: Feb 16, 2012
Posts: 1
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.

Vijitha Kumara

Joined: Mar 24, 2008
Posts: 3902

You may find some tips about the c3p0 connection pooling etc... here.

And welcome to the CodeRanch!

[How to ask questions] [Twitter]
I agree. Here's the link:
subject: DBCP connection pool exhausted for OpenJPA
It's not a secret anymore!