I have a search
Servlet. The init method creates a search class which is an insatnce on the servlet. If a method is invoked on the servlet it will invoke it on the search class. The Search class gets a connection from the pool and returns it back at the end of the method completion.
Is this an appropriate design? My question is if the web server creates several insatnces of the servlet(will it?)- will the init method be invoked each time- I would want that- as I want each insatnce of the servlet to have its own search class?
If this is OK. How and when do I close the connections or my connection pool?
Thanks a lot guys,
Sanjay