public class ServletContextListenerStartup extends Object implements javax.servlet.ServletContextListener
This startup must be defined in web.xml
file.
<listener> <listener-class>org.apache.ignite.startup.servlet.ServletContextListenerStartup</listener-class> </listener> <context-param> <param-name>IgniteConfigurationFilePath</param-name> <param-value>config/default-config.xml</param-value> </context-param>
Servlet context listener based startup may be used in any web container like Tomcat, Jetty and etc. Depending on the way this startup is deployed the Ignite instance can be accessed by either all web applications or by only one. Please consult class loading architecture documentation of your web container.
$TOMCAT_HOME/conf/catalina.properties
for property common.loader
the following $IGNITE_HOME/*.jar,$IGNITE_HOME/libs/*.jar
(replace $IGNITE_HOME
with absolute path).
$TOMCAT_HOME/conf/web.xml
<listener> <listener-class>org.apache.ignite.startup.servlet.ServletContextListenerStartup</listener-class> </listener> <context-param> <param-name>IgniteConfigurationFilePath</param-name> <param-value>config/default-config.xml</param-value> </context-param>
web.xml
file and all libraries should
be added in WAR file without changes in Tomcat configuration files.
Modifier and Type | Field and Description |
---|---|
static String |
IGNITE_CFG_FILE_PATH_PARAM
Configuration file path parameter name.
|
Constructor and Description |
---|
ServletContextListenerStartup() |
Modifier and Type | Method and Description |
---|---|
void |
contextDestroyed(javax.servlet.ServletContextEvent evt) |
void |
contextInitialized(javax.servlet.ServletContextEvent evt) |
String |
toString() |
public static final String IGNITE_CFG_FILE_PATH_PARAM
public void contextInitialized(javax.servlet.ServletContextEvent evt)
contextInitialized
in interface javax.servlet.ServletContextListener
public void contextDestroyed(javax.servlet.ServletContextEvent evt)
contextDestroyed
in interface javax.servlet.ServletContextListener
GridGain In-Memory Computing Platform : ver. 8.9.19 Release Date : April 10 2025