Author: ivaynberg
Date: Tue Aug 16 00:30:42 2011
New Revision: 1158071
URL: http://svn.apache.org/viewvc?rev=1158071&view=rev
Log:
fix a bug where a wrong session is used when two or more wicket applications
are embedded line in wicket-examples
Modified:
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
Modified:
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
URL:
http://svn.apache.org/viewvc/wicket/trunk/wicket-core/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java?rev=1158071&r1=1158070&r2=1158071&view=diff
==============================================================================
---
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
(original)
+++
wicket/trunk/wicket-core/src/main/java/org/apache/wicket/protocol/http/WicketFilter.java
Tue Aug 16 00:30:42 2011
@@ -115,6 +115,8 @@ public class WicketFilter implements Fil
boolean processRequest(ServletRequest request, final ServletResponse
response,
final FilterChain chain) throws IOException, ServletException
{
+ final ThreadContext previousThreadContext =
ThreadContext.detach();
+
// Assume we are able to handle the request
boolean res = true;
@@ -191,7 +193,7 @@ public class WicketFilter implements Fil
}
finally
{
- ThreadContext.detach();
+ ThreadContext.restore(previousThreadContext);
if (newClassLoader != previousClassLoader)
{