public class SharedContextFactory extends Object implements FactoryBean, ClusterInfoAware
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.
Constructor and Description |
---|
SharedContextFactory() |
Modifier and Type | Method and Description |
---|---|
Object |
getObject() |
Class |
getObjectType() |
boolean |
isSingleton() |
void |
setClusterInfo(ClusterInfo clusterInfo)
Sets the cluster information.
|
void |
setContext(String context) |
void |
setSeparator(String separator) |
void |
setUnique(boolean unique) |
public void setContext(String context)
public void setUnique(boolean unique)
public void setSeparator(String separator)
public void setClusterInfo(ClusterInfo clusterInfo)
ClusterInfoAware
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 ClusterInfoAware
should take into account the fact that the cluster info provided might be null.
setClusterInfo
in interface ClusterInfoAware
clusterInfo
- The cluster information to be injectedpublic Object getObject() throws Exception
getObject
in interface FactoryBean
Exception
public Class getObjectType()
getObjectType
in interface FactoryBean
public boolean isSingleton()
isSingleton
in interface FactoryBean
Copyright © GigaSpaces.