public class SessionHelper extends Base
Must NOT be serializable just in case the application server implements clustering on the ServletContext level (because the session helper will be stored in the app server's ServletContext).
Modifier and Type | Class and Description |
---|---|
class |
SessionHelper.SessionReaperDaemon
A daemon thread class that will clean up expired sessions.
|
protected static interface |
SessionHelper.Task
Interface for detecting when a Runnable Task has completed.
|
Base.LoggingWriter, Base.StackFrame
Modifier and Type | Field and Description |
---|---|
static String |
CACHE_CONFIGURATION_PATH
The name of the resource that will be used to configure the session
management module's own ConfigurableCacheFactory.
|
static String |
CFG_KEY_REAPER
The key in the configuration cache for coordating cluster-wide session
reaping.
|
static String |
CTX_ATTR_CONTEXT
The name of the application server context's attribute that Coherence
stores its servlet context object under.
|
static String |
CTX_INIT_ALLOW_LOCAL_ATTRIBUTES
The configuration property that specifies whether non-serializable
attributes should be preserved as local.
|
static String |
CTX_INIT_APPLICATION_NAME
The configuration property that overrides the name of the web
application.
|
protected static String |
CTX_INIT_APPLICATION_NAME_GENERATED
Whether the application name was generated by Coherence*Web
|
static String |
CTX_INIT_ATTR_OVERFLOW_THRESHOLD
The configuration property for the "split" model that overrides
the length that attributes must be below to be stored inside a
session ("embedded") or above which they will be stored in the
separated "overflow" cache ("external").
|
static String |
CTX_INIT_CACHE_CONFIGURATION_PATH
The configuration property that indicates which cache configuration path
name will be used.
|
static String |
CTX_INIT_CACHE_DELEGATOR_CLASS
The configuration property that defines the cache delegator class.
|
static String |
CTX_INIT_CACHENAME_CONTEXT
The name of the Coherence cache that will be used to hold the servlet
context data if the servlet context is clustered by Coherence.
|
static String |
CTX_INIT_CACHENAME_LOCAL_ATTRIBUTES
The configuration property that overrides the name of the local cache
that stores non-distributed session attributes (if allowed.)
|
static String |
CTX_INIT_CACHENAME_LOCAL_SESSIONS
The configuration property that overrides the name of the local
cache that stores non-distributed sessions when the
SessionDistributionController option is implemented.
|
static String |
CTX_INIT_CACHENAME_MANAGEMENT
The configuration property that overrides the name of the clustered
cache that stores the sessions management configuration data.
|
static String |
CTX_INIT_CACHENAME_OVERFLOW
The configuration property that overrides the name of the clustered
cache that stores the "overflowing" (split-out due to size) session
attributes.
|
static String |
CTX_INIT_CACHENAME_SESSIONS
The configuration property that overrides the name of the clustered
cache that stores the sessions.
|
static String |
CTX_INIT_CLUSTER
The name of the application server context's initialization parameter
that specifies whether the ServletContext attribute values will be
clustered.
|
static String |
CTX_INIT_CLUSTER_OWNED
True if the cluster software is deployed as part of the application and
thus must be shut down fully by the application when it shuts down.
|
static String |
CTX_INIT_COLLECTION
The name of the application server context's initialization parameter
that specifies the fully qualified class name of the
HttpSessionCollection implementation to use.
|
static String |
CTX_INIT_CONFIGURATION_CONSISTENCY
The configuration property that indicates whether configuration
consistency should be checked.
|
static String |
CTX_INIT_COOKIE_DOMAIN
The domain of the session cookie.
|
static String |
CTX_INIT_COOKIE_HTTPONLY
True to ensure that the session cookie is only send from the browser uising the
http/https connection.
|
static String |
CTX_INIT_COOKIE_MAX_AGE
The maximum age in seconds of the session cookie.
|
static String |
CTX_INIT_COOKIE_NAME
The name of the session cookie.
|
static String |
CTX_INIT_COOKIE_PATH
The path of the session cookie.
|
static String |
CTX_INIT_COOKIE_SECURE
True to ensure that the session cookie is only sent from a web client over
a SSL connection.
|
static String |
CTX_INIT_COOKIES_ENABLED
True to enable session cookies.
|
static String |
CTX_INIT_DAEMON_ASSUME_LOCALITY
True to assume that the sessions in the cache are split across only
the servers that are doing reaping.
|
static String |
CTX_INIT_DAEMON_COORDINATED
True to coordinate reaping in the cluster such that only one server
will perform reaping within a given reaping cycle, and it will check
all session ids in the cluster.
|
static String |
CTX_INIT_DAEMON_CYCLE_SECS
The number of seconds that the daemon rests between reaping.
|
static String |
CTX_INIT_DAEMON_MAX_THREADS
Configuration parameter for setting the maximum number of threads for the session reaper daemon.
|
static String |
CTX_INIT_DAEMON_MIN_THREADS
Configuration parameter for setting the minimum number of threads for the session reaper daemon.
|
static String |
CTX_INIT_DAEMON_PARALLEL
Configuration parameter for enabling parallel session reaping.
|
static String |
CTX_INIT_DAEMON_PRIORITY
The priority for the session reaper daemon.
|
static String |
CTX_INIT_DAEMON_QUEUE_SIZE
Configuration parameter for setting the queue size of the session reaper work manager.
|
static String |
CTX_INIT_DAEMON_SWEEP_MODULO
The number of times that the reaper reaps the sessions that are
being used locally before it will check sessions that may be
orphaned or expired elsewhere in the cluster.
|
static String |
CTX_INIT_DIST_CONTROLLER_CLASS
The configuration property that specifies an implementation of the
SessionDistributionController interface to use.
|
static String |
CTX_INIT_ENABLE_ATTR_LISTENER_OPTIMIZATION
Determines if attribute listeners should be executed if the same instance
of a session attribute is being replaced in the session.
|
static String |
CTX_INIT_ENABLE_SESSION_ACCESS_DEBUG_LOGGING
Enable Debug logging for Session access, creation, invalidation,
and attribute access/insertion/update/removal
|
static String |
CTX_INIT_ENABLE_SUSPECT_ATTRIBUTES
Whether we try to determine suspect attributes.
|
static String |
CTX_INIT_FACTORY
The name of the application server context's initialization parameter
that specifies the fully qualified class name of the SessionHelper
Factory to use.
|
static String |
CTX_INIT_FILTER
In the filter's configuration, the name of the filter class that is
wrapped by the Coherence filter.
|
static String |
CTX_INIT_LISTENS
The comma-delimited list of names of application classes that wish to
receive events from the web container.
|
static String |
CTX_INIT_LOG_THREADS_HOLDING_LOCK
The configuration property that specifies whether an diagnostic invocation
service is executed when a member is unable to acquire the cluster lock
for a session.
|
static String |
CTX_INIT_LOGGER_LEVEL
Configuration parameter for setting the logger level for this Coherence*Web instance.
|
static String |
CTX_INIT_SCOPE_CONTROLLER_CLASS
The configuration property that specifies an implementation of the
AttributeScopeController interface to use.
|
static String |
CTX_INIT_SERVICENAME_OWNERSHIP
The configuration property that specifies the name of the invocation
service that will be used to manage sticky session ownership.
|
static String |
CTX_INIT_SERVLET
In the servlet's configuration, the name of the servlet class that is
wrapped by the Coherence servlet.
|
static String |
CTX_INIT_SESSION_ACCESS_DEBUG_LOGGING_FILTER
Comma separated list of session attribute prefixes not to be logged
|
static String |
CTX_INIT_SESSION_AFFINITY_TOKEN
The configuration property that specifies session id affinity suffix token.
|
static String |
CTX_INIT_SESSION_APP_LOCK
The configuration property that specifies application level session locking.
|
static String |
CTX_INIT_SESSION_CACHE_FEDERATED
The configuration property that indicates whether the session cache
needs to be federated
|
static String |
CTX_INIT_SESSION_EXPIRE_SECS
The configuration property that overrides the session expirty time.
|
protected static String |
CTX_INIT_SESSION_EXPIRY_FILTER_FACTORY
Parameter name for specifying a custom session expiry filter factory
|
static String |
CTX_INIT_SESSION_GET_LOCK_TIMEOUT
The configuration property that specifies session lock acquisition timeout.
|
static String |
CTX_INIT_SESSION_ID_GENERATOR_CLASS
The configuration property that specifies the fully qualified class name
of the HttpSessionIdGenerator implementation to use.
|
static String |
CTX_INIT_SESSION_ID_LENGTH
The configuration property that overrides the session id length.
|
static String |
CTX_INIT_SESSION_LAZY_ACCESS
The configuration property that allows lazy access to a session.
|
static String |
CTX_INIT_SESSION_LOCK
The configuration property that specifies that session locking is enabled.
|
static String |
CTX_INIT_SESSION_LOCKING_MODE
The configuration property that sets the session locking Configuration:
in one step.
|
static String |
CTX_INIT_SESSION_LOCKING_MODE_APP
The configuration property that specifies valid application locking mode value.
|
static String |
CTX_INIT_SESSION_LOCKING_MODE_MEMBER
The configuration property that specifies valid member locking mode value.
|
static String |
CTX_INIT_SESSION_LOCKING_MODE_NONE
The configuration property that specifies valid none locking mode value.
|
static String |
CTX_INIT_SESSION_LOCKING_MODE_OPTIMISTIC
The configuration property that specifies valid optimistic locking mode value.
|
static String |
CTX_INIT_SESSION_LOCKING_MODE_THREAD
The configuration property that specifies valid thread locking mode value.
|
static String |
CTX_INIT_SESSION_LOG_INVALIDATION_EXCEPTIONS
The configuration property that specifies if Coherence*Web is to log
exceptions thrown by session attribute listeners during invalidation.
|
static String |
CTX_INIT_SESSION_MEMBER_LOCK
The configuration property that specifies member level session locking.
|
static String |
CTX_INIT_SESSION_REAPING_MECHANISM
The configuration property that indicates the mechanism which will be used by the session
reaper to delete timed-out sessions.
|
static String |
CTX_INIT_SESSION_REPLACE_AFFINITY_TOKEN |
static String |
CTX_INIT_SESSION_RETAIN_MILLIS
The length of time to defer async exit on a session that is accessed
"out of context".
|
static String |
CTX_INIT_SESSION_STICKY
The configuration property that specifies whether sticky sessions
optimizations will be used.
|
static String |
CTX_INIT_SESSION_STRICT_SPEC
The configuration property that specifies strict spec adherence.
|
static String |
CTX_INIT_SESSION_THREAD_LOCK
The configuration property that specifies thread level session locking.
|
static String |
CTX_INIT_SESSIONCONTEXT_ENABLED
True to allow the application to iterate sessions from the session
context, thus disobeying the deprecation in the servlet spec.
|
static String |
CTX_INIT_SHUTDOWN_DELAY_SECS
The configuration property that overrides the shutdown delay time.
|
static String |
CTX_INIT_URLDECODE_DEFAULT
True to use the container's decoding of the URL session ID.
|
static String |
CTX_INIT_URLENCODE_DEFAULT
True to use the container's encoding of the URL session ID.
|
static String |
CTX_INIT_URLENCODE_ENABLED
True to enable URL encoding of session ids.
|
static String |
CTX_INIT_URLENCODE_NAME
The parameter name to encode the session id into the URL with.
|
static String |
DEFAULT_CACHE_CONFIGURATION_PATH
The name of the template resource that will be used to configure the session
management module's own ConfigurableCacheFactory.
|
static String |
DEFAULT_CTXNAME
The default cache name for the ServletContext attribute map.
|
static String |
DEFAULT_FEDERATED_CACHE_CONFIGURATION_PATH
The file name of the federated default cache configuration file
|
static String |
DEFAULT_MGTNAME
The default cache name for the session management configuration data.
|
static String |
DEFAULT_REAPING_MECHANISM
The context parameter value to be set if Default (invalidation) is to be used as Reaping Mechanism.
|
static int |
EVT_ADDED
The internal enum for an attribute-added event.
|
static int |
EVT_REMOVED
The internal enum for an attribute-removed event.
|
static int |
EVT_REPLACED
The internal enum for an attribute-replaced event.
|
protected ConfigurableCacheFactory |
m_cachefactory
The session management module's own ConfigurableCacheFactory.
|
static Filter |
NAME_FILTER
The Filter object that hides init param names for Coherence params.
|
static String |
PRODUCT_BANNER
The product name banner.
|
static String |
REMOTE_DELETE_REAPING_MECHANISM
The context parameter value to be set if Remote Delete is to be used as reaping mechanism.
|
static String |
REQ_ATTR_COUNT
The name of the request attribute that stores a request reference
counter.
|
static String |
REQ_ATTR_SESSION
The name of the request attribute that stores the current Coherence
HttpSession instance.
|
static String |
REQ_ATTR_TEST
The name of the request attribute that tests if the Coherence wrapper
is in place.
|
static List |
s_collections
A singleton list of all collections on this server used for sticky session optimzation
|
static ThreadLocal<Boolean> |
s_tloReaperFlag
When a session needs to be invalidated, the removal must be synthetic remove in case
the invalidation is coming from the reaper.
|
static String |
SESSION_AFFINITY_SUFFIX_STRIPPED
The internal request attribute for tracking that a session affinity suffix has
stripped off the session id.
|
Constructor and Description |
---|
SessionHelper(SessionHelperFactory factory,
javax.servlet.ServletContext ctx)
Construct a Coherence SessionHelper that will support the
implementation of clustered web container services.
|
Modifier and Type | Method and Description |
---|---|
void |
addIgnoreAttributeName(String sName)
Register a name to ignore events for.
|
protected void |
checkConfigConsistency(com.tangosol.coherence.servlet.ValidatingConfiguration configuration)
Check that configuration is consistent with that of existing members.
|
protected void |
checkForDeadSessions()
Discard the HttpSession objects that are no longer alive.
|
protected void |
cleanUpSession(String sessionId)
Does any addition clean up necessary for the deleted sessions.
|
void |
clearStoredConfiguration()
Removes the storeSessd configuration.
|
protected void |
configure()
Called immediately after construction.
|
protected void |
configureLogger() |
void |
contextDestroyed()
Called by the Coherence ServletContextListener on contextDestroyed()
if an event listener is registered.
|
void |
contextInitialized()
Called by the Coherence ServletContextListener on contextInitialized()
if an event listener is registered.
|
javax.servlet.http.HttpSession |
createHttpSession()
Create a new HttpSession object.
|
RequestContext |
createRequestContext(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res)
Given the specified request and response, provide a request context.
|
protected com.tangosol.coherence.servlet.ServiceHelper |
createServiceHelper()
Create a ServiceHelper.
|
String |
decodeCookie(javax.servlet.http.HttpServletRequest req)
Obtain a session ID from a request object by examining the cookies
attached to the request.
|
protected String |
decodeUri(String sUri) |
String |
decodeUrl(javax.servlet.http.HttpServletRequest request)
Decodes the session ID from the URL represented by the passed request.
|
void |
dispatchAttributeEvent(int nEvent,
javax.servlet.ServletContextAttributeEvent evt)
Dispatch a wrapped event to the application listeners.
|
void |
dispatchInternalAttributeEvent(int nEvent,
javax.servlet.ServletContextAttributeEvent evt)
Dispatch a wrapped event to the application listeners.
|
void |
encodeCookie(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse res,
String sId,
boolean fNew)
Encode a session ID into a cookie and attach it to the response object.
|
String |
encodeUrl(String sUrl,
javax.servlet.http.HttpServletRequest request)
Encodes the specified URL by including the session ID in it, or, if
encoding is not needed, returns the URL unchanged.
|
protected String |
encodeUrl(String sUrl,
String sId)
Encodes the specified URL by including the given session ID in it.
|
protected void |
ensureCluster()
Ensure the coherence cluster.
|
protected NamedCache |
ensureConfigurationCache()
Get the NamedCache used to store configuration and management
information for the session management implementation if it exists,
otherwise create it.
|
javax.servlet.http.HttpSession |
ensureHttpSession(String sId)
Get the HttpSession object for the specified ID.
|
protected NamedCache |
ensureServletContextAttributeCache()
Get the clustered attribute map if it exists, otherwise create it
(if the ServletContext is supposed to be clustered).
|
TaskDaemon |
ensureSessionWorkerDaemon()
Get the daemon thread that is used for scheduled tasks, creating it
if necessary.
|
void |
enterSession(String sId)
Obtain any necessary ownership for the specified session.
|
void |
exitSession(String sId,
boolean fNew)
Release ownership for the specified session.
|
void |
filter(javax.servlet.Filter filter,
javax.servlet.ServletRequest req,
javax.servlet.ServletResponse resp,
javax.servlet.FilterChain chain)
Issue the service call to the specified servlet, given the passed
request and response objects.
|
void |
filterDestroyed()
Called by each Coherence Filter wrapper on destroy().
|
void |
filterInitialized()
Called by each Coherence Filter wrapper on init().
|
static String |
formatCacheName(NamedCache cache)
Format a NamedCache object into a human readable string.
|
static String |
formatListeners(Listeners listeners)
Format a Listeners object into a human readable string.
|
static String |
formatMapKeys(Map<?,?> map)
Format a map into a list of keys.
|
protected String |
getApplicationName()
Return the name of the web application.
|
NamedCache |
getCache(String sCacheName)
Obtain a session management cache by name.
|
static String |
getCacheConfigPath(javax.servlet.ServletContext servletContext,
ClassLoader appClassLoader)
Get the cache configuration path
|
XmlElement |
getConfig()
Determine the current configuration of the object.
|
ConfigurableCacheFactory |
getConfigurableCacheFactory()
Obtain the ConfigurableCacheFactory used by the SessionHelper.
|
NamedCache |
getConfigurationCache()
Get the NamedCache used to store configuration and management
information for the session management implementation.
|
protected com.tangosol.coherence.servlet.ConfigurationConsistencyVerifier |
getConfigurationConsistencyVerifier()
Get a ConfigurationConsistencyVerifier instance.
|
protected Listeners |
getContextAttributeListeners()
Get the application listeners that listen to servlet context attribute
events.
|
protected int |
getDaemonCheckCollectionModulo()
Determine how many times the daemon will perform its check before
checking the session models that the collection considers "local".
|
protected long |
getDaemonCycleMillis()
Determine the number of milliseconds per reap cycle.
|
protected int |
getDaemonPriority()
Determine the configured priority for the session reaper daemon.
|
protected String |
getDescription()
Returns a string representation of this object's attributes.
|
SessionHelperFactory |
getFactory()
Determine the factory to use to instantiate container-specific
implementations of the Servlet specification interfaces.
|
javax.servlet.http.HttpSession |
getHttpSession(javax.servlet.http.HttpServletRequest req)
Return the HttpSession associated with the given request.
|
javax.servlet.http.HttpSession |
getHttpSession(String sId)
Get the HttpSession object for the specified ID.
|
HttpSessionCollection |
getHttpSessionCollection()
Get the HttpSessionCollection object that manages the HttpSessionModel
objects.
|
javax.servlet.http.HttpSessionContext |
getHttpSessionContext()
Get the HttpSessionContext.
|
protected Map |
getHttpSessionMap()
Get the map of session ID to session object for HttpSession objects
managed in this application within this JVM/classloader.
|
InvocationService |
getInvocationService(String sService)
Obtain a session management invocation service by name.
|
Listeners |
getListeners()
Get the application listeners.
|
Set<String> |
getLocalSessionIds()
Gets session ids for all sessions that are in the local map, i.e. has
been accessed by this node.
|
protected String |
getMBeanObjectName()
Return a string representation of the ObjectName used to register the
MBean instance for this SessionHelper.
|
protected com.tangosol.coherence.servlet.SessionHelper.ReapTaskFactory |
getReapTaskFactory()
Getter for reap task factory.
|
protected Registry |
getRegistry()
Get the management registry from the CacheFactory
|
javax.servlet.ServletContext |
getServletContext()
Returns the Coherence ServletContext wrapper that this SessionHelper
is helping with.
|
NamedCache |
getServletContextAttributeCache()
Get the clustered attribute map.
|
int |
getServletContextMajorVersion()
Returns the major version of the Java Servlet API that this servlet
container supports.
|
int |
getServletContextMinorVersion()
Returns the minor version of the Servlet API that this servlet
container supports.
|
String |
getSessionIdAffinityToken()
Retrieve the session id affinity suffix token if one is defined.
|
String |
getSessionIdCookieDomain()
Determine the domain of the cookie for holding the session ID.
|
boolean |
getSessionIdCookieHttpOnly()
Determine if a web client will only send the session using the initial
http/https connection.
|
int |
getSessionIdCookieMaxAge()
Determine the max age (in seconds) of the cookie for holding the
session ID.
|
String |
getSessionIdCookieName()
Determine the name of the cookie for holding the session ID.
|
String |
getSessionIdCookiePath()
Determine the path of the cookie for holding the session ID.
|
boolean |
getSessionIdCookieSecure()
Determine if a web client will only send the session cookie over a SSL
connection.
|
String |
getSessionIdEncodingName()
Determine the name of the URL parameter for session ID encoding and
decoding.
|
protected SessionHelper.SessionReaperDaemon |
getSessionReaperDaemon()
Get the daemon thread that cleans up expired sessions.
|
String |
getSessionReapingMechanism()
Returns the session reaping mechanism that is used in the application.
|
protected TaskDaemon |
getSessionWorkerDaemon()
Get the daemon thread that is used for scheduled tasks.
|
protected long |
getShutdownDelayMillis()
Determine the number of milliseconds to defer shutdown after the app
appears to have stopped.
|
protected WorkManager |
getWorkManager()
Gets a WorkManager for use by the parallel reap task.
|
protected int |
getWorkManagerMaxThreads()
Returns the maximum number of threads used by the work manager.
|
protected int |
getWorkManagerMinThreads()
Returns the minimum number of threads used by the work manager.
|
com.tangosol.coherence.servlet.api24.HttpServletRequestWrapper |
getWrappedHttpServletReq()
Get the wrapped HttpServletRequest.
|
javax.servlet.ServletContext |
getWrappedServletContext()
Returns the application server's ServletContext that this
SessionHelper is helping with.
|
protected CoherenceHttpSessionCollection |
instantiateHttpSessionCollection()
Get the HttpSessionCollection object that manages the HttpSessionModel
objects.
|
protected Object |
instantiateMBean()
Factory Method: Instantiate a MBean implementation for this SessionHelper.
|
protected SessionHelper.SessionReaperDaemon |
instantiateSessionReaperDaemon()
Factory method: Instantiate a daemon thread that will clean up expired
sessions.
|
protected TaskDaemon |
instantiateSessionWorkerDaemon()
Factory method: Instantiate a daemon thread that will be used for
scheduled tasks.
|
protected boolean |
isAttributeNameIgnored(String sName)
Test to see if events for the specified name should be ignored.
|
protected boolean |
isClusterOwned()
Determine if the responsibility for shutting down the cluster is owned
by the application.
|
protected boolean |
isDaemonAssumeLocality()
Determine if the reaper daemon assumes that session data is stored only
on nodes that are running the session reaper daemon thread.
|
protected boolean |
isDaemonCheckCoordinated()
Determine if the reaper daemon coordinates the check across the
cluster instead of just doing its own "local" scan.
|
static boolean |
isReaperThread() |
boolean |
isServletContextClustered()
Determine if the context clusters attributes.
|
boolean |
isServletRequestWrapped(javax.servlet.ServletRequest req)
Test to see if the passed ServletRequest is wrapped, which means
that invoking a method on the passed ServletRequest object will
invoke the Coherence implementation, and will do so before the
container implementation is invoked.
|
boolean |
isSessionContextEnabled()
Determine if the session context should disobey the deprecation and
allow an application to enumerate sessions.
|
boolean |
isSessionIdCookie(javax.servlet.http.Cookie cookie)
Tests to see if the supplied cookie is a session ID cookie.
|
boolean |
isSessionIdCookieEnabled()
Determine if a cookie may be used to hold the session ID.
|
boolean |
isSessionIdEncodingEnabled()
Determine if URL encoding may be used to hold the session ID.
|
boolean |
isSessionIdReplaceAffinityToken()
If true, replace the session id affinity suffix token with the configured
affinity token for this server.
|
boolean |
isStrict()
Determine if the Servlet specification is being followed strictly.
|
static boolean |
isSyntheticSessionRemoveRequired() |
boolean |
isUseDefaultSessionIdDecoding()
Determine if the session ID decoding (from a URL) performed by the
application server's request object is sufficient.
|
boolean |
isUseDefaultSessionIdEncoding()
Determine if the session ID encoding (into a URL) performed by the
application server's response object is sufficient.
|
void |
killSession(String sId)
Forcibly destroy a session.
|
static void |
logEventException(RuntimeException e,
String sMethod,
boolean fContinue)
Log an event exception.
|
void |
logWarningIfRemoteDeleteMechanismConfigured()
Log the warning that session listener is being added even though the reaper mechanism used is RemoteDelete
|
void |
onGetHttpSession(javax.servlet.http.HttpServletRequest req)
Allow service helper to perform actions on getSession calls.
|
static boolean |
parseBoolean(javax.servlet.ServletContext ctx,
String sParam,
boolean fDefault)
Helper: Get a boolean init parameter from the context.
|
static int |
parseInt(javax.servlet.ServletContext ctx,
String sParam,
int nDefault)
Helper: Get an int init parameter from the context.
|
static String |
parseString(javax.servlet.ServletContext ctx,
String sParam,
String sDefault)
Helper: Get a String init parameter from the context.
|
void |
postService(RequestContext ctx)
Finish the request processing after the servlet/jsp is complete.
|
RequestContext |
preService(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res)
Wrap the passed request and response (if necessary) and build a request
context that contains all the pertinent information about the request.
|
protected void |
registerMBean()
Register an MBean instance for this SessionHelper.
|
void |
removeHttpSessionFromMap(String sId)
Remove the session object cached in the local session map.
|
void |
removeIgnoreAttributeName(String sName)
Unregister a name to ignore events for.
|
void |
requestAsyncOwnership(String sId)
Enter (obtain) and schedule an asynchronous call to exit (release) the
specified session ID.
|
void |
service(javax.servlet.Servlet servlet,
javax.servlet.ServletRequest req,
javax.servlet.ServletResponse resp)
Issue the service call to the specified servlet, given the passed
request and response objects.
|
void |
servletDestroyed()
Called by each Coherence Servlet wrapper on destroy().
|
void |
servletInitialized()
Called by each Coherence Servlet wrapper on init().
|
void |
setConfig(XmlElement xml)
Specify the configuration for the object.
|
void |
setConfigurableCacheFactory(ConfigurableCacheFactory cacheFactory)
Sets the global cache factory instance used by Coherence*Web.
|
void |
setHttpSession(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpSession session)
Associate the supplied HttpSession with the given request.
|
static void |
setIsReaperThread(boolean isReaperThread) |
void |
setListeners(Listeners listeners)
Store the application listeners.
|
protected void |
setSessionWorkerDaemon(TaskDaemon daemon)
Set the daemon thread that is used for scheduled tasks.
|
void |
setWrappedHttpServletReq(com.tangosol.coherence.servlet.api24.HttpServletRequestWrapper req)
Set the wrapped HttpServletRequest.
|
protected void |
shutdown()
Shuts down the SessionHelper and any mess that it created.
|
protected void |
shutdownConfigurationCache()
Shutdown the NamedCache used to store configuration and management
information for the session management implementation.
|
void |
shutdownHttpSessionCollection()
Shutdown the http session collection.
|
protected void |
shutdownServletContextAttributeCache()
Shutdown the clustered attribute map.
|
protected void |
shutdownSessionHelper() |
protected void |
shutdownSessionHelperCaches(SessionHelper helper) |
void |
shutdownSessionReaperDaemon()
Stop the daemon thread that is used for expiring sessions.
|
void |
shutdownSessionWorkerDaemon()
Stop the daemon thread that is used for scheduled tasks.
|
String |
toString()
Returns a string representation of the object.
|
protected void |
unregisterMBean()
Unregister the MBean instance for this SessionHelper.
|
static void |
unsetIsReaperThread() |
javax.servlet.FilterConfig |
unwrapFilterConfig(javax.servlet.FilterConfig cfg)
Attempt to unwrap the passed FilterConfig wrapper to get the
container's FilterConfig object back.
|
javax.servlet.ServletConfig |
unwrapServletConfig(javax.servlet.ServletConfig cfg)
Attempt to unwrap the passed ServletConfig wrapper to get the
container's ServletConfig object back.
|
javax.servlet.ServletRequest |
unwrapServletRequest(javax.servlet.ServletRequest req)
Fully unwrap the specified request object.
|
String |
updateSessionId(String sId,
String sNewId)
Updates the session model id to a new session id.
|
javax.servlet.FilterConfig |
wrapFilterConfig(javax.servlet.FilterConfig cfg)
Given the specified FilterConfig object, return a wrapper to use.
|
javax.servlet.ServletConfig |
wrapServletConfig(javax.servlet.ServletConfig cfg)
Given the specified servlet config object, return a wrapper to use.
|
javax.servlet.ServletRequest |
wrapServletRequest(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res)
Given the specified request, create a request wrapper.
|
azzert, azzert, azzert, azzertFailed, breakLines, breakLines, capitalize, checkNotEmpty, checkNotNull, checkRange, computeSafeWaitTime, decimalValue, dup, dup, ensureBigDecimal, ensureClassLoader, ensureRuntimeException, ensureRuntimeException, equals, equalsDeep, err, err, err, err, err, escape, formatDateTime, getCallerStackFrame, getCommonMonitor, getCommonMonitor, getCommonMonitor, getContextClassLoader, getContextClassLoader, getDeepMessage, getErr, getLastSafeTimeMillis, getLog, getMaxDecDigits, getMaxHexDigits, getOriginalException, getOut, getProcessRandom, getRandom, getRandomBinary, getRandomBinary, getRandomString, getSafeTimeMillis, getStackFrame, getStackFrames, getStackTrace, getStackTrace, getStackTrace, getThreadFactory, getTimeZone, getUpTimeMillis, hashCode, hexValue, indentString, indentString, isDecimal, isHex, isLogEcho, isOctal, log, log, log, log, log, makeInteger, makeLong, makeThread, mergeArray, mergeBooleanArray, mergeByteArray, mergeCharArray, mergeDoubleArray, mergeFloatArray, mergeIntArray, mergeLongArray, mod, mod, octalValue, out, out, out, out, out, pad, parseBandwidth, parseBandwidth, parseDelimitedString, parseHex, parseHex, parseMemorySize, parseMemorySize, parsePercentage, parseTime, parseTime, parseTimeNanos, parseTimeNanos, printStackTrace, randomize, randomize, randomize, randomize, read, read, read, read, read, read, read, replace, setErr, setLog, setLogEcho, setOut, sleep, toBandwidthString, toBandwidthString, toCharEscape, toCrc, toCrc, toCrc, toCrc, toCrc, toDecString, toDelimitedString, toDelimitedString, toDelimitedString, toDelimitedString, toHex, toHex, toHexDump, toHexEscape, toHexEscape, toHexEscape, toHexEscape, toHexString, toMemorySizeString, toMemorySizeString, toQuotedCharEscape, toQuotedStringEscape, toSqlString, toString, toString, toStringEscape, toUnicodeEscape, trace, trace, trace, trace, trace, trace, trace, trace, trace, truncateString, truncateString, wait
public static final String PRODUCT_BANNER
public static final String CACHE_CONFIGURATION_PATH
public static final String DEFAULT_CACHE_CONFIGURATION_PATH
public static final int EVT_ADDED
public static final String SESSION_AFFINITY_SUFFIX_STRIPPED
public static final int EVT_REMOVED
public static final int EVT_REPLACED
public static final String CTX_INIT_CONFIGURATION_CONSISTENCY
public static final String CTX_INIT_APPLICATION_NAME
public static final String CTX_INIT_FACTORY
public static final String CTX_INIT_COLLECTION
public static final String CTX_INIT_CLUSTER_OWNED
public static final String CTX_INIT_CLUSTER
public static final String CTX_INIT_CACHENAME_CONTEXT
public static final String CTX_INIT_LISTENS
public static final String CTX_INIT_SESSIONCONTEXT_ENABLED
public static final String CTX_INIT_SESSION_RETAIN_MILLIS
public static final String CTX_INIT_COOKIES_ENABLED
public static final String CTX_INIT_COOKIE_NAME
public static final String CTX_INIT_COOKIE_DOMAIN
public static final String CTX_INIT_COOKIE_PATH
public static final String CTX_INIT_COOKIE_MAX_AGE
public static final String CTX_INIT_COOKIE_SECURE
public static final String CTX_INIT_COOKIE_HTTPONLY
public static final String CTX_INIT_URLENCODE_ENABLED
public static final String CTX_INIT_URLENCODE_NAME
public static final String CTX_INIT_URLDECODE_DEFAULT
public static final String CTX_INIT_URLENCODE_DEFAULT
public static final String CTX_INIT_DAEMON_PRIORITY
public static final String CTX_INIT_DAEMON_CYCLE_SECS
public static final String CTX_INIT_DAEMON_COORDINATED
public static final String CTX_INIT_DAEMON_ASSUME_LOCALITY
public static final String CTX_INIT_DAEMON_SWEEP_MODULO
public static final String CTX_INIT_DAEMON_PARALLEL
public static final String CTX_INIT_DAEMON_MIN_THREADS
public static final String CTX_INIT_DAEMON_MAX_THREADS
public static final String CTX_INIT_DAEMON_QUEUE_SIZE
public static final String CTX_INIT_LOGGER_LEVEL
public static final String CTX_INIT_CACHENAME_MANAGEMENT
public static final String CTX_INIT_CACHENAME_SESSIONS
public static final String CTX_INIT_CACHENAME_OVERFLOW
public static final String CTX_INIT_CACHENAME_LOCAL_SESSIONS
public static final String CTX_INIT_CACHENAME_LOCAL_ATTRIBUTES
public static final String CTX_INIT_SESSION_EXPIRE_SECS
public static final String CTX_INIT_SESSION_ID_LENGTH
public static final String CTX_INIT_SESSION_ID_GENERATOR_CLASS
public static final String CTX_INIT_CACHE_DELEGATOR_CLASS
public static final String CTX_INIT_SESSION_LOG_INVALIDATION_EXCEPTIONS
public static final String CTX_INIT_ATTR_OVERFLOW_THRESHOLD
public static final String CTX_INIT_SESSION_LOCK
public static final String CTX_INIT_SESSION_MEMBER_LOCK
public static final String CTX_INIT_SESSION_APP_LOCK
public static final String CTX_INIT_SESSION_THREAD_LOCK
public static final String CTX_INIT_SESSION_GET_LOCK_TIMEOUT
public static final String CTX_INIT_SESSION_AFFINITY_TOKEN
public static final String CTX_INIT_SESSION_REPLACE_AFFINITY_TOKEN
public static final String CTX_INIT_SESSION_LOCKING_MODE
public static final String CTX_INIT_SESSION_LOCKING_MODE_APP
public static final String CTX_INIT_SESSION_LOCKING_MODE_MEMBER
public static final String CTX_INIT_SESSION_LOCKING_MODE_NONE
public static final String CTX_INIT_SESSION_LOCKING_MODE_OPTIMISTIC
public static final String CTX_INIT_SESSION_LOCKING_MODE_THREAD
public static final String CTX_INIT_LOG_THREADS_HOLDING_LOCK
public static final String CTX_INIT_SESSION_STRICT_SPEC
public static final String CTX_INIT_SESSION_LAZY_ACCESS
public static final String CTX_INIT_SHUTDOWN_DELAY_SECS
public static final String CTX_INIT_SERVLET
This is used in a web-xml
<servlet>
element to designate the application servlet name that the Coherence
implementation is being wrapped around; this must be done for each
application servlet.
Before:
<servlet>
<servlet-name>MyServlet</servlet-name>
<display-name>MyServlet</display-name>
<description>this servlet is part of my app</description>
<servlet-class>com.mypkg.MyServlet</servlet-class>
<init-param>
<param-name>ContextPath</param-name>
<param-value>/tomcat</param-value>
</init-param>
</servlet>
After:
<servlet>
<servlet-name>MyServlet</servlet-name>
<display-name>MyServlet</display-name>
<description>this servlet is part of my app</description>
<servlet-class>com.tangosol.coherence.servlet.api22.HttpServletWrapper</servlet-class>
<init-param>
<param-name>ContextPath</param-name>
<param-value>/tomcat</param-value>
</init-param>
<init-param>
<param-name>coherence-servlet-class</param-name>
<param-value>com.mypkg.MyServlet</param-value>
</init-param>
</servlet>
public static final String CTX_INIT_FILTER
This is used in a web-xml
<filter>
element to designate the application filter name that the Coherence
implementation is being wrapped around; this must be done for each
application filter.public static final String CTX_INIT_DIST_CONTROLLER_CLASS
public static final String CTX_INIT_SCOPE_CONTROLLER_CLASS
public static final String CTX_INIT_SESSION_STICKY
public static final String CTX_INIT_SERVICENAME_OWNERSHIP
public static final String CTX_INIT_ALLOW_LOCAL_ATTRIBUTES
public static final String CTX_INIT_ENABLE_SUSPECT_ATTRIBUTES
public static final String CTX_INIT_ENABLE_ATTR_LISTENER_OPTIMIZATION
protected static final String CTX_INIT_APPLICATION_NAME_GENERATED
protected static final String CTX_INIT_SESSION_EXPIRY_FILTER_FACTORY
public static final String CTX_INIT_ENABLE_SESSION_ACCESS_DEBUG_LOGGING
public static final String CTX_INIT_SESSION_ACCESS_DEBUG_LOGGING_FILTER
public static final String CTX_INIT_CACHE_CONFIGURATION_PATH
public static final String CTX_INIT_SESSION_CACHE_FEDERATED
public static final String CTX_INIT_SESSION_REAPING_MECHANISM
public static final String CTX_ATTR_CONTEXT
Also, the name of the request attribute used to store the request context.
public static final String REQ_ATTR_COUNT
public static final String REQ_ATTR_SESSION
public static final String REQ_ATTR_TEST
public static final String DEFAULT_CTXNAME
public static final String DEFAULT_MGTNAME
public static final String CFG_KEY_REAPER
public static final String DEFAULT_FEDERATED_CACHE_CONFIGURATION_PATH
public static final String REMOTE_DELETE_REAPING_MECHANISM
public static final String DEFAULT_REAPING_MECHANISM
public static final Filter NAME_FILTER
protected ConfigurableCacheFactory m_cachefactory
public static List s_collections
public static final ThreadLocal<Boolean> s_tloReaperFlag
public SessionHelper(SessionHelperFactory factory, javax.servlet.ServletContext ctx)
factory
- the object that will instantiate the container-specific
(or servlet spec specific) implementationsctx
- the application server's ServletContext objectprotected void configure()
protected void shutdownSessionHelper()
protected void shutdownSessionHelperCaches(SessionHelper helper)
protected void configureLogger()
protected void ensureCluster()
protected void checkConfigConsistency(com.tangosol.coherence.servlet.ValidatingConfiguration configuration)
configuration
- the validating configurationIllegalStateException
- if configuration is inconsistentprotected com.tangosol.coherence.servlet.ConfigurationConsistencyVerifier getConfigurationConsistencyVerifier()
public void clearStoredConfiguration()
public XmlElement getConfig()
public void setConfig(XmlElement xml)
xml
- the XML configuration for the objectIllegalStateException
- if the object is not in a state that
allows the configuration to be set; for example, if the
object has already been configured and cannot be reconfiguredpublic void setConfigurableCacheFactory(ConfigurableCacheFactory cacheFactory)
cacheFactory
- the configurable cache factorypublic ConfigurableCacheFactory getConfigurableCacheFactory()
public static String getCacheConfigPath(javax.servlet.ServletContext servletContext, ClassLoader appClassLoader)
servletContext
- the servlet contextappClassLoader
- the application classloaderpublic NamedCache getCache(String sCacheName)
sCacheName
- the name of the cache to obtainpublic InvocationService getInvocationService(String sService)
sService
- the name of the invocation service to obtainprotected String getApplicationName()
protected String getMBeanObjectName()
protected Object instantiateMBean()
protected void registerMBean()
protected void unregisterMBean()
protected Registry getRegistry()
public void contextInitialized()
public com.tangosol.coherence.servlet.api24.HttpServletRequestWrapper getWrappedHttpServletReq()
public void setWrappedHttpServletReq(com.tangosol.coherence.servlet.api24.HttpServletRequestWrapper req)
req
- the wrapped HttpServletRequest to set topublic void contextDestroyed()
public void servletInitialized()
public void servletDestroyed()
public void filterInitialized()
public void filterDestroyed()
protected void shutdown()
protected boolean isClusterOwned()
protected long getShutdownDelayMillis()
public javax.servlet.ServletContext getServletContext()
public NamedCache getServletContextAttributeCache()
protected NamedCache ensureServletContextAttributeCache()
protected void shutdownServletContextAttributeCache()
public int getServletContextMajorVersion()
public int getServletContextMinorVersion()
public javax.servlet.ServletContext getWrappedServletContext()
public boolean isServletContextClustered()
public boolean isStrict()
public static String parseString(javax.servlet.ServletContext ctx, String sParam, String sDefault)
ctx
- the ServletContextsParam
- the init parameter namesDefault
- the default to return if the init parameter is not
present or is blankpublic static boolean parseBoolean(javax.servlet.ServletContext ctx, String sParam, boolean fDefault)
ctx
- the ServletContextsParam
- the init parameter namefDefault
- the default to return if the init parameter is not
present or is not a boolean valuepublic static int parseInt(javax.servlet.ServletContext ctx, String sParam, int nDefault)
ctx
- the ServletContextsParam
- the init parameter namenDefault
- the default to return if the init parameter is not
present or is not an int valuepublic Listeners getListeners()
public void setListeners(Listeners listeners)
listeners
- a Listeners object containing all EventListener
objects for the applicationprotected Listeners getContextAttributeListeners()
public void addIgnoreAttributeName(String sName)
sName
- the name to ignore events forpublic void removeIgnoreAttributeName(String sName)
sName
- the name to no longer ignore events forprotected boolean isAttributeNameIgnored(String sName)
sName
- the name to test whether events are being ignored fortrue
if events for the specified name should be ignoredpublic void dispatchAttributeEvent(int nEvent, javax.servlet.ServletContextAttributeEvent evt)
nEvent
- the internal enum that identifies the event nameevt
- the application server's ServletContextAttributeEventpublic void dispatchInternalAttributeEvent(int nEvent, javax.servlet.ServletContextAttributeEvent evt)
nEvent
- the internal enum that identifies the event nameevt
- the application server's ServletContextAttributeEventpublic javax.servlet.FilterConfig wrapFilterConfig(javax.servlet.FilterConfig cfg)
cfg
- the container's FilterConfig objectpublic javax.servlet.FilterConfig unwrapFilterConfig(javax.servlet.FilterConfig cfg)
cfg
- the FilterConfigpublic void filter(javax.servlet.Filter filter, javax.servlet.ServletRequest req, javax.servlet.ServletResponse resp, javax.servlet.FilterChain chain) throws javax.servlet.ServletException, IOException
filter
- the application's filter to invokereq
- the ServletRequest
object that contains
the client's requestresp
- the ServletResponse
object that contains
the servlet's responsechain
- the FilterChain to use to invoke the next filter or the
Servletjavax.servlet.ServletException
- if servlet error occursIOException
- if I/O error occurspublic javax.servlet.ServletConfig wrapServletConfig(javax.servlet.ServletConfig cfg)
cfg
- the container's servlet config objectpublic javax.servlet.ServletConfig unwrapServletConfig(javax.servlet.ServletConfig cfg)
cfg
- the ServletConfigpublic boolean isServletRequestWrapped(javax.servlet.ServletRequest req)
req
- a ServletRequest objectpublic javax.servlet.ServletRequest wrapServletRequest(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res)
req
- a ServletRequest object that might need wrappingres
- the associated ServletResponsepublic javax.servlet.ServletRequest unwrapServletRequest(javax.servlet.ServletRequest req)
req
- a ServletRequest objectpublic String decodeCookie(javax.servlet.http.HttpServletRequest req)
req
- an HttpServletRequest object that may have a session cookie
attached to itpublic void encodeCookie(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res, String sId, boolean fNew)
req
- the HttpServletRequest object for the current requestres
- the HttpServletResponse object for the current request
that the session cookie should be attached tosId
- the session IDfNew
- true if the session was just createdpublic boolean isSessionIdCookie(javax.servlet.http.Cookie cookie)
cookie
- the cookie to testpublic RequestContext createRequestContext(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res)
req
- a ServletRequest object that might need wrapping or might
have already been wrappedres
- a ServletResponse object that might need wrapping or might
have already been wrappedprotected com.tangosol.coherence.servlet.ServiceHelper createServiceHelper()
public RequestContext preService(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res) throws javax.servlet.ServletException, IOException
req
- the servlet response object (could already be wrapped)res
- the servlet response object (could already be wrapped)javax.servlet.ServletException
- if servlet error occursIOException
- if I/O error occurspublic void postService(RequestContext ctx) throws javax.servlet.ServletException, IOException
ctx
- the request context returned by
preService()
javax.servlet.ServletException
- if servlet error occursIOException
- if I/O error occurspublic void service(javax.servlet.Servlet servlet, javax.servlet.ServletRequest req, javax.servlet.ServletResponse resp) throws javax.servlet.ServletException, IOException
servlet
- the servlet to invokereq
- a ServletRequest object that might need wrapping or
might have already been wrappedresp
- might a ServletResponse object that might need wrapping or
have already been wrappedjavax.servlet.ServletException
- if servlet error occursIOException
- if I/O error occursprotected CoherenceHttpSessionCollection instantiateHttpSessionCollection()
public HttpSessionCollection getHttpSessionCollection()
protected Map getHttpSessionMap()
public void removeHttpSessionFromMap(String sId)
sId
- the session idpublic Set<String> getLocalSessionIds()
public javax.servlet.http.HttpSession createHttpSession()
public javax.servlet.http.HttpSession getHttpSession(String sId)
sId
- the session IDpublic javax.servlet.http.HttpSession ensureHttpSession(String sId)
sId
- the session IDpublic String updateSessionId(String sId, String sNewId)
sId
- the session idsNewId
- the new session idpublic javax.servlet.http.HttpSession getHttpSession(javax.servlet.http.HttpServletRequest req)
req
- the requestpublic void onGetHttpSession(javax.servlet.http.HttpServletRequest req)
HttpServletRequest.getSession(boolean)
method.req
- the requestpublic void setHttpSession(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpSession session)
req
- the requestsession
- the session to associate with the given requestpublic boolean isSessionContextEnabled()
public javax.servlet.http.HttpSessionContext getHttpSessionContext()
public boolean isSessionIdCookieEnabled()
public String getSessionIdCookieName()
public String getSessionIdCookieDomain()
public String getSessionIdCookiePath()
public int getSessionIdCookieMaxAge()
public boolean getSessionIdCookieSecure()
public boolean getSessionIdCookieHttpOnly()
public boolean isSessionIdEncodingEnabled()
public String getSessionIdEncodingName()
public boolean isUseDefaultSessionIdDecoding()
public boolean isUseDefaultSessionIdEncoding()
public String getSessionIdAffinityToken()
public boolean isSessionIdReplaceAffinityToken()
public String decodeUrl(javax.servlet.http.HttpServletRequest request)
request
- the current HttpServletRequestpublic String encodeUrl(String sUrl, javax.servlet.http.HttpServletRequest request)
sUrl
- the URL to be encodedrequest
- the current HttpServletRequestprotected String encodeUrl(String sUrl, String sId)
sUrl
- the URL to be encodedsId
- the session ID to encode in the URLpublic void enterSession(String sId)
If the session specified by the session ID does not exist, then this method has no effect; no exception is thrown.
sId
- the session idpublic void exitSession(String sId, boolean fNew)
enterSession(sId)
,
with the only exceptions being:
enterSession(sId)
method was never invoked.If the session specified by the session ID does not exist, then this method has no effect; no exception is thrown.
sId
- the session idfNew
- true if the session was just createdpublic void requestAsyncOwnership(String sId)
sId
- the session ID to async enter and exitpublic void shutdownHttpSessionCollection()
public String toString()
public NamedCache getConfigurationCache()
protected NamedCache ensureConfigurationCache()
protected void shutdownConfigurationCache()
protected String getDescription()
public SessionHelperFactory getFactory()
protected SessionHelper.SessionReaperDaemon instantiateSessionReaperDaemon()
protected SessionHelper.SessionReaperDaemon getSessionReaperDaemon()
protected int getDaemonPriority()
protected long getDaemonCycleMillis()
protected int getDaemonCheckCollectionModulo()
protected boolean isDaemonCheckCoordinated()
protected boolean isDaemonAssumeLocality()
protected int getWorkManagerMinThreads()
protected int getWorkManagerMaxThreads()
protected WorkManager getWorkManager()
protected com.tangosol.coherence.servlet.SessionHelper.ReapTaskFactory getReapTaskFactory()
public String getSessionReapingMechanism()
public void logWarningIfRemoteDeleteMechanismConfigured()
protected void cleanUpSession(String sessionId)
sessionId
- the sessionId to be removedprotected void checkForDeadSessions()
public void killSession(String sId)
sId
- the session ID to destroypublic void shutdownSessionReaperDaemon()
protected TaskDaemon instantiateSessionWorkerDaemon()
protected TaskDaemon getSessionWorkerDaemon()
protected void setSessionWorkerDaemon(TaskDaemon daemon)
daemon
- the session worker daemonpublic TaskDaemon ensureSessionWorkerDaemon()
public void shutdownSessionWorkerDaemon()
public static String formatListeners(Listeners listeners)
listeners
- a Listeners objectpublic static String formatCacheName(NamedCache cache)
cache
- a NamedCache objectpublic static String formatMapKeys(Map<?,?> map)
map
- a Map objectpublic static void logEventException(RuntimeException e, String sMethod, boolean fContinue)
e
- the exceptionsMethod
- the event method name etc.fContinue
- true if the execution will be continued;
false if the exception has to be logged and re-thrownpublic static void setIsReaperThread(boolean isReaperThread)
public static void unsetIsReaperThread()
public static boolean isReaperThread()
public static boolean isSyntheticSessionRemoveRequired()