The reason for using the connection pool is to improve performance. However, none of the connection pool implementations that I have seen have been singletons.
So, in an MVC web application where the DB storage is done by Model Objects, within servlets, the connection pool is worthless.
Every time the servlet gets another request it will instantiate a new Model object, and that object will instantiate a new Connection Pool, which will get a new connection. There will never be any readily available connections because the newly instantiated connection pool will never have any connections readily available. It will have to get them in exactly the same way you would get them from your Model Object.
Is there anyone out there who can figure this one out, & come up with a solution ?
-
Connection Pools are NO use in web apps (1 messages)
- Posted by: n a
- Posted on: August 08 2005 01:23 EDT
Threaded Messages (1)
- Connection Pools are NO use in web apps by Charles Lee on August 08 2005 11:57 EDT
-
Connection Pools are NO use in web apps[ Go to top ]
- Posted by: Charles Lee
- Posted on: August 08 2005 11:57 EDT
- in response to n a
try overriding the servlet's init method and start the connection pool there