On Thu, 2010-01-07 at 02:15 -0800, Giovanni wrote: > I am using Spring + Wicket. > > When the Wicket application starts, if some important configuration is > missing, I want to close all the application context, destroying all the > Spring beans, including also the Wicket application, which is configured as a > Spring bean by SpringWebApplicationFactory. > > I used the close() (I also tried stop() and destroy() methods) of the > ApplicationContext, but it doesn't destroy the Wicket app. > > I then searched for a method of Wicket Application, which allows to > stop/close the webapp, but I did not find it. > > How is it possible to stop a Wicket application from inside the application > itself (that is suicide)? One option is to use the underlying JMX capabilities of the application server and request stop/undeploy of the application. Another option is to set a flag (application scope) and modify the RequestCycle to always redirect to some "Sorry, the application doesn't work" page if that flag is set to true. > > Best regards, > giovanni > > > >
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
