/** Programmatically stops the application and performs all necessary cleanups. */ public void stop() { // Breaks SSO. Useless to perform before garbage collecting. // if (frontendController != null) { // frontendController.stop(); // } frontendController = null; BackendControllerHolder.setSessionBackendController(null); }
/** * Both front and back controllers are retrieved from the spring context, associated and started. * * <p>{@inheritDoc} */ @SuppressWarnings("unchecked") @Override public void start() { // start on brand new instances. stop(); IBackendController backendController; try { backendController = (IBackendController) getApplicationContext().getBean("applicationBackController"); } catch (RuntimeException ex) { LOG.error("applicationBackController could not be instantiated.", ex); throw ex; } try { frontendController = (IFrontendController<E, F, G>) getApplicationContext().getBean("applicationFrontController"); } catch (RuntimeException ex) { LOG.error("applicationFrontController could not be instantiated.", ex); throw ex; } frontendController.start(backendController, getStartupLocale(), getClientTimeZone()); BackendControllerHolder.setSessionBackendController(backendController); }