GigaSpaces XAP 10.0.1 API

org.openspaces.pu.container.jee
Class JeeProcessingUnitContainerProvider

java.lang.Object
  extended by org.openspaces.pu.container.jee.JeeProcessingUnitContainerProvider
All Implemented Interfaces:
ClusterInfoAware, BeanLevelPropertiesAware, ClassLoaderAwareProcessingUnitContainerProvider, DeployableProcessingUnitContainerProvider, ManifestClasspathAwareProcessingUnitContainerProvider, ProcessingUnitContainerProvider, ApplicationContextProcessingUnitContainerProvider
Direct Known Subclasses:
JettyJeeProcessingUnitContainerProvider

public abstract class JeeProcessingUnitContainerProvider
extends Object
implements ApplicationContextProcessingUnitContainerProvider, DeployableProcessingUnitContainerProvider, ManifestClasspathAwareProcessingUnitContainerProvider

An extension to the ApplicationContextProcessingUnitContainerProvider that can handle JEE processing units.

Author:
kimchy

Field Summary
static String APPLICATION_CONTEXT_CONTEXT
          The ServletContext key under which the ApplicationContext (loaded from the pu.xml) is stored.
static String BEAN_LEVEL_PROPERTIES_CONTEXT
          The ServletContext key under which the BeanLevelProperties is stored.
static String CLUSTER_INFO_CONTEXT
          The ServletContext key under which the ClusterInfo is stored.
static String DEFAULT_JEE_CONTAINER
           
static String JEE_CONTAINER_PROPERTY_NAME
           
 
Fields inherited from interface org.openspaces.pu.container.spi.ApplicationContextProcessingUnitContainerProvider
DEFAULT_FS_PU_CONTEXT_LOCATION, DEFAULT_PU_CONTEXT_LOCATION
 
Fields inherited from interface org.openspaces.pu.container.ProcessingUnitContainerProvider
CONTAINER_CLASS_PROP
 
Fields inherited from interface org.openspaces.pu.container.DeployableProcessingUnitContainerProvider
CONTEXT_PROPERTY_DEPLOY_PATH
 
Constructor Summary
JeeProcessingUnitContainerProvider()
           
 
Method Summary
 void addConfigLocation(Resource resource)
          Adds a config location using Springs Resource abstraction.
 void addConfigLocation(String path)
          Adds a config location based on a String description using Springs PathMatchingResourcePatternResolver.
 BeanLevelProperties getBeanLevelProperties()
           
 ClusterInfo getClusterInfo()
           
 File getDeployPath()
           
protected  ClassLoader getJeeClassLoader()
           
static String getJeeContainer(BeanLevelProperties properties)
           
static String getJeeContainerJarPath(String jeeContainer)
           
abstract  String getJeeContainerType()
           
 Iterable<URL> getManifestURLs()
           
protected  Iterable<String> getWebAppClassLoaderClassPath()
           
protected  Iterable<String> getWebAppClassLoaderJars()
           
protected  ResourceApplicationContext initApplicationContext()
           
 void setBeanLevelProperties(BeanLevelProperties beanLevelProperties)
          Sets the BeanLevelProperties that will be used to configure this processing unit.
 void setClassLoader(ClassLoader classLoader)
          Sets the class loader this processing unit container will load the application context with.
 void setClusterInfo(ClusterInfo clusterInfo)
          Sets the ClusterInfo that will be used to configure this processing unit.
 void setDeployPath(File warPath)
          Sets the deploy path where the exploded war jetty will work with is located.
 void setManifestUrls(Iterable<URL> manifestURLs)
           
 void setParentContext(ApplicationContext parentContext)
          Sets Spring parent ApplicationContext that will be used when constructing this processing unit application context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.openspaces.pu.container.ProcessingUnitContainerProvider
createContainer
 

Field Detail

CLUSTER_INFO_CONTEXT

public static final String CLUSTER_INFO_CONTEXT
The ServletContext key under which the ClusterInfo is stored.

See Also:
Constant Field Values

BEAN_LEVEL_PROPERTIES_CONTEXT

public static final String BEAN_LEVEL_PROPERTIES_CONTEXT
The ServletContext key under which the BeanLevelProperties is stored.

See Also:
Constant Field Values

APPLICATION_CONTEXT_CONTEXT

public static final String APPLICATION_CONTEXT_CONTEXT
The ServletContext key under which the ApplicationContext (loaded from the pu.xml) is stored.

See Also:
Constant Field Values

JEE_CONTAINER_PROPERTY_NAME

public static final String JEE_CONTAINER_PROPERTY_NAME
See Also:
Constant Field Values

DEFAULT_JEE_CONTAINER

public static final String DEFAULT_JEE_CONTAINER
See Also:
Constant Field Values
Constructor Detail

JeeProcessingUnitContainerProvider

public JeeProcessingUnitContainerProvider()
Method Detail

getJeeContainerType

public abstract String getJeeContainerType()

getManifestURLs

public Iterable<URL> getManifestURLs()

setManifestUrls

public void setManifestUrls(Iterable<URL> manifestURLs)
Specified by:
setManifestUrls in interface ManifestClasspathAwareProcessingUnitContainerProvider

setBeanLevelProperties

public void setBeanLevelProperties(BeanLevelProperties beanLevelProperties)
Sets the BeanLevelProperties that will be used to configure this processing unit. When constructing the container this provider will automatically add to the application context both BeanLevelPropertyBeanPostProcessor and BeanLevelPropertyPlaceholderConfigurer based on this bean level properties.

Specified by:
setBeanLevelProperties in interface BeanLevelPropertiesAware

getBeanLevelProperties

public BeanLevelProperties getBeanLevelProperties()

setClusterInfo

public void setClusterInfo(ClusterInfo clusterInfo)
Sets the ClusterInfo that will be used to configure this processing unit. When constructing the container this provider will automatically add to the application context the ClusterInfoBeanPostProcessor in order to allow injection of cluster info into beans that implement ClusterInfoAware.

Specified by:
setClusterInfo in interface ClusterInfoAware
Parameters:
clusterInfo - The cluster information to be injected

getClusterInfo

public ClusterInfo getClusterInfo()

setClassLoader

public void setClassLoader(ClassLoader classLoader)
Sets the class loader this processing unit container will load the application context with.

Specified by:
setClassLoader in interface ClassLoaderAwareProcessingUnitContainerProvider

setDeployPath

public void setDeployPath(File warPath)
Sets the deploy path where the exploded war jetty will work with is located.

Specified by:
setDeployPath in interface DeployableProcessingUnitContainerProvider

getDeployPath

public File getDeployPath()

addConfigLocation

public void addConfigLocation(Resource resource)
Adds a config location using Springs Resource abstraction. This config location represents a Spring xml context.

Note, once a config location is added that default location used when no config location is defined won't be used (the default location is classpath*:/META-INF/spring/pu.xml).

Specified by:
addConfigLocation in interface ApplicationContextProcessingUnitContainerProvider

addConfigLocation

public void addConfigLocation(String path)
                       throws IOException
Adds a config location based on a String description using Springs PathMatchingResourcePatternResolver.

Specified by:
addConfigLocation in interface ApplicationContextProcessingUnitContainerProvider
Throws:
IOException
See Also:
PathMatchingResourcePatternResolver

setParentContext

public void setParentContext(ApplicationContext parentContext)
Sets Spring parent ApplicationContext that will be used when constructing this processing unit application context.


getWebAppClassLoaderJars

protected Iterable<String> getWebAppClassLoaderJars()

getWebAppClassLoaderClassPath

protected Iterable<String> getWebAppClassLoaderClassPath()

getJeeClassLoader

protected ClassLoader getJeeClassLoader()
                                 throws Exception
Throws:
Exception

initApplicationContext

protected ResourceApplicationContext initApplicationContext()

getJeeContainerJarPath

public static String getJeeContainerJarPath(String jeeContainer)

getJeeContainer

public static String getJeeContainer(BeanLevelProperties properties)

GigaSpaces XAP 10.0.1 API

Copyright © GigaSpaces.