CACHENAME_DEATHCERTSDeprecated. The name of the clustered cache that stores the IDs of "recently departed" sessions.

static java.lang.String

CACHENAME_LOCAL_ATTRIBUTESDeprecated. The name of the local cache that stores the session attributes that are not distributed (if there is a distribution controller or attributes are allowed to become local when serialization fails).

static java.lang.String

CACHENAME_LOCAL_SESSIONSDeprecated. The name of the local cache that stores the sessions that are not yet distributed (if there is a distribution controller).

create(javax.servlet.http.HttpSession session, java.lang.String sId, boolean fCheckDeathCert)Deprecated. This method attempts to create a new session with a specific ID, returning the session model for the new session.

getAppControlCache()Deprecated. Get the cache used to control concurrent access to a session by multiple applications, if application locking is used.

int

getAverageModelLifetime()Deprecated. Calculate the average lifetime (in seconds) of session model objects invalidated (either due to expiration or to an explicit invalidation) since the last time statistics were reset.

int

getAverageModelSize()Deprecated. Calculate the average size (in bytes) of session model objects placed in the session storage clustered cache since the last time statistics were reset.

isAppLockingEnforced()Deprecated. Determine whether or not two or more applications should be prevented from accessing the same session simultaneously.

protected boolean

isAssumeLocality()Deprecated. Determine if it can be assumed that each existent session is managed on a server that is doing reaping, and thus each server can reap only the sessions that are managed on it.

isExistent(java.lang.String sId)Deprecated. Determine if the specified session ID identifies a session that exists.

protected boolean

isMemberLockingEnforced()Deprecated. Determine whether or not two or more JVMs should be prevented from accessing the same session simultaneously.

boolean

isOwned(java.lang.String sId)Deprecated. Determine if the specified session ID identifies a session that exists and that this thread has ownership for, either by a call to enter(sId) or create() without a corresponding call to exit(sId).

boolean

isOwnershipSticky()Deprecated. Determine if the sticky session ownership option is on.

isStrict()Deprecated. Determine if the Servlet specification is being followed strictly.

protected boolean

isStuck(java.lang.String sId)Deprecated. Determine if the specified session is stuck.

protected boolean

isThreadLockingEnforced()Deprecated. Determine whether a session should be single threaded (only one request per session accessing the session at a time) or multithreaded (any number of requests accessing the session at a time).

onModelUpdate(int cb)Deprecated. Notify the session collection that a model of the specified size (in bytes) was updated in the session storage clustered cache.

void

passivate(java.lang.String sId)Deprecated. Move the session into a passive state, if it is not already.

void

postCreate(javax.servlet.http.HttpSession session)Deprecated. This method is called at the end of the session creation process.

protected static void

putBlind(java.util.Map map, java.lang.Object oKey, java.lang.Object oValue)Deprecated. Puts the specified key/value pair into the specified map using the putAll() method, which does not return the previous value and thus may be more efficient in a distributed environment.

removeBlind(java.util.Map map, java.lang.Object oKey)Deprecated. Removes the specified key/value pair from the specified map using the keySet().remove() method, which does not return the previous value and thus may be more efficient in a distributed environment.

void

removeHttpSessionAttributeListener(javax.servlet.http.HttpSessionAttributeListener listener)Deprecated. Sign off the specified listener so it no longer will receive HttpSessionBindingEvent objects.

void

removeHttpSessionListener(javax.servlet.http.HttpSessionListener listener)Deprecated. Sign off the specified listener so it no longer will receive HttpSessionEvent objects.

void

resetStatistics()Deprecated. Reset all statistics maintained by this session collection.

AbstractHttpSessionCollection

getCollection

Obtain the AbstractHttpSessionCollection that is being used in the current application. Because this class must be included as part of the application deployment, the singleton pattern should be applicable.

isExistent

public boolean isExistent(java.lang.String sId)

Deprecated.

Determine if the specified session ID identifies a session that exists.

The notion of ownership will affect whether or not the answer can be trusted once the method has returned it. If the ownership state is owned (the current thread called enter(sId)), then the caller should assume that session still exists. Otherwise, the caller can only assume that the session did exist at the point in time that the call to this method was made.

registerSessionInvalidationWithDeathCertCache

enter

public boolean enter(java.lang.String sId,
boolean fWait)

Deprecated.

Obtain any necessary ownership for the specified session. Ownership requirements are expected to be declarative, so this method may be a no-op, or it may involve thread-level, application-level, or even cluster-wide locking.

If the session specified by the session ID does not exist, then this method has no effect; no exception is thrown.

This method must support Multiple Possession Semantics, meaning that this method may be invoked multiple times, and each invocation will require a corresponding call to the exit(sId) method in order to release the ownership.

enter

Obtain any necessary ownership for the specified session. Ownership requirements are expected to be declarative, so this method may be a no-op, or it may involve thread-level, application-level, or even cluster-wide locking.

If the session specified by the session ID does not exist, then this method has no effect; no exception is thrown.

This method must support Multiple Possession Semantics, meaning that this method may be invoked multiple times, and each invocation will require a corresponding call to the exit(sId) method in order to release the ownership.

isOwned

public boolean isOwned(java.lang.String sId)

Deprecated.

Determine if the specified session ID identifies a session that exists and that this thread has ownership for, either by a call to enter(sId) or create() without a corresponding call to exit(sId). NOTE! Since an asynchronous exit task could have been scheduled by SessionHelper.requestAsyncOwnership(String), this method should not be used to determine if exit should be called or not.

fFlush - pass true if the session has been potentially modified; even then, there's no guarantee that the session state will be flushed if there is another thread that is using the session concurrently. In this case, the last exiting thread will flush

fFlush - pass true if the session has been potentially modified; even then, there's no guarantee that the session state will be flushed if there is another thread that is using the session concurrently. In this case, the last exiting thread will flush

activate

Move the session into an active state, if it is not already. The active state is defined as the state in which the session is considered to be "live" in a particular JVM. This primarily relates to the optional event interfce (HttpSessionActivationListener) that session attributes can implement to find out when the session is passivated and activated.

Invoking this method will issue activation events for session attributes that implement the HttpSessionActivationListener interface. The model will retain the reference to the HttpSession object until it is passivated or destroyed.

iteratePotentiallyExpiredIds

Obtain an iterator of the session IDs that this JVM is responsible for invalidating when the sessions for those IDs have timed out.

This may return an iterator with the same contents as the one returned by the HttpSessionCollection.iterateIds() method, or it may return an iterator that iterates over a subset of those contents.

The list of IDs is completely dynamic because of the nature of multi-threaded and distributed systems. The fact that an ID is returned from an iterator is no guarantee that the ID is still valid, or that it has expired.

listener - the HttpSessionAttributeListener that was previously signed up for events

shutdown

public void shutdown()

Deprecated.

Notify the session collection that it is being shut down. After this method invocation has been made, the session collection may throw IllegalStateException for any subsequent method invocation made to it.

If this is set to false, then concurrent access is permitted and the last update wins.

Returns:

true if concurrent access to a session is limited.

isMemberLockingEnforced

protected boolean isMemberLockingEnforced()

Deprecated.

Determine whether or not two or more JVMs should be prevented from accessing the same session simultaneously.

Returns:

true to limit the access to a session to one JVM at a time

isAppLockingEnforced

protected boolean isAppLockingEnforced()

Deprecated.

Determine whether or not two or more applications should be prevented from accessing the same session simultaneously.

Note that application-level locking requires that member-level session locking is enabled. In other words, if this method returns true, the value of isMemberLockingEnforced() will also be true.

Returns:

true to limit the access to a session to one application at a time

isThreadLockingEnforced

protected boolean isThreadLockingEnforced()

Deprecated.

Determine whether a session should be single threaded (only one request per session accessing the session at a time) or multithreaded (any number of requests accessing the session at a time).

Note that a single threaded session requires that both member-level and application-level session locking are enabled. In other words, if this method returns true, the value of isMemberLockingEnforced() and isAppLockingEnforced() will also be true.

Returns:

true to limit the access to a session to one thread at a time

getCurrentTime

protected long getCurrentTime()

Deprecated.

Determine the current time value in milliseconds.

Returns:

the current time value in milliseconds

isEnabledSessionAccessDebugLogging

protected boolean isEnabledSessionAccessDebugLogging()

Deprecated.

Determine if Session Access Debug Logging is Enabled

Returns:

true if coherence-enable-session-access-debug-logging=true in application web.xml

create

This method attempts to create a new session with a specific ID, returning the session model for the new session. If a session with the specified ID already exists in the collection, this method will return null.

The session is created with the default timeout.

When the session model is returned, the session state is exists, owned, active. Note that the responsibilities associated with the enter() method are included as part of the session creation process.

The model will retain the reference to the HttpSession object until it is passivated or destroyed.

Parameters:

session - the HttpSession object to bind the session model to; used for issuing events; must not be null

sId - the session id

fCheckDeathCert - true, if the death cert cache should be checked to verify that the session id has not been used recently

getAppControlCache

Get the cache used to control concurrent access to a session by multiple applications, if application locking is used.

Returns:

a cache mapping from session id to application ownership information (an object array of size two, with the first element being the owning HttpSessionCollection and the second element being an Integer reference count)

getOwnedCache

Get the cache of owned ("locally live") session models. The concept of "locally live" is internal to this collection implementation, and is not part of the collection/model design itself. A model is considered "locally live" if it is existent and has been entered, until the point that it is fully exited or destroyed.

Returns:

a cache of owned session models; the cache maps from session ID to HttpSessionModel objects

obtainAppOwnership

This method assumes that the owned cache is locked for the passed session ID.

Parameters:

sId - the ID of the session to obtain ownership for

fWait - true to wait for the session to become available, false to give up immediately if ownership of the session is currently unavailable

Returns:

true on successfully obtaining ownership, false otherwise

releaseAppOwnership

protected void releaseAppOwnership(java.lang.String sId)

Deprecated.

Release application ownership of the specified session.

This method assumes that the owned cache is locked and cluster ownership has been obtained for the passed session ID.

Parameters:

sId - the ID of the session to release ownership of

obtainThreadOwnership

protected boolean obtainThreadOwnership(java.lang.String sId)

Deprecated.

Obtain thread ownership of the specified session, if necessary.

If thread locking is enforced this method has no effect and false is returned; otherwise, the given ID is locked in the local owned cache and true is returned. A return value of true implies that releaseThreadOwnership(sId) must be called when exclusive access to the session is no longer required.