/** * Stop this component and implement the requirements * of {@link org.apache.catalina.util.LifecycleBase#stopInternal()}. * * This will disconnect the cluster communication channel and stop the * listener thread. * * @exception LifecycleException if this component detects a fatal error * that prevents this component from being used */ @Override protected synchronized void stopInternal() throws LifecycleException { if (log.isDebugEnabled()) log.debug(sm.getString("backupManager.stopped", getName())); setState(LifecycleState.STOPPING); if (sessions instanceof LazyReplicatedMap) { LazyReplicatedMap<String,Session> map = (LazyReplicatedMap<String,Session>)sessions; map.breakdown(); } super.stopInternal(); }
/** * Stop this component and implement the requirements * of {@link org.apache.catalina.util.LifecycleBase#stopInternal()}. * * This will disconnect the cluster communication channel and stop the * listener thread. * * @exception LifecycleException if this component detects a fatal error * that prevents this component from being used */ @Override protected synchronized void stopInternal() throws LifecycleException { if (log.isDebugEnabled()) log.debug(sm.getString("backupManager.stopped", getName())); setState(LifecycleState.STOPPING); if (sessions instanceof LazyReplicatedMap) { LazyReplicatedMap<String,Session> map = (LazyReplicatedMap<String,Session>)sessions; map.breakdown(); } cluster.removeManager(this); super.stopInternal(); }
/** * Stop this component and implement the requirements * of {@link org.apache.catalina.util.LifecycleBase#stopInternal()}. * * This will disconnect the cluster communication channel and stop the * listener thread. * * @exception LifecycleException if this component detects a fatal error * that prevents this component from being used */ @Override protected synchronized void stopInternal() throws LifecycleException { if (log.isDebugEnabled()) log.debug(sm.getString("backupManager.stopped", getName())); setState(LifecycleState.STOPPING); if (sessions instanceof LazyReplicatedMap) { LazyReplicatedMap map = (LazyReplicatedMap)sessions; map.breakdown(); } cluster.removeManager(this); super.stopInternal(); }
/** * Start this component and implement the requirements * of {@link org.apache.catalina.util.LifecycleBase#startInternal()}. * * Starts the cluster communication channel, this will connect with the * other nodes in the cluster, and request the current session state to be * transferred to this node. * * @exception LifecycleException if this component detects a fatal error * that prevents this component from being used */ @Override protected synchronized void startInternal() throws LifecycleException { super.startInternal(); try { if (cluster == null) throw new LifecycleException(sm.getString("backupManager.noCluster", getName())); LazyReplicatedMap<String,Session> map = new LazyReplicatedMap<>( this, cluster.getChannel(), rpcTimeout, getMapName(), getClassLoaders(), terminateOnStartFailure); map.setChannelSendOptions(mapSendOptions); map.setAccessTimeout(accessTimeout); this.sessions = map; } catch ( Exception x ) { log.error(sm.getString("backupManager.startUnable", getName()),x); throw new LifecycleException(sm.getString("backupManager.startFailed", getName()),x); } setState(LifecycleState.STARTING); }
throw new LifecycleException(sm.getString("backupManager.startFailed", getName()),x); setState(LifecycleState.STARTING);
throw new LifecycleException(sm.getString("backupManager.startFailed", getName()),x); setState(LifecycleState.STARTING);