import org.apache.catalina.LifecycleException;
import org.apache.catalina.LifecycleState;
import org.apache.catalina.Session;
-import org.apache.catalina.ha.CatalinaCluster;
import org.apache.catalina.ha.ClusterManager;
import org.apache.catalina.ha.ClusterMessage;
import org.apache.catalina.tribes.Channel;
protected String name;
/**
- * A reference to the cluster
- */
- protected CatalinaCluster cluster;
-
- /**
- * Should listeners be notified?
- */
- private boolean notifyListenersOnReplication;
- /**
*
*/
private int mapSendOptions = Channel.SEND_OPTIONS_SYNCHRONIZED_ACK|Channel.SEND_OPTIONS_USE_ACK;
mExpireSessionsOnShutdown = expireSessionsOnShutdown;
}
- @Override
- public void setCluster(CatalinaCluster cluster) {
- if(log.isDebugEnabled())
- log.debug("Cluster associated with BackupManager");
- this.cluster = cluster;
- }
-
public boolean getExpireSessionsOnShutdown()
{
return mExpireSessionsOnShutdown;
try {
cluster.registerManager(this);
- CatalinaCluster catclust = cluster;
LazyReplicatedMap map = new LazyReplicatedMap(this,
- catclust.getChannel(),
+ cluster.getChannel(),
rpcTimeout,
getMapName(),
getClassLoaders());
}
public String getMapName() {
- CatalinaCluster catclust = cluster;
- String name = catclust.getManagerName(getName(),this)+"-"+"map";
+ String name = cluster.getManagerName(getName(),this)+"-"+"map";
if ( log.isDebugEnabled() ) log.debug("Backup manager, Setting map name to:"+name);
return name;
}
public void setName(String name) {
this.name = name;
}
- @Override
- public boolean isNotifyListenersOnReplication() {
- return notifyListenersOnReplication;
- }
- public void setNotifyListenersOnReplication(boolean notifyListenersOnReplication) {
- this.notifyListenersOnReplication = notifyListenersOnReplication;
- }
public void setMapSendOptions(int mapSendOptions) {
this.mapSendOptions = mapSendOptions;
}
- /*
- * @see org.apache.catalina.ha.ClusterManager#getCluster()
- */
- @Override
- public CatalinaCluster getCluster() {
- return cluster;
- }
-
public int getMapSendOptions() {
return mapSendOptions;
}
import org.apache.catalina.Container;
import org.apache.catalina.Loader;
+import org.apache.catalina.ha.CatalinaCluster;
import org.apache.catalina.ha.ClusterManager;
import org.apache.catalina.session.ManagerBase;
import org.apache.catalina.tribes.io.ReplicationStream;
implements ClusterManager {
/**
+ * A reference to the cluster
+ */
+ protected CatalinaCluster cluster = null;
+
+ /**
+ * Should listeners be notified?
+ */
+ protected boolean notifyListenersOnReplication = true;
+
+ /**
* The pattern used for including session attributes to
* replication, e.g. <code>^(userName|sessionHistory)$</code>.
* If not set, all session attributes will be eligible for replication.
*/
private Pattern sessionAttributePattern = null;
+ /*
+ * @see org.apache.catalina.ha.ClusterManager#getCluster()
+ */
+ @Override
+ public CatalinaCluster getCluster() {
+ return cluster;
+ }
+
+ @Override
+ public void setCluster(CatalinaCluster cluster) {
+ this.cluster = cluster;
+ }
+
+ @Override
+ public boolean isNotifyListenersOnReplication() {
+ return notifyListenersOnReplication;
+ }
+
+ public void setNotifyListenersOnReplication(boolean notifyListenersOnReplication) {
+ this.notifyListenersOnReplication = notifyListenersOnReplication;
+ }
/**
* Return the string pattern used for including session attributes
*/
protected static String managerName = "DeltaManager";
protected String name = null;
- private CatalinaCluster cluster = null;
/**
* cached replication valve cluster container!
private volatile ReplicationValve replicationValve = null ;
private boolean expireSessionsOnShutdown = false;
- private boolean notifyListenersOnReplication = true;
private boolean notifySessionListenersOnReplication = true;
private boolean notifyContainerListenersOnReplication = true;
private volatile boolean stateTransfered = false ;
this.expireSessionsOnShutdown = expireSessionsOnShutdown;
}
- @Override
- public boolean isNotifyListenersOnReplication() {
- return notifyListenersOnReplication;
- }
-
- public void setNotifyListenersOnReplication(boolean notifyListenersOnReplication) {
- this.notifyListenersOnReplication = notifyListenersOnReplication;
- }
-
public boolean isNotifyContainerListenersOnReplication() {
return notifyContainerListenersOnReplication;
}
this.notifyContainerListenersOnReplication = notifyContainerListenersOnReplication;
}
- @Override
- public CatalinaCluster getCluster() {
- return cluster;
- }
-
- @Override
- public void setCluster(CatalinaCluster cluster) {
- this.cluster = cluster;
- }
-
// --------------------------------------------------------- Public Methods
/**