@Override protected void startInternal() throws LifecycleException { super.startInternal(); if (getCluster() == null) { Cluster cluster = getContext().getCluster(); if (cluster instanceof CatalinaCluster) { setCluster((CatalinaCluster)cluster); } } if (cluster != null) cluster.registerManager(this); }
/** * Register cross context session at replication valve thread local * @param session cross context session */ protected void registerSessionAtReplicationValve(DeltaSession session) { if(replicationValve == null) { CatalinaCluster cluster = getCluster() ; if(cluster != null) { Valve[] valves = cluster.getValves(); if(valves != null && valves.length > 0) { for(int i=0; replicationValve == null && i < valves.length ; i++ ){ if(valves[i] instanceof ReplicationValve) replicationValve = (ReplicationValve)valves[i] ; }//for if(replicationValve == null && log.isDebugEnabled()) { log.debug("no ReplicationValve found for CrossContext Support"); }//endif }//end if }//endif }//end if if(replicationValve != null) { replicationValve.registerReplicationSession(session); } }
protected void clone(ClusterManagerBase copy) { copy.setName("Clone-from-" + getName()); copy.setCluster(getCluster()); copy.setMaxActiveSessions(getMaxActiveSessions()); copy.setMaxInactiveInterval(getMaxInactiveInterval()); copy.setSessionIdLength(getSessionIdLength()); copy.setProcessExpiresFrequency(getProcessExpiresFrequency()); copy.setNotifyListenersOnReplication(isNotifyListenersOnReplication()); copy.setSessionAttributeFilter(getSessionAttributeFilter()); copy.setSecureRandomClass(getSecureRandomClass()); copy.setSecureRandomProvider(getSecureRandomProvider()); copy.setSecureRandomAlgorithm(getSecureRandomAlgorithm()); }
protected void clone(ClusterManagerBase copy) { copy.setName("Clone-from-" + getName()); copy.setCluster(getCluster()); copy.setMaxActiveSessions(getMaxActiveSessions()); copy.setMaxInactiveInterval(getMaxInactiveInterval()); copy.setSessionIdLength(getSessionIdLength()); copy.setProcessExpiresFrequency(getProcessExpiresFrequency()); copy.setNotifyListenersOnReplication(isNotifyListenersOnReplication()); copy.setSessionAttributeFilter(getSessionAttributeFilter()); copy.setSecureRandomClass(getSecureRandomClass()); copy.setSecureRandomProvider(getSecureRandomProvider()); copy.setSecureRandomAlgorithm(getSecureRandomAlgorithm()); }