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

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
I have a question about when to initialize the connection pool currently I am using a class for connection pooling and it is not performing correctly because multiple instances are being created. I am using a mvc approach and only have one servlet into the webApp. Can anyone tell me where I should initialize the connection pool object In the case of JNDI and a datasources I pose the same question How do I make sure there is only one reference so that pooling works correctly
My design is (jsp/html)TO controllerServlet(decide where to go instantiate helper class using command pattern) TO helperObject(performs specific task inserts updates deletes,etc as well as passing back to the controllerServlet the next jsp/html page to be forwarded to).
 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
I don't understand your question completly , but if you looking at only one instance of the class ,then "SINGLETON" pattern is something which you might want to consider.
 
Leverager of our synergies
Posts: 10065
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Redirect to the right forum.
 
    Bookmark Topic Watch Topic
  • New Topic