02-17-2013 07:51 AM
public class ExplorerApp extends Application implements HttpServletRequestListener {
private static final long serialVersionUID = -1L;
// Thread local storage of instance for each user
protected static ThreadLocal<ExplorerApp> current = new ThreadLocal<ExplorerApp>();
protected String environment;
protected UserCache userCache;
protected MainWindow mainWindow;
protected ViewManager viewManager;
protected NotificationManager notificationManager;
protected I18nManager i18nManager;
protected AttachmentRendererManager attachmentRendererManager;
protected FormPropertyRendererManager formPropertyRendererManager;
protected VariableRendererManager variableRendererManager;
protected LoginHandler loginHandler;
protected WorkflowDefinitionConversionFactory workflowDefinitionConversionFactory;
protected ComponentFactories componentFactories;
@Override
public void init(ServletConfig servletConfig) throws ServletException {
super.init(servletConfig);
applicationContext = WebApplicationContextUtils.getWebApplicationContext(servletConfig.getServletContext());
}
@Override
protected Class< ? extends Application> getApplicationClass() throws ClassNotFoundException {
return ExplorerApp.class;
}
@Override
protected Application getNewApplication(HttpServletRequest request) {
return (Application) applicationContext.getBean(ExplorerApp.class);
}
02-18-2013 03:51 AM
The load-on-startup element indicates that this servlet should be loaded (instantiated and have its init() called) on the startup of the web application. The optional contents of these element must be an integer indicating the order in which the servlet should be loaded. If the value is a negative integer, or the element is not present, the container is free to load the servlet whenever it chooses. If the value is a positive 128 integer or 0, the container must load and initialize the servlet as the application is deployed. The container must guarantee that servlets marked with lower integers are loaded before servlets marked with higher integers. The container may choose the order of loading of servlets with the same load-on-start-up value.
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.