nerdexam
Oracle

1Z0-899 · Question #14

A method call inside your servlet has thrown an IOException resulting from a lost network connection to a necessary resource. The servlet has determined that it will be unable to operate…

The correct answer is C. The servlet should throw an unavailableException to the web container. 2.3.3.2, first paragraph)

Advanced Topics

Question

A method call inside your servlet has thrown an IOException resulting from a lost network connection to a necessary resource. The servlet has determined that it will be unable to operate successfully fen few minutes, but expects to be able to resume operation after that period. How should this situation handled?

Options

  • AThe servlet should re-throw the exception to the web container.
  • BThe servlet should throw a servletException to the web container.
  • CThe servlet should throw an unavailableException to the web container.
  • DThe servlet should redirect to an error page that reports the exception message.
  • EThe servlet should retry the request until the method returns successfully.

How the community answered

(24 responses)
  • A
    4% (1)
  • B
    4% (1)
  • C
    79% (19)
  • D
    13% (3)

Explanation

2.3.3.2, first paragraph)

Topics

#UnavailableException#servlet lifecycle#exception handling#temporary unavailability

Community Discussion

No community discussion yet for this question.

Full 1Z0-899 Practice