SessionManager
is used to obtain session information This can be implemented using persistent storage mechanisms or using transient storage Even if it is implemented using persistent storage the implementation should take care of backing by a cache which will avoid the overhead of serialization and database operations Additionally the SessionManager
is responsible for managing the life cycle events for the sessions. It exposes methods to create and terminate the session Periodically the SessionManager
will check for sessions who have been inactive for a predefined amount of time and then will terminate those sessions
@author Bhakti Mehta
@author Mike Grogan
SessionManager
from Bootstrap.sessionManager()
SessionManager.startListening()
SessionManager.launch()
. If you want to launch the Flash Player and then have the API connect to it, then launch the Flash Player and then call SessionManager.accept()
. Note: launch()
and accept()
are both blocking calls, so you probably don't want to call them from your main UI thread. SessionManager.stopListening()
. Transactions are a series of get/set calls to a sessuib context which must be seen as atomic (single modification). We distingish between reading and writing. Usually parallel reading is allowed but if one thread wants to write, no other can read or write. @author Carsten Ziegeler @version CVS $Id: SessionManager.java,v 1.1 2003/03/09 00:06:08 pier Exp $
A local SessionManager works collaboratively with remote SessionManagers to manage Session instances. A local SessionMananger along with its associated remote SessionManagers are a single space where Session instances live. In this space, each Session is ensured to have a unique sessionId. This contract is enforced during creation of a Session instance by a local SessionManager. A Session in this space is preemptively migrated from one local SessionManager to another. The interposition of a ClusteredInvocation between a Client and the Session he wants to access ensures that at any point in time a Session is uniquely instantiated once cluster wide. Clients can receive migration callbacks via the registration of SessionListener. @version $Rev$ $Date$
SessionManager
maintains in-memory storage of sessions, creates new ones and either destroys or stores existing ones persistently. All sessions are managed via unique identifiers of the org.semanticweb.owlapi.model.IRI
type.Purpose: Global session location.
Description: This allows for a global session local which can be accessed globally from other classes. This is needed for EJB data stores as they must have a globally accessible place to access the session. This can be by EJB session beans, BMP beans and CMP beans as well as Servlets and other three-tier services.
Responsibilities:
Because this is a very security-sensitive class, any public method requires the caller to have the {@link AllowEjbAccessPermission} as any other calls to the EJB layer. This is so that themalicious users can't trick the EJB layer into thinking that some users are logged in or log out other users.
Also, for security reasons, this class is final so that malicious code can't subclass it and modify its behavior.
This object is a {@link #getInstance() singleton}.
SessionManager
object is used to create sessions that are active for a given time period. Each session is referenced using a unique key, and only one session exists per key at a time. Once a session has been created it remains active for a fixed time period, this time period is renewed each time that session is open. When the session manager is no longer required it can be closed. Closing the session manager will cancel and destroy all active sessions, and release all resources occupied by the provider such as threads and memory. Typically it is advisable to close a manager when it is not longer required by the application. @author Niall Gallagher
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|