• 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 Pooling Question

 
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone,

I understand the high level concept of connection pooling. What I'm trying to get is a more detailed understanding. In particular, suppose I were to write my own connection pool (in Java of course;) ) . I understand the notion of caching the connections. What i'm not getting is this:

If I have code that calls the connection pooling object or objects, then won't all those connections be created at the time the Connection Pool object is being created (assuming it does this when the constructor runs).

I would think you would have to have a Connection pooling "Server" situation where the Connection pool Object(s) are listening for a connection request. If this is the case, when speaking of creating a connection pool, am I really talking about implementing a special kind of server?

I hope that makes sense.

Thanks!
 
Ranch Hand
Posts: 198
Oracle Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Creating your own connection pool can be done with the "Object Pooling" technique.

You have to pool your connection objects. Thats it.
 
Ranch Hand
Posts: 129
Firefox Browser Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
....Y Don't go for DBCP from Apache.............
Just Download the API and try to reverse engineer it ....
and doing so is not bad... but ..remember about licenses....
 
Bartender
Posts: 2661
19
Netbeans IDE C++ Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

vijin das wrote:....Y Don't go for DBCP from Apache.............
Just Download the API and try to reverse engineer it ....
and doing so is not bad... but ..remember about licenses....

The source code is available. Apache DBCP is Open Source. You don't need to reverse engineer.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic