org.glassfish.web.ha.session.management
Class ReplicationWebEventPersistentManager

java.lang.Object
  extended by org.apache.catalina.session.ManagerBase
      extended by org.apache.catalina.session.PersistentManagerBase
          extended by org.glassfish.web.ha.session.management.ReplicationManagerBase
              extended by org.glassfish.web.ha.session.management.ReplicationWebEventPersistentManager
All Implemented Interfaces:
java.beans.PropertyChangeListener, java.util.EventListener, javax.management.MBeanRegistration, Lifecycle, Manager, WebEventPersistentManager

@Service
@Scoped(value=org.jvnet.hk2.component.PerLookup.class)
public class ReplicationWebEventPersistentManager
extends ReplicationManagerBase
implements WebEventPersistentManager

Author:
Rajiv Mordani

Field Summary
 
Fields inherited from class org.glassfish.web.ha.session.management.ReplicationManagerBase
backingStore, disableJreplica, logger, relaxCacheVersionSemantics, rwl, sessionFactory
 
Fields inherited from class org.apache.catalina.session.PersistentManagerBase
invalidatedSessions, lifecycle
 
Fields inherited from class org.apache.catalina.session.ManagerBase
container, debug, defaultContext, devRandomSource, distributable, domain, duplicates, entropy, expiredSessions, initialized, maxActive, maxActiveUpdateLock, maxInactiveInterval, mserver, oname, random, randomClass, randomIS, rejectedSessions, sessionAverageAliveTime, sessionCounter, sessionIdLength, sessionLocker, sessionMaxAliveTime, sessions, sm, support, uuidGenerator
 
Fields inherited from interface org.apache.catalina.Lifecycle
AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, INIT_EVENT, START_EVENT, STOP_EVENT
 
Constructor Summary
ReplicationWebEventPersistentManager()
          Creates a new instance of ReplicationWebEventPersistentManager
 
Method Summary
<T extends java.io.Serializable>
void
createBackingStore(java.lang.String persistenceType, java.lang.String storeName, java.lang.Class<T> metadataClass, java.util.HashMap vendorMap)
           
 void doValveSave(Session session)
          called from valve; does the save of session
 java.lang.String getInfo()
          Return descriptive information about this Manager implementation and the corresponding version number, in the format <description>/<version>.
 java.lang.String getName()
          Return the descriptive short name of this Manager implementation.
 java.lang.String getReplicaFromPredictor(java.lang.String sessionId, java.lang.String oldJreplicaValue)
           
 void postRequestDispatcherProcess(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
           
protected  void processMaxActiveSwaps()
          Swap idle sessions out to Store if too many are active Hercules: modified method
protected  void processMaxIdleBackups()
          Back up idle sessions.
protected  void processMaxIdleSwaps()
          Swap idle sessions out to Store if they are idle too long.
 void stop()
          Gracefully terminate the active use of the public methods of this component.
 
Methods inherited from class org.glassfish.web.ha.session.management.ReplicationManagerBase
acquireReadLock, acquireWriteLock, createEmptySession, createNewSession, doRemove, findSession, getBackingStore, isDisableJreplica, isRelaxCacheVersionSemantics, isSessionVersioningSupported, releaseReadLock, releaseWriteLock, removeSessionFromManagerCache, setBackingStore, setDisableJreplica, setRelaxCacheVersionSemantics, setSessionFactory
 
Methods inherited from class org.apache.catalina.session.PersistentManagerBase
addLifecycleListener, addToInvalidatedSessions, backgroundProcess, clearStore, createSession, createSession, findLifecycleListeners, findSession, findSession, getMaxActiveSessions, getMaxIdleBackup, getMaxIdleSwap, getMinIdleSwap, getMonitorAttributeValues, getSaveOnRestart, getStore, isLoaded, isSessionIdValid, isStarted, load, processExpires, processInvalidatedSessions, processPersistenceChecks, propertyChange, release, remove, remove, removeFromInvalidatedSessions, removeLifecycleListener, removeSuper, setContainer, setMaxActiveSessions, setMaxIdleBackup, setMaxIdleSwap, setMinIdleSwap, setSaveOnRestart, setStarted, setStore, start, superFindSession, swapIn, swapIn, swapOut, unload, writeSession
 
Methods inherited from class org.apache.catalina.session.ManagerBase
add, addPropertyChangeListener, changeSessionId, checkSessionAttribute, clearSessions, destroy, expireSession, findSession, findSessions, generateSessionId, generateSessionId, getActiveSessions, getClassName, getContainer, getDebug, getDefaultContext, getDistributable, getDomain, getDuplicates, getEngine, getEntropy, getExpiredSessions, getJvmRoute, getLastAccessedTimeMillis, getMaxActive, getMaxInactiveInterval, getMaxInactiveIntervalSeconds, getNewSession, getObjectName, getRandom, getRandomBytes, getRandomClass, getRandomFile, getRejectedSessions, getSessionAttribute, getSessionAverageAliveTime, getSessionAverageAliveTimeSeconds, getSessionCount, getSessionCounter, getSessionIdLength, getSessionMaxAliveTime, getSessionMaxAliveTimeSeconds, getUuidGenerator, init, listSessionIds, lockSession, log, log, postDeregister, postRegister, preDeregister, preRegister, preRequestDispatcherProcess, removePropertyChangeListener, setDebug, setDefaultContext, setDistributable, setDuplicates, setEntropy, setExpiredSessions, setMaxActive, setMaxInactiveInterval, setMaxInactiveIntervalSeconds, setRandomClass, setRandomFile, setRejectedSessions, setSessionAverageAliveTime, setSessionAverageAliveTimeSeconds, setSessionCount, setSessionCounter, setSessionIdLength, setSessionLocker, setSessionMaxAliveTime, setSessionMaxAliveTimeSeconds, setUuidGenerator, toCookie, unlockSession, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReplicationWebEventPersistentManager

public ReplicationWebEventPersistentManager()
Creates a new instance of ReplicationWebEventPersistentManager

Method Detail

getInfo

public java.lang.String getInfo()
Return descriptive information about this Manager implementation and the corresponding version number, in the format <description>/<version>.

Specified by:
getInfo in interface Manager
Overrides:
getInfo in class PersistentManagerBase

doValveSave

public void doValveSave(Session session)
called from valve; does the save of session

Specified by:
doValveSave in interface WebEventPersistentManager
Specified by:
doValveSave in class ReplicationManagerBase
Parameters:
session - The session to store

postRequestDispatcherProcess

public void postRequestDispatcherProcess(javax.servlet.ServletRequest request,
                                         javax.servlet.ServletResponse response)
Specified by:
postRequestDispatcherProcess in interface Manager
Overrides:
postRequestDispatcherProcess in class ManagerBase

getName

public java.lang.String getName()
Return the descriptive short name of this Manager implementation.

Overrides:
getName in class PersistentManagerBase

processMaxIdleBackups

protected void processMaxIdleBackups()
Back up idle sessions. Hercules: modified method we do not want background saves when we are using web-event persistence-frequency

Overrides:
processMaxIdleBackups in class PersistentManagerBase

processMaxActiveSwaps

protected void processMaxActiveSwaps()
Swap idle sessions out to Store if too many are active Hercules: modified method

Overrides:
processMaxActiveSwaps in class PersistentManagerBase

processMaxIdleSwaps

protected void processMaxIdleSwaps()
Swap idle sessions out to Store if they are idle too long.

Overrides:
processMaxIdleSwaps in class PersistentManagerBase

getReplicaFromPredictor

public java.lang.String getReplicaFromPredictor(java.lang.String sessionId,
                                                java.lang.String oldJreplicaValue)
Specified by:
getReplicaFromPredictor in class ReplicationManagerBase

stop

public void stop()
          throws LifecycleException
Gracefully terminate the active use of the public methods of this component. This method should be the last one called on a given instance of this component. We use this here to insure that pool entries are cleaned up

Specified by:
stop in interface Lifecycle
Overrides:
stop in class ReplicationManagerBase
Throws:
java.lang.IllegalStateException - if this component has not been started
LifecycleException - if this component detects a fatal error that needs to be reported

createBackingStore

public <T extends java.io.Serializable> void createBackingStore(java.lang.String persistenceType,
                                                                java.lang.String storeName,
                                                                java.lang.Class<T> metadataClass,
                                                                java.util.HashMap vendorMap)
Specified by:
createBackingStore in class ReplicationManagerBase


Copyright © 2012 GlassFish Community. All Rights Reserved.