Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > Servlets
Password Reminder
Register
| FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old January 28th, 2007, 08: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.


Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 08:09 PM
Execute method of web service, about database? hueduongit .NET Web Services 3 December 3rd, 2003 02:18 AM
Object as parameter in a web service method evandro.paula .NET Web Services 3 October 14th, 2003 02:20 PM



All times are GMT -4. The time now is 08:15 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.