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)- A6% (3)
- B12% (6)
- C4% (2)
- D78% (38)
Community Discussion
No community discussion yet for this question.