@Override protected LockStatus onBeforeLoadFromMemcached( final String sessionId ) throws InterruptedException, ExecutionException { final Request request = _currentRequest.get(); if ( request == null ) { throw new RuntimeException( "There's no request set, this indicates that this findSession" + "was triggered by the container which should already be handled in findSession." ); } /* let's see if we should lock the session for this request */ if ( _uriPattern.matcher( RequestTrackingHostValve.getURIWithQueryString( request ) ).matches() ) { if ( _log.isDebugEnabled() ) { _log.debug( "Lock request for request " + RequestTrackingHostValve.getURIWithQueryString( request ) ); } return lock( sessionId ); } if ( _log.isDebugEnabled() ) { _log.debug( "Not lock request for request " + RequestTrackingHostValve.getURIWithQueryString( request ) ); } _stats.nonStickySessionsReadOnlyRequest(); return LockStatus.LOCK_NOT_REQUIRED; }
@Override protected LockStatus onBeforeLoadFromMemcached( final String sessionId ) throws InterruptedException, ExecutionException { final Request request = _currentRequest.get(); if ( request == null ) { throw new RuntimeException( "There's no request set, this indicates that this findSession" + "was triggered by the container which should already be handled in findSession." ); } /* lets see if we can skip the locking as we consider this beeing a readonly request */ if ( _readOnlyRequestCache.isReadOnlyRequest( RequestTrackingHostValve.getURIWithQueryString( request ) ) ) { if ( _log.isDebugEnabled() ) { _log.debug( "Not getting lock for readonly request " + RequestTrackingHostValve.getURIWithQueryString( request ) ); } _stats.nonStickySessionsReadOnlyRequest(); return LockStatus.LOCK_NOT_REQUIRED; } return lock( sessionId ); }
private void backupSession( final Request request, final Response response, final boolean sessionIdChanged ) { /* * Do we have a session? */ final String sessionId = getSessionId(request, response); if ( sessionId != null ) { _statistics.requestWithSession(); _sessionBackupService.backupSession( sessionId, sessionIdChanged, getURIWithQueryString( request ) ); } else { _statistics.requestWithoutSession(); } }
public void invoke( final Request request, final Response response ) throws IOException, ServletException { final String requestId = getURIWithQueryString( request ); if(!_enabled.get() || !_msmContext.equals(request.getContext())) { getNext().invoke( request, response );
@Override protected LockStatus onBeforeLoadFromMemcached( final String sessionId ) throws InterruptedException, ExecutionException { final Request request = _currentRequest.get(); if ( request == null ) { throw new RuntimeException( "There's no request set, this indicates that this findSession" + "was triggered by the container which should already be handled in findSession." ); } /* let's see if we should lock the session for this request */ if ( _uriPattern.matcher( RequestTrackingHostValve.getURIWithQueryString( request ) ).matches() ) { if ( _log.isDebugEnabled() ) { _log.debug( "Lock request for request " + RequestTrackingHostValve.getURIWithQueryString( request ) ); } return lock( sessionId ); } if ( _log.isDebugEnabled() ) { _log.debug( "Not lock request for request " + RequestTrackingHostValve.getURIWithQueryString( request ) ); } _stats.nonStickySessionsReadOnlyRequest(); return LockStatus.LOCK_NOT_REQUIRED; }
@Override protected LockStatus onBeforeLoadFromMemcached( final String sessionId ) throws InterruptedException, ExecutionException { final Request request = _currentRequest.get(); if ( request == null ) { throw new RuntimeException( "There's no request set, this indicates that this findSession" + "was triggered by the container which should already be handled in findSession." ); } /* lets see if we can skip the locking as we consider this beeing a readonly request */ if ( _readOnlyRequestCache.isReadOnlyRequest( RequestTrackingHostValve.getURIWithQueryString( request ) ) ) { if ( _log.isDebugEnabled() ) { _log.debug( "Not getting lock for readonly request " + RequestTrackingHostValve.getURIWithQueryString( request ) ); } _stats.nonStickySessionsReadOnlyRequest(); return LockStatus.LOCK_NOT_REQUIRED; } return lock( sessionId ); }
private void backupSession( final Request request, final Response response, final boolean sessionIdChanged ) { /* * Do we have a session? */ final String sessionId = getSessionId(request, response); if ( sessionId != null ) { _statistics.requestWithSession(); _sessionBackupService.backupSession( sessionId, sessionIdChanged, getURIWithQueryString( request ) ); } else { _statistics.requestWithoutSession(); } }
public void invoke( final Request request, final Response response ) throws IOException, ServletException { final String requestId = getURIWithQueryString( request ); if(!_enabled.get() || !_msmContext.equals(request.getContext())) { getNext().invoke( request, response );