This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Soft Skills: The software developer's life manual and have John Sonmez on-line!
See this thread for details.
Win a copy of Soft Skills: The software developer's life manual this week in the Jobs Discussion forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Trouble with JDBC Connection Pooling

Harish Verma
Ranch Hand
Posts: 32
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to enable connection pooling for our application. I am working in the JDev Ide (10g Release 2 10.1.2).

What I am seeing is that the maximum pool size of 5 is reached within no time, after only a few links are clicked, and I end up with timeout errors thrown by the pool. The application requests and releases connections like this:

DAOManager dao = DAOManagerImpl.getInstance();
Connection conn = dao.getConnection();

Within DAOManagerImpl:

public Connection getConnection() throws SQLException, NamingException
Connection connection = null;

DataSource dataSource = ServiceLocator.getInstance().getDataSource("jdbc/XADS_ejb");

connection = dataSource.getConnection();
catch(Exception ex)
//Do something.

return connection;

Here's the data-sources.xml:

<?xml version="1.0" standalone='yes'?>
<!DOCTYPE data-sources PUBLIC "Orion data-sources" "">

<data-source name="poolDS" class="com.evermind.sql.DriverManagerDataSource"
url="jdbc racle:thin:@"
location="jdbc/poolds_location" />


SO what is happening? Why are connections not being released to the pool after the work is over? I tried with 25 as the max-connections value but that quickly got filled up, too.

If the pool is set up properly, I should never get a timeout error in my case where I am the only user issuing database requests. So what am I doing wrong? Any insight / info is most welcome and appreciated. TIA.
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic