Index: stripes/src/net/sourceforge/stripes/mock/MockRoundtrip.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- stripes/src/net/sourceforge/stripes/mock/MockRoundtrip.java	(revision 1521)
+++ stripes/src/net/sourceforge/stripes/mock/MockRoundtrip.java	(revision )
@@ -23,6 +23,7 @@
 import javax.servlet.Filter;
 
 import net.sourceforge.stripes.action.ActionBean;
+import net.sourceforge.stripes.config.Configuration;
 import net.sourceforge.stripes.controller.ActionResolver;
 import net.sourceforge.stripes.controller.AnnotatedClassActionResolver;
 import net.sourceforge.stripes.controller.StripesConstants;
@@ -346,16 +347,13 @@
 
     /** Find and return the {@link AnnotatedClassActionResolver} for the given context. */
     private static AnnotatedClassActionResolver getActionResolver(MockServletContext context) {
-        for (Filter filter : context.getFilters()) {
-            if (filter instanceof StripesFilter) {
-                ActionResolver resolver = ((StripesFilter) filter).getInstanceConfiguration()
-                        .getActionResolver();
+        Configuration configuration = StripesFilter.getConfiguration();
+        if (configuration!=null) {
+            ActionResolver resolver = configuration.getActionResolver();
-                if (resolver instanceof AnnotatedClassActionResolver) {
-                    return (AnnotatedClassActionResolver) resolver;
-                }
-            }
+            if (resolver instanceof AnnotatedClassActionResolver) {
+                return (AnnotatedClassActionResolver) resolver;
+            }
+        }
-        }
-
         return null;
     }
 
Index: stripes/src/net/sourceforge/stripes/controller/StripesFilter.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- stripes/src/net/sourceforge/stripes/controller/StripesFilter.java	(revision 1521)
+++ stripes/src/net/sourceforge/stripes/controller/StripesFilter.java	(revision )
@@ -57,29 +57,12 @@
     private static final Log log = Log.getInstance(StripesFilter.class);
 
     /** The configuration instance for Stripes. */
-    private Configuration configuration;
+    private static Configuration configuration;
 
     /** The servlet context */
     private ServletContext servletContext;
 
     /**
-     * A place to stash the Configuration object so that other classes in Stripes can access it
-     * without resorting to ferrying it, or the request, to every class that needs access to the
-     * Configuration.  Doing this allows multiple Stripes Configurations to exist in a single
-     * Classloader since the Configuration is not located statically.
-     */
-    private static final ThreadLocal<Configuration> configurationStash = new ThreadLocal<Configuration>();
-
-    /**
-     * A set of weak references to all the Configuration objects that this class has ever
-     * seen. Uses weak references to allow garbage collection to reap these objects if this
-     * is the only reference left.  Used to determine if there is only one active Configuration
-     * for the VM, and if so return it even when the Configuration isn't set in the thread local.
-     */
-    private static final Set<WeakReference<Configuration>> configurations =
-            new HashSet<WeakReference<Configuration>>(); 
-
-    /**
      * Some operations should only be done if the current invocation of
      * {@link #doFilter(ServletRequest, ServletResponse, FilterChain)} is the
      * first in the filter chain. This {@link ThreadLocal} keeps track of
@@ -101,7 +84,6 @@
      */
     public void init(FilterConfig filterConfig) throws ServletException {
         this.configuration = createConfiguration(filterConfig);
-        StripesFilter.configurations.add(new WeakReference<Configuration>(this.configuration));
 
         this.servletContext = filterConfig.getServletContext();
         this.servletContext.setAttribute(StripesFilter.class.getName(), this);
@@ -150,27 +132,7 @@
      * Returns the Configuration that is being used to process the current request.
      */
     public static Configuration getConfiguration() {
-        Configuration configuration = StripesFilter.configurationStash.get();
-
-        // If the configuration wasn't available in thread local, check to see if we only
-        // know about one configuration in total, and if so use that one
         if (configuration == null) {
-            synchronized (StripesFilter.configurations) {
-                // Remove any references from the set that have been cleared
-                Iterator<WeakReference<Configuration>> iterator = StripesFilter.configurations.iterator();
-                while (iterator.hasNext()) {
-                    WeakReference<Configuration> ref = iterator.next();
-                    if (ref.get() == null) iterator.remove();
-                }
-
-                // If there is one and only one Configuration active, take it
-                if (StripesFilter.configurations.size() == 1) {
-                    configuration = StripesFilter.configurations.iterator().next().get();
-                }
-            }
-        }
-
-        if (configuration == null) {
             StripesRuntimeException sre = new StripesRuntimeException(
                     "Something is trying to access the current Stripes configuration but the " +
                     "current request was never routed through the StripesFilter! As a result " +
@@ -186,17 +148,6 @@
     }
 
     /**
-     * Returns the configuration for this instance of the StripesFilter for any class
-     * that has a reference to the filter. For normal runtime access to the configuration
-     * during a request cycle, call getConfiguration() instead.
-     *
-     * @return the Configuration of this instance of the StripesFilter
-     */
-    public Configuration getInstanceConfiguration() {
-        return this.configuration;
-    }
-
-    /**
      * Performs the primary work of the filter, including constructing a StripesRequestWrapper to
      * wrap the HttpServletRequest, and using the configured LocalePicker to decide which
      * Locale will be used to process the request.
@@ -220,9 +171,6 @@
             log.trace("Intercepting request to URL: ", HttpUtil.getRequestedPath(httpRequest));
 
             if (initial) {
-                // Pop the configuration into thread local
-                StripesFilter.configurationStash.set(this.configuration);
-
                 // Figure out the locale and character encoding to use. The ordering of things here
                 // is very important!! We pick the locale first since picking the encoding is
                 // locale dependent, but the encoding *must* be set on the request before any
@@ -267,7 +215,6 @@
             if (initial) {
                 // Once the request is processed, clean up thread locals
                 StripesFilter.initialInvocation.remove();
-                StripesFilter.configurationStash.remove();
 
                 flashOutbound(httpRequest);
             }
@@ -328,6 +275,5 @@
         this.servletContext.removeAttribute(StripesFilter.class.getName());
         Log.cleanup();
         Introspector.flushCaches(); // Not 100% sure this is necessary, but it doesn't  hurt
-        StripesFilter.configurations.clear();
     }
 }
Index: stripes/src/net/sourceforge/stripes/controller/DynamicMappingFilter.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- stripes/src/net/sourceforge/stripes/controller/DynamicMappingFilter.java	(revision 1521)
+++ stripes/src/net/sourceforge/stripes/controller/DynamicMappingFilter.java	(revision )
@@ -420,8 +420,7 @@
                         throws IOException, ServletException {
                     // Look for an ActionBean that is mapped to the URI
                     String uri = HttpUtil.getRequestedPath((HttpServletRequest) request);
-                    Class<? extends ActionBean> beanType = getStripesFilter()
-                            .getInstanceConfiguration().getActionResolver().getActionBeanType(uri);
+                    Class<? extends ActionBean> beanType = StripesFilter.getConfiguration().getActionResolver().getActionBeanType(uri);
 
                     // If found then call the dispatcher directly. Otherwise, send the error.
                     if (beanType == null) {
