Hi,
I am a bit new to JSP. I have good knowledge about Servlets.
Previously i wrote a servlet, which when it was invoked the first time,
it would initialize the Database Connection Pool. When ever required, i
would get a new Connection to Database (From one of the preallocated
Connections) and after i am done with the database work, i would put
back the Connection in the Pool and set it's status as available.
Since the Servlet stays in the memory after it is first invoked one, I
take advantage of that and Close all the Connections in the
ConnectionPool in the destroy() method of the main Servlet, which
actually created the Pool in the init() method.
I am trying to implement a similar concept for JSP pages. Initializing
the Connection Pool should not be a problem. I can check when a
Connection is first required check if it is null and if it is then set
up the Connection Pool.
Which is the Method where i can handling the Closing Part. Which method
is actually called in a JSP page when the Server is being Shut Down.
Can some one please help me with these. Any Methods Examples or Links
would be very helpful. Thanks in advance.
Thanks
Sudhir
[EMAIL PROTECTED]
http://www.javacommerce.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets