servlet service() method
Why we opened the database connection in the servletís doPost() method, instead of the init() method, although opening database connection could be considered a one-time activity ?
But what happens if you declare the connection as an instance variable, and open it in the init() method, and close it in the destroy() method?
The answer is in Chapter 8 page 386 in Professional Java Server Programming J2EE Edition from WROX.
But I can understand what itís mean. Can somebody give me more detail examples about this.
Whatís the meaning of :
The servlet instance can throw a UnavailableException to indicate that it is temporarily or permananetly available, and about temporary or permanent failures?
Thank You very much.