File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC Connection Pool behaviour

 
Gabriel Beres
Ranch Hand
Posts: 61
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I use JDBC Connections as threadlocal variables. I get the connections from pool (UCP).
Let's assume my application has two threads which are performing many database operations.

In this case i would assume that my used connection count cannot go over 2. In reality it does.
What could be the explanation for this?

Thanks
 
Jan Cumps
Bartender
Posts: 2577
11
C++ Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How have you configured your pool? Min, max, ...
 
Gabriel Beres
Ranch Hand
Posts: 61
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Min 1
Max 5
 
Kuldip Shetty
Ranch Hand
Posts: 43
Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Each time you fetch connection from the pool after performing db operation verify if the connection is released back to the pool by performing connection.close()
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic