public boolean isSticky() { return _msm.isSticky(); }
public boolean isSticky() { return _msm.isSticky(); }
public boolean isSticky() { return _msm.isSticky(); }
public boolean isSticky() { return _msm.isSticky(); }
/** * {@inheritDoc} */ @Override public void stopInternal() throws LifecycleException { setState(LifecycleState.STOPPING); if ( _msm.isSticky() ) { _log.info( "Removing sessions from local session map." ); for( final Session session : sessions.values() ) { swapOut( (StandardSession) session ); } } _msm.shutdown(); super.stopInternal(); }
/** * {@inheritDoc} */ @Override public void stopInternal() throws LifecycleException { setState(LifecycleState.STOPPING); if ( _msm.isSticky() ) { _log.info( "Removing sessions from local session map." ); for( final Session session : sessions.values() ) { swapOut( (StandardSession) session ); } } _msm.shutdown(); super.stopInternal(); }
/** * {@inheritDoc} */ @Override public void stopInternal() throws LifecycleException { setState(LifecycleState.STOPPING); if ( _msm.isSticky() ) { _log.info( "Removing sessions from local session map." ); for( final Session session : sessions.values() ) { swapOut( (StandardSession) session ); } } _msm.shutdown(); super.stopInternal(); }
private void waitForSessionExpiration(final boolean sticky) throws InterruptedException { final SessionManager manager = _tomcat1.getManager(); assertEquals( manager.getMemcachedSessionService().isSticky(), sticky ); final Container container = manager.getContext(); final long timeout = TimeUnit.SECONDS.toMillis( sticky ? container.getBackgroundProcessorDelay() + manager.getMaxInactiveInterval() : 2 * manager.getMaxInactiveInterval() ) + 1000; Thread.sleep( timeout ); }
private void checkSessionFunctionalityWithMsmDisabled() throws IOException, HttpException, InterruptedException { assertTrue( _tomcat1.getManager().getMemcachedSessionService().isSticky() ); final String sessionId1 = makeRequest( _httpClient, _portTomcat1, null ); assertNotNull( sessionId1, "No session created." ); assertNull( new SessionIdFormat().extractMemcachedId( sessionId1 ), "Got a memcached node id, even with msm disabled." ); waitForSessionExpiration( true ); final String sessionId2 = makeRequest( _httpClient, _portTomcat1, sessionId1 ); assertNotSame( sessionId2, sessionId1, "SessionId not changed." ); }
/** * {@inheritDoc} */ @Override public void stop() throws LifecycleException { if (log.isDebugEnabled()) { log.debug("Stopping"); } // Validate and update our current component state if (!_started) { throw new LifecycleException (sm.getString("standardManager.notStarted")); } _lifecycle.fireLifecycleEvent(STOP_EVENT, null); _started = false; // Require a new random number generator if we are restarted random = null; if ( initialized ) { if ( _msm.isSticky() ) { _log.info( "Removing sessions from local session map." ); for( final Session session : sessions.values() ) { swapOut( (StandardSession) session ); } } _msm.shutdown(); destroy(); } }
public boolean isSticky() { return _msm.isSticky(); }
/** * {@inheritDoc} */ @Override public void stopInternal() throws LifecycleException { setState(LifecycleState.STOPPING); if ( _msm.isSticky() ) { _log.info( "Removing sessions from local session map." ); for( final Session session : sessions.values() ) { swapOut( (StandardSession) session ); } } _msm.shutdown(); super.stopInternal(); }