What is the best practice for handling SQL exceptions in a multi-tier application?
- Catch and log the exception at the point of occurrence
- Convert the SQL exception to a custom exception
- Handle the exception and continue processing
- Propagate the exception to the upper tiers
The best practice is to propagate the SQL exception to the upper tiers to allow centralized handling and logging, providing a clear separation of concerns in a multi-tier application.
Loading...
Related Quiz
- HTTP persistent connections are managed using the _________ header in servlet responses.
- The CallableStatement method _________ is used to get the result set of a stored procedure.
- How would a filter log request information without altering the request itself?
- What is the primary use of the ServletContextAttributeListener in a web application?
- The translation of JSP to servlet occurs in the ______ phase.