nerdexam
Oracle

1Z0-899 · Question #15

During initialization, a servlet finds that the database connection it requires is unavailable. As the system designer, you know that the database start up completes several minutes after the web…

The correct answer is D. Throw an UnavailableException. See the full explanation below for the reasoning.

Question

During initialization, a servlet finds that the database connection it requires is unavailable. As the system designer, you know that the database start up completes several minutes after the web- container initializes the servlet. How should this be handled?

Options

  • ARetry the connection until it is successful, then allow the init () method to complete.
  • BThrow a ServletException
  • CThrow the IOException
  • DThrow an UnavailableException

How the community answered

(49 responses)
  • A
    6% (3)
  • B
    12% (6)
  • C
    4% (2)
  • D
    78% (38)

Community Discussion

No community discussion yet for this question.

Full 1Z0-899 Practice