Bookmark Topic Watch Topic
  • New Topic

Connection Pooling

 
J Craig
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • 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).
 
Sri Enga
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • 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.
 
Mapraputa Is
Leverager of our synergies
Sheriff
Posts: 10065
  • Mark post as helpful
  • send pies
  • Report post to moderator
Redirect to the right forum.
 
    Bookmark Topic Watch Topic
  • New Topic