public class JettyJeeProcessingUnitContainerProvider extends JeeProcessingUnitContainerProvider
JeeProcessingUnitContainerProvider
that can run web applications (war files) using Jetty. The jetty xml configuration is
loaded from The difference between plain and shared mode is only indicated by the built in
jerry spring application context. The plain mode starts a jetty instance per web application
instance. The shared mode uses the same jetty instance for all web applications. The default is
plain mode as it is usually the simpler and preferred way to use it. The web application
will be enabled automatically for OpenSpaces bootstrapping using Post
processing of the JMX in jetty can be enabled by passing a
deployment property DEFAULT_JETTY_PU
location if it exists. If it does not exists, two defaults
exists, one is the jetty.plain.pu.xml
and the other is
jetty.shared.xml
. By default, if nothing is passed, the jetty.plain.xml
is loaded.
BootstrapWebApplicationContextListener
. web.xml
and jetty-web.xml
is performed allowing to
use ${...}
notation within them (for example, using system properties, deployed
properties, or ${clusterInfo...}
). JETTY_JMX_PROP
. If set to true
jetty will be configured
with JMX. In plain mode, where there can be more than one instance of jetty within the same JVM,
the domain each instance will be registered under will be gigaspaces.jetty.${clusterInfo.name}.${clusterInfo.runningNumberOffset1}
.
In shared mode, where there is only one instance of jetty in a single JVM, jetty JMX will be
registered with a domain called gigaspaces.jetty
.
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_JETTY_PU
The optional location where a jetty spring application context (responsible for configuring
jetty) will be loaded (within the processing unit).
|
static String |
INSTANCE_PLAIN |
static String |
INSTANCE_SHARD |
static String |
INTERNAL_JETTY_PU_PREFIX |
static String |
JETTY_INSTANCE_PROP |
static String |
JETTY_JMX_PROP
The deployment property controlling if JMX is enabled or not.
|
static String |
JETTY_LOCATION_PREFIX_SYSPROP |
APPLICATION_CONTEXT_CONTEXT, BEAN_LEVEL_PROPERTIES_CONTEXT, CLUSTER_INFO_CONTEXT, DEFAULT_JEE_CONTAINER, JEE_CONTAINER_PROPERTY_NAME, JETTY_PORT_ACTUAL_CONTEXT, JETTY_PORT_CONTEXT_PREFIX, JETTY_PORT_CONTEXT_SUFFIX
DEFAULT_FS_PU_CONTEXT_LOCATION, DEFAULT_PU_CONTEXT_LOCATION
CONTAINER_CLASS_PROP, CONTEXT_PROPERTY_DEPLOY_PATH, SPACE_NAME_PROPERTY_KEY
Constructor and Description |
---|
JettyJeeProcessingUnitContainerProvider() |
Modifier and Type | Method and Description |
---|---|
ProcessingUnitContainer |
createContainer()
See the header javadoc.
|
static org.springframework.context.ApplicationContext |
getCurrentApplicationContext()
Allows to get the current application context (loaded from
pu.xml ) during web
application startup. |
static BeanLevelProperties |
getCurrentBeanLevelProperties() |
static ClusterInfo |
getCurrentClusterInfo() |
String |
getJeeContainerType() |
addConfigLocation, addConfigLocation, getDeployPath, getJeeClassLoader, getJeeContainer, getJeeContainerJarPath, getManifestURLs, getWebAppClassLoaderClassPath, getWebAppClassLoaderJars, initApplicationContext, setClassLoader, setDeployPath, setManifestUrls, setParentContext
getBeanLevelProperties, getClusterInfo, getConfig, setBeanLevelProperties, setClusterInfo, setMetricRegistrator, setSpaceName
public static final String DEFAULT_JETTY_PU
JETTY_INSTANCE_PROP
)
defaulting to plain.public static final String INTERNAL_JETTY_PU_PREFIX
public static final String INSTANCE_PLAIN
public static final String INSTANCE_SHARD
public static final String JETTY_LOCATION_PREFIX_SYSPROP
public static final String JETTY_INSTANCE_PROP
public static final String JETTY_JMX_PROP
false
(JMX is disabled).public JettyJeeProcessingUnitContainerProvider()
public static org.springframework.context.ApplicationContext getCurrentApplicationContext()
pu.xml
) during web
application startup. Can be used to access beans defined within it (like a Space) by
components loaded (such as session storage). Note, this is only applicable during web
application startup. It is cleared right afterwards.public static ClusterInfo getCurrentClusterInfo()
public static BeanLevelProperties getCurrentBeanLevelProperties()
public String getJeeContainerType()
getJeeContainerType
in class JeeProcessingUnitContainerProvider
public ProcessingUnitContainer createContainer() throws CannotCreateContainerException
createContainer
in class ProcessingUnitContainerProvider
CannotCreateContainerException
Copyright © GigaSpaces.