private boolean changeRequestedSessionId( final Request request, final Response response ) {
        /*
         * Check for session relocation only if a session id was requested
         */
        if ( request.getRequestedSessionId() != null ) {

        	String newSessionId = _sessionBackupService.changeSessionIdOnTomcatFailover( request.getRequestedSessionId() );
        	if ( newSessionId == null ) {
                newSessionId = _sessionBackupService.changeSessionIdOnMemcachedFailover( request.getRequestedSessionId() );
            }

            if ( newSessionId != null ) {
                request.changeSessionId( newSessionId );
                return true;
            }

        }
        return false;
    }
private boolean changeRequestedSessionId ( final Request request , final Response response ) { if ( request . getRequestedSessionId ( ) != null ) { String newSessionId = _sessionBackupService . changeSessionIdOnTomcatFailover ( request . getRequestedSessionId ( ) ) ; if ( newSessionId == null ) { newSessionId = _sessionBackupService . changeSessionIdOnMemcachedFailover ( request . getRequestedSessionId ( ) ) ; } if ( newSessionId != null ) { request . changeSessionId ( newSessionId ) ; return true ; } } return false ; }
If there's a session for a requested session id that is taken over (tomcat failover) or
that will be relocated (memcached failover), the new session id will be set (via {@link Request#changeSessionId(String)}).

@param request the request
@param response the response

@return <code>true</code> if the id of a valid session was changed.

@see Request#changeSessionId(String)