• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC Connection Pool behaviour

 
Gabriel Beres
Ranch Hand
Posts: 61
  • 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: 2602
13
C++ Linux Netbeans IDE
  • 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
  • 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
  • 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()
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic