• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 426
Eclipse IDE Fedora Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 3837
66
Netbeans IDE Oracle Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Roger, Martin
reply
    Bookmark Topic Watch Topic
  • New Topic