@Override public void destroy() { m_access = null; super.destroy(); } }
@Override public void init() throws ServletException { super.init(); }
@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); } }
failStartup("FEDORA_HOME was not configured properly. It must be " + "set via the fedora.home servlet init-param (preferred), " + "the fedora.home system property, or the FEDORA_HOME " failStartup("The FEDORA_HOME directory, " + fedoraHomeDir.getPath() + " does not exist", null); failStartup(writeErrorMessage, null);
@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); } }
failStartup("FEDORA_HOME was not configured properly. It must be " + "set via the fedora.home servlet init-param (preferred), " + "the fedora.home system property, or the FEDORA_HOME " failStartup("The FEDORA_HOME directory, " + fedoraHomeDir.getPath() + " does not exist", null); failStartup(writeErrorMessage, null);
@Override public void init() throws ServletException { super.init(); }
@Override public void destroy() { m_access = null; super.destroy(); } }
@Override public void init(ServletConfig config) throws ServletException { super.init(config); m_access = (Access) m_server .getModule("org.fcrepo.server.access.Access"); }
@Override public void destroy() { if (m_server != null) { try { m_status.append(ServerState.STOPPING, "Shutting down Fedora Server and modules"); m_server.shutdown(null); m_status.append(ServerState.STOPPED, "Shutdown Successful"); } catch (Throwable th) { try { m_status.appendError(ServerState.STOPPED_WITH_ERR, th); } catch (Exception e) { } } m_server = null; } super.destroy(); }
@Override public void init(ServletConfig config) throws ServletException { super.init(config); m_access = (Access) m_server .getModule("org.fcrepo.server.access.Access"); }
@Override public void destroy() { if (m_server != null) { try { m_status.append(ServerState.STOPPING, "Shutting down Fedora Server and modules"); m_server.shutdown(null); m_status.append(ServerState.STOPPED, "Shutdown Successful"); } catch (Throwable th) { try { m_status.appendError(ServerState.STOPPED_WITH_ERR, th); } catch (Exception e) { } } m_server = null; } super.destroy(); }
/** * Initialize servlet. Gets a reference to the fedora Server object. * * @throws ServletException * If the servet cannot be initialized. */ @Override public void init(ServletConfig config) throws ServletException { super.init(config); m_management = (Management) m_server.getModule("org.fcrepo.server.management.Management"); if (m_management == null) { throw new ServletException("Unable to get Management module from server."); } }
/** * Initialize servlet. Gets a reference to the fedora Server object. * * @throws ServletException * If the servet cannot be initialized. */ @Override public void init(ServletConfig config) throws ServletException { super.init(config); m_management = (Management) m_server.getModule("org.fcrepo.server.management.Management"); if (m_management == null) { throw new ServletException("Unable to get Management module from server."); } }
super.init(config); try { fedoraServerPort = m_server.getParameter("fedoraServerPort");
super.init(config); try { fedoraServerPort = m_server.getParameter("fedoraServerPort");