dimanche 15 mars 2015

Spring - complete shutdown of web application

I have a web application which I'm trying to shut down by executing the close() method on the context:



((ConfigurableApplicationContext) appContext).close();


After executing this the application appears to be continuing running, health page produces the following exception:



org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:978)


Is there a way to shudown the whole thing via Spring or should I resort to System.exit()?


Any help would be kindly appreciated!


Aucun commentaire:

Enregistrer un commentaire