Package org.nuxeo.runtime.deployment
Class NuxeoStarter
- java.lang.Object
-
- org.nuxeo.runtime.deployment.NuxeoStarter
-
- All Implemented Interfaces:
EventListener,javax.servlet.ServletContextListener
public class NuxeoStarter extends Object implements javax.servlet.ServletContextListener
This is called at WAR startup and starts the Nuxeo OSGi runtime and registers the Nuxeo bundles with it.This class must be configured as a
<listener>/<listener-class>inMETA-INF/web.xml.It uses servlet init parameters defined through
<context-param>/<param-name>/<param-value>in web.xml. Allowable parameter names come fromEnvironment, mainlyNUXEO_RUNTIME_HOMEandNUXEO_CONFIG_DIR, but alsoNUXEO_DATA_DIR,NUXEO_LOG_DIR,NUXEO_TMP_DIRandNUXEO_WEB_DIR.
-
-
Field Summary
Fields Modifier and Type Field Description protected List<File>bundleFilesprotected Map<String,Object>envstatic StringNUXEO_BUNDLES_LISTName of the file listing Nuxeo bundles.
-
Constructor Summary
Constructors Constructor Description NuxeoStarter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcontextDestroyed(javax.servlet.ServletContextEvent event)voidcontextInitialized(javax.servlet.ServletContextEvent event)protected voidfindBundles(javax.servlet.ServletContext servletContext)protected voidfindEnv(javax.servlet.ServletContext servletContext)protected voidstart(javax.servlet.ServletContextEvent event)protected voidstop()
-
-
-
Field Detail
-
NUXEO_BUNDLES_LIST
public static final String NUXEO_BUNDLES_LIST
Name of the file listing Nuxeo bundles. If existing, this file will be used at start, else"/WEB-INF/lib/"will be scanned.- Since:
- 5.9.3
- See Also:
findBundles(ServletContext), Constant Field Values
-
-
Method Detail
-
contextInitialized
public void contextInitialized(javax.servlet.ServletContextEvent event)
- Specified by:
contextInitializedin interfacejavax.servlet.ServletContextListener
-
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent event)
- Specified by:
contextDestroyedin interfacejavax.servlet.ServletContextListener
-
start
protected void start(javax.servlet.ServletContextEvent event) throws IOException, org.osgi.framework.BundleException- Throws:
IOExceptionorg.osgi.framework.BundleException
-
stop
protected void stop() throws org.osgi.framework.BundleException- Throws:
org.osgi.framework.BundleException
-
findBundles
protected void findBundles(javax.servlet.ServletContext servletContext) throws IOException- Throws:
IOException
-
findEnv
protected void findEnv(javax.servlet.ServletContext servletContext)
-
-