This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
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.