org.mortbay.cometd.session
Class BayeuxSessionManager
java.lang.Object
org.mortbay.component.AbstractLifeCycle
org.mortbay.jetty.servlet.AbstractSessionManager
org.mortbay.jetty.servlet.HashSessionManager
org.mortbay.cometd.session.BayeuxSessionManager
- All Implemented Interfaces:
- LifeCycle, SessionManager
public class BayeuxSessionManager
- extends HashSessionManager
This is an experimental session manager that uses Bayeux to send
replicated session data to the client, that can be made available if the client
switches nodes in a cluster.
Care must be taken when handling requests that do not have sessions, so that
new sessions are not created. Session should be created/restored by the bayeux handshake.
The client side needs to add in the dojox.cometd.session extension.
- Author:
- gregw
Fields inherited from class org.mortbay.jetty.servlet.AbstractSessionManager |
__distantFuture, _context, _dftMaxIdleSecs, _httpOnly, _loader, _maxCookieAge, _maxSessions, _minSessions, _nodeIdInSessionId, _refreshCookieAge, _secureCookies, _sessionAttributeListeners, _sessionCookie, _sessionDomain, _sessionHandler, _sessionIdManager, _sessionListeners, _sessionPath, _sessionURL, _sessionURLPrefix |
Methods inherited from class org.mortbay.jetty.servlet.HashSessionManager |
addSession, doStop, getSavePeriod, getScavengePeriod, getSession, getSessionMap, getSessions, getStoreDirectory, invalidateSessions, removeSession, restoreSession, restoreSessions, saveSessions, setMaxInactiveInterval, setSavePeriod, setScavengePeriod, setStoreDirectory |
Methods inherited from class org.mortbay.jetty.servlet.AbstractSessionManager |
access, addEventListener, addSession, clearEventListeners, complete, getClusterId, getHttpOnly, getHttpSession, getIdManager, getMaxCookieAge, getMaxInactiveInterval, getMaxSessions, getMetaManager, getMinSessions, getNodeId, getRefreshCookieAge, getSecureCookies, getSessionCookie, getSessionCookie, getSessionDomain, getSessionHandler, getSessionPath, getSessionURL, getSessionURLPrefix, isNodeIdInSessionId, isUsingCookies, isValid, newHttpSession, removeEventListener, removeSession, removeSession, resetStats, setHttpOnly, setIdManager, setMaxCookieAge, setMetaManager, setNodeIdInSessionId, setRefreshCookieAge, setSecureCookies, setSessionCookie, setSessionDomain, setSessionHandler, setSessionPath, setSessionURL, setUsingCookies |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BAYEUX_SESSION
public static final String BAYEUX_SESSION
- See Also:
- Constant Field Values
BayeuxSessionManager
public BayeuxSessionManager()
initialize
protected void initialize(dojox.cometd.Bayeux bayeux)
newSession
protected AbstractSessionManager.Session newSession(HttpServletRequest request)
- Description copied from class:
AbstractSessionManager
- Create a new session instance
- Overrides:
newSession
in class HashSessionManager
- Returns:
newSession
protected AbstractSessionManager.Session newSession(long created,
String clusterId)
- Overrides:
newSession
in class HashSessionManager
doStart
public void doStart()
throws Exception
- Overrides:
doStart
in class HashSessionManager
- Throws:
Exception
Copyright © 2008 Mort Bay Consulting. All Rights Reserved.