|
JSecurity | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jsecurity.session.mgt.eis.CachingSessionDAO
org.jsecurity.session.mgt.eis.MemorySessionDAO
public class MemorySessionDAO
Simple memory-based implementation of the SessionDAO that relies on its configured
CacheManager for Session caching and in-memory persistence.
PLEASE NOTE the default CacheManager internal to this implementation is a
HashtableCacheManager, which IS NOT RECOMMENDED for production environments.
If you want to use the MemorySessionDAO in production environments, such as those that require session data to be recoverable in case of a server restart, you should do one of two things (or both):
EhCacheManager is one such implementation. It is not used by default
to prevent a forced runtime dependency on ehcache.jar that may not be required in many environments)
| Field Summary |
|---|
| Fields inherited from class org.jsecurity.session.mgt.eis.CachingSessionDAO |
|---|
ACTIVE_SESSION_CACHE_NAME |
| Constructor Summary | |
|---|---|
MemorySessionDAO()
|
|
| Method Summary | |
|---|---|
protected void |
assignSessionId(Session session,
Serializable sessionId)
|
protected Serializable |
doCreate(Session session)
Subclass hook to actually persist the given Session instance to the underlying EIS. |
protected void |
doDelete(Session session)
Subclass implementation hook to permanently delete the given Session from the underlying EIS. |
protected Session |
doReadSession(Serializable sessionId)
Subclass implmentation hook to actually retrieve the Session object from the underlying EIS. |
protected void |
doUpdate(Session session)
Subclass implementation hook to actually persist the Session's state to the underlying EIS. |
protected Serializable |
generateNewSessionId()
|
| Methods inherited from class org.jsecurity.session.mgt.eis.CachingSessionDAO |
|---|
cache, cacheValidSession, create, createActiveSessionsCache, delete, ensureUncached, getActiveSessions, getActiveSessionsCache, getActiveSessionsCacheLazy, getActiveSessionsCacheName, getCachedSession, getCachedSession, getCacheManager, readSession, setActiveSessionsCache, setActiveSessionsCacheName, setCacheManager, uncache, update, verifySessionId |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MemorySessionDAO()
| Method Detail |
|---|
protected Serializable generateNewSessionId()
protected Serializable doCreate(Session session)
CachingSessionDAO
doCreate in class CachingSessionDAOsession - the Session instance to persist to the EIS.
Session.getId().
protected void assignSessionId(Session session,
Serializable sessionId)
protected Session doReadSession(Serializable sessionId)
CachingSessionDAO
doReadSession in class CachingSessionDAOsessionId - the id of the Session to retrieve.
protected void doUpdate(Session session)
CachingSessionDAO
doUpdate in class CachingSessionDAOsession - the session object whose state will be propagated to the EIS.protected void doDelete(Session session)
CachingSessionDAO
doDelete in class CachingSessionDAOsession - the session instance to permanently delete from the EIS.
|
JSecurity | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||