Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Java and JDK > Servlets
| Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Servlets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old January 28th, 2007, 09:17 PM
Authorized User
Join Date: Oct 2006
Location: Jakarta, , Indonesia.
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Nicholsen
Default 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.

Similar Threads
Thread Thread Starter Forum Replies Last Post
Impersonate with windows service for Service A/C vinod_yadav1919 C# 0 October 18th, 2008 02:29 PM
Service Oriented Web Service aldwinenriquez .NET Web Services 2 September 15th, 2005 03:25 AM
About method of class in Web Service hueduongit .NET Web Services 5 December 11th, 2003 09:09 PM
Execute method of web service, about database? hueduongit .NET Web Services 3 December 3rd, 2003 03:18 AM
Object as parameter in a web service method evandro.paula .NET Web Services 3 October 14th, 2003 02:20 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.