• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connection Pool - What happens if all the connections are in use

 
ashish bassii
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

If I have a connection pool, with lets say a max size of 100, and all the 100 connections are in use, what happens if there is request for another (101th) connection? Does it cause an exception
 
Roger Sterling
Ranch Hand
Posts: 426
Eclipse IDE Fedora Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, you get MAX_CONNECTIONS_EXCEEDED error (or similar wording, depending on your driver).

http://docs.oracle.com/cd/E16655_01/appdev.121/e17620/adfns_odbc.htm#ADFNS1124
 
Martin Vajsar
Sheriff
Posts: 3752
62
Chrome Netbeans IDE Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roger, the page you've linked to describes an ODBC driver. Didn't you intend to refer to another page?

There is usually some configurable timeout, which specifies how long a thread can wait for a connection. If the timeout expires before a connection becomes available for that thread, some kind of exception is thrown. Some connection pools even can have the timeout set to an infinite value, meaning the exception is never thrown and the thread(s) will wait for a connection indefinitely.

The best you can do, Ashish, is to have a look at the documentation of the connection pool implementation you're using.
 
ashish bassii
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Roger, Martin
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic