Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • 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

Understanding Connection Pooling properties in detail.

 
Ranch Hand
Posts: 285
2
jQuery Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to understand connection pooling properties in detail, Before I come I read the descriptive explanation by surfing the net but would like to ensure my understanding is on right track.
Below are some of the configuration properties of DBCP connection pooling referred from dbcp_connection pooling


ParameterDefaultDescription
initialSize0The initial number of connections that are created when the pool is started.
maxTotal8The maximum number of active connections that can be allocated from this pool at the same time, or negative for no limit.
maxIdle8The maximum number of connections that can remain idle in the pool, without extra ones being released, or negative for no limit.
minIdle0The minimum number of connections that can remain idle in the pool, without extra ones being created, or zero to create none.
maxWaitMillisindefinitelyThe maximum number of milliseconds that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception, or -1 to wait indefinitely.


maxTotal - Does the description mean at the same time multiple connections can be released from the pool for different connection ? If so one connection enough for one all transaction ? Or multiple DB transaction will request for various connections ?

minTotal - Does the property indicates there are some minimum connection always available in the pool ? If the no of connection idle < minIdle then how the numbers will be regulated if all other connections are actively servicing other request ? Is this job of connection pool ? I'm trying to know what will be happen if min idle no of connection goes down ? Please help to understand.

maxWaitMillis - Will the pool wait at this point for the specified amount of time and if it didn't get back to any connection to serve the request, will raise an Exception ?

Thanks,
Mohammed Sardar

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic