jQuery in Action, 2nd edition*
The moose likes Java in General and the fly likes Connection Pooling example appears to create more than one pool Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Connection Pooling example appears to create more than one pool" Watch "Connection Pooling example appears to create more than one pool" New topic
Author

Connection Pooling example appears to create more than one pool

Lou Pelagalli
Ranch Hand

Joined: Nov 11, 2003
Posts: 150
    
    1
Hi,

This is not really a Connection or jdbc question, more of a basic question (I think) from a tutorial I'm following.

The following DataAccessPool is a servlet where the init() method shown below instantiates a new ConnectionPool.

The ConnectionPool class beneath DataAccessPool creates and manages the connection pool.

Why in this example would only one ConnectionPool object be created for and shared by all servlets?

It seems to me that each time a new ConnectionPool object is instantiated by method DatabaseAccessPool.init() a new ConnectionPool object is created, eventually filling up the virtual machine with ConnectionPoolObjects.


DatabaseAccessPool


ConnectionPool
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Connection Pooling example appears to create more than one pool
 
Similar Threads
how many initial connections should be opend
Connection Pooling
Connection Pool
Get data from my DB
Importing java files in another java program