• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connection Pooling Question

 
Claude Cundiff
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • 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!
 
Prabhakar Reddy Bokka
Ranch Hand
Posts: 197
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • 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.
 
vijin das
Ranch Hand
Posts: 129
Firefox Browser Java Tomcat Server
  • Mark post as helpful
  • send pies
  • 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....
 
Jan Cumps
Bartender
Posts: 2602
13
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic