@Override public void init(ServletConfig config) throws ServletException { super.init(config); File fedoraHomeDir = getFedoraHomeDir(); // get file for writing startup status try { m_status = new ServerStatusFile(new File(fedoraHomeDir, "server")); } catch (Throwable th) { failStartup("Error initializing server status file", th); } try { m_appContext = WebApplicationContextUtils.getRequiredWebApplicationContext(config.getServletContext()); m_server = (Server)m_appContext.getBean("org.fcrepo.server.Server"); if (m_server == null) failStartup("Could not retrieve org.fcrepo.server.Server bean",null); } catch (Throwable th) { String msg = "Fedora startup failed"; try { m_status.appendError(ServerState.STARTUP_FAILED, th); } catch (Exception e) { } failStartup(msg, th); } }
@Override public void init(ServletConfig config) throws ServletException { super.init(config); File fedoraHomeDir = getFedoraHomeDir(); // get file for writing startup status try { m_status = new ServerStatusFile(new File(fedoraHomeDir, "server")); } catch (Throwable th) { failStartup("Error initializing server status file", th); } try { m_appContext = WebApplicationContextUtils.getRequiredWebApplicationContext(config.getServletContext()); m_server = (Server)m_appContext.getBean("org.fcrepo.server.Server"); if (m_server == null) failStartup("Could not retrieve org.fcrepo.server.Server bean",null); } catch (Throwable th) { String msg = "Fedora startup failed"; try { m_status.appendError(ServerState.STARTUP_FAILED, th); } catch (Exception e) { } failStartup(msg, th); } }