View Javadoc

1   /**
2    *  Copyright 2003-2007 Greg Luck
3    *
4    *  Licensed under the Apache License, Version 2.0 (the "License");
5    *  you may not use this file except in compliance with the License.
6    *  You may obtain a copy of the License at
7    *
8    *      http://www.apache.org/licenses/LICENSE-2.0
9    *
10   *  Unless required by applicable law or agreed to in writing, software
11   *  distributed under the License is distributed on an "AS IS" BASIS,
12   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   *  See the License for the specific language governing permissions and
14   *  limitations under the License.
15   */
16  
17  package net.sf.ehcache.constructs.web.filter;
18  
19  import net.sf.ehcache.CacheException;
20  
21  /**
22   * Thrown when it is detected that a caching filter's {@link CachingFilter#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)}
23   * method is reentered by the same thread.
24   * <p/>
25   * Reentrant calls will block indefinitely because the first request has not yet
26   * unblocked the cache.
27   * <p/>
28   * This condition usually happens declaratively when the same filter is specified twice in a filter chain
29   * or programmatically when a {@link javax.servlet.RequestDispatcher} includes or forwards back to the same URL,
30   * either directly or indirectly.
31   * @author Greg Luck
32   * @version $Id: FilterNonReentrantException.java 512 2007-07-10 09:18:45Z gregluck $
33   */
34  public class FilterNonReentrantException extends CacheException {
35  
36      /**
37       * Constructor for the exception
38       */
39      public FilterNonReentrantException() {
40          super();
41      }
42  
43      /**
44       * Constructs an exception with the message given
45       *
46       * @param message the message
47       */
48      public FilterNonReentrantException(String message) {
49          super(message);
50      }
51  }