• 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 example appears to create more than one pool

 
Ranch Hand
Posts: 150
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic