Can HttpSessionListener throw exceptions?
- If yes, to where do they go? In what point is the stack interrupted?
- If no, how should I treat exceptions there? Logging?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The interface itself doesn’t throw anything. It’s only your own code in the concrete implementation which can do that.
The container catches it, logs it to the server log, ignores the failed call and then continues the job it is supposed to do.
Write robust code so that you’ve eliminated all code bugs (which may cause
RuntimeExceptions). Put if necessary atry-catcharound uncontrollable exception-sensitive code in the implementation yourself so that you can handle it yourself on whatever sensible manner you think you need to handle it.