Package org.openspaces.pu.container.jee
Class SharedContextFactory
java.lang.Object
org.openspaces.pu.container.jee.SharedContextFactory
- All Implemented Interfaces:
ClusterInfoAware,org.springframework.beans.factory.FactoryBean
public class SharedContextFactory
extends Object
implements org.springframework.beans.factory.FactoryBean, ClusterInfoAware
A helper to construct web context path. Allows to set the
context
that will be used.
setUnique(boolean) (which defaults to true) controls if the context
created will be unique between other instances of the same web application. If set to
true, the context created will be in the format of [context] + [suffix] +
. If set to
ClusterInfo.getRunningNumberOffset1()false, will simply return the context.
- Author:
- kimchy
-
Field Summary
Fields inherited from interface org.springframework.beans.factory.FactoryBean
OBJECT_TYPE_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidsetClusterInfo(ClusterInfo clusterInfo) Sets the cluster information.voidsetContext(String context) voidsetSeparator(String separator) voidsetUnique(boolean unique)
-
Constructor Details
-
SharedContextFactory
public SharedContextFactory()
-
-
Method Details
-
setContext
-
setUnique
public void setUnique(boolean unique) -
setSeparator
-
setClusterInfo
Description copied from interface:ClusterInfoAwareSets the cluster information.Note, the cluster information is obtained externally from the application context which means that this feature need to be supported by specific containers (and is not supported by plain Spring application context). This means that beans that implement
ClusterInfoAwareshould take into account the fact that the cluster info provided might be null.- Specified by:
setClusterInfoin interfaceClusterInfoAware- Parameters:
clusterInfo- The cluster information to be injected
-
getObject
- Specified by:
getObjectin interfaceorg.springframework.beans.factory.FactoryBean- Throws:
Exception
-
getObjectType
- Specified by:
getObjectTypein interfaceorg.springframework.beans.factory.FactoryBean
-
isSingleton
public boolean isSingleton()- Specified by:
isSingletonin interfaceorg.springframework.beans.factory.FactoryBean
-