Author: jcompagner
Date: Tue Mar 31 09:00:12 2009
New Revision: 760374
URL: http://svn.apache.org/viewvc?rev=760374&view=rev
Log:
this will party fix the problem if the session specific map is created twice at
the same time with 2 request (that are both the first 2 request theb browser
makes for that session in 2 different tabs which is very unlikely..)
It is possible that 1 buffered response will be lost, then for that page a full
render will be done again.
In 1.4 we will use putIfAbsent method of the ConcurrentHashmap then the event
of a lost buffered response will also be fixed
Issue: WICKET-2191
Modified:
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
Modified:
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
URL:
http://svn.apache.org/viewvc/wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebApplication.java?rev=760374&r1=760373&r2=760374&view=diff
==============================================================================
---
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
(original)
+++
wicket/branches/wicket-1.3.x/jdk-1.4/wicket/src/main/java/org/apache/wicket/protocol/http/WebApplication.java
Tue Mar 31 09:00:12 2009
@@ -637,7 +637,11 @@
if (responsesPerSession == null)
{
responsesPerSession = Collections.synchronizedMap(new
MostRecentlyUsedMap(4));
- bufferedResponses.put(sessionId, responsesPerSession);
+ Object removed = bufferedResponses.put(sessionId,
responsesPerSession);
+ if (removed != null)
+ {
+ responsesPerSession.putAll((Map)removed);
+ }
}
responsesPerSession.put(bufferId, renderedResponse);
}