Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

UnavailableException

 
Cameron Park
Ranch Hand
Posts: 371
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I have a question about the UnavailableException(String msg, int seconds)
Say, we have
protected void doGet(HttpServletResponse res, HttpServletREquest req)throws IOException, ServletException{
if(someBoolean){
throw new UnavailableExeption("Unavailable from doGet", 10);
}
// some presentation here;
}
The first time we get a someBoolean==true, and the UnavailableExcption was thrown for 10 seconds. Then within 3 seconds, a second request comes in while someBoolean is still ==true; this time, will the UnavailableException be overridden to another 10 seconds?
Moreover, if, within 3 seconds, another request comes with someBoolean==false, will the presentation be shown, or it will be referred to the designated error page?
Thanks.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
By my reading of the API, subsequent requests will get a SERVICE_UNAVAILABLE (503) message until the time is up.
Bill

------------------
author of:
 
Cameron Park
Ranch Hand
Posts: 371
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Bill.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic