public class BootstrapWebApplicationContextListener extends Object implements javax.servlet.ServletContextListener
ClusterInfo
,
BeanLevelProperties
, and handle an optional pu.xml file
within META-INF/spring by loading it. The different web containers support in OpenSpaces
will use prepareForBoot(java.io.File, org.openspaces.core.cluster.ClusterInfo,
org.openspaces.core.properties.BeanLevelProperties)
before the web application is started. It
will basically marshall the ClusterInfo and BeanLevelProperties so they can be read when the
contextInitialized(javax.servlet.ServletContextEvent)
is called. It will also change the
web.xml in order to add this class as a context listener.
During context initialization, the marshalled ClusterInfo and BeanLevelProperties can be read and put in the servlet context (allowing us to support any web container).
If there is a pu.xml file, it will be started
as well, with the application context itself set in the servlet context (can then be used by the
ProcessingUnitContextLoaderListener
as well as
all its beans read and set in the servlet context under their respective names.
Constructor and Description |
---|
BootstrapWebApplicationContextListener() |
Modifier and Type | Method and Description |
---|---|
void |
contextDestroyed(javax.servlet.ServletContextEvent servletContextEvent) |
void |
contextInitialized(javax.servlet.ServletContextEvent servletContextEvent) |
static Object |
objectFromByteBuffer(byte[] buffer) |
static byte[] |
objectToByteBuffer(Object obj) |
static void |
prepareForBoot(File warPath,
ClusterInfo clusterInfo,
BeanLevelProperties beanLevelProperties)
Changes the web.xml to include the bootstrap context listener and the request statistics
filter
|
public BootstrapWebApplicationContextListener()
public void contextInitialized(javax.servlet.ServletContextEvent servletContextEvent)
contextInitialized
in interface javax.servlet.ServletContextListener
public void contextDestroyed(javax.servlet.ServletContextEvent servletContextEvent)
contextDestroyed
in interface javax.servlet.ServletContextListener
public static void prepareForBoot(File warPath, ClusterInfo clusterInfo, BeanLevelProperties beanLevelProperties) throws Exception
Exception
public static Object objectFromByteBuffer(byte[] buffer) throws Exception
Exception
Copyright © GigaSpaces.