Skip to main content

[webtier] Re: How to stop application deployment after failed initialization

1 reply [Last post]
Anonymous

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Jan Luehe

On 05/ 8/09 11:31 AM, glassfish@javadesktop.org wrote:
> Thanks for this hint.
>
> I will implement and test, whether throwing an instance of 'java.lang.RuntimeException' will prematurely terminate the deployment process.
>
> As we can see here once more: The disadvantage of using undeclared (i.e. runtime) exceptions is, that the behaviour is hidden. Hidden is all-right if something happens unexpectedly and unforeseen, but initilization failures are not that unusual ...
>

I completely agree.
Unfortunately, the ServletContextListener (and other listener) interfaces
have been around since the early Servlet spec days, and adding a throws
clause with a
checked Exception to their methods would break backward compatibility.

Jan

---------------------------------------------------------------------
To unsubscribe, e-mail: webtier-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: webtier-help@glassfish.dev.java.net