Re: About a thread safe problem of the WebApplication class

2008-12-23 Thread Johan Compagner
Hmm weird nobody else seem to notice this before, we just should make
it a concurrenthashmap

On 24/12/2008, 加納充照  wrote:
> The following errors occurred when the performance of the wicket
> application was tested.
>
> [Trace of error]
> [08/12/18 9:53:34:575 JST] 003e SystemOut O 2008-12-18
> 09:53:34,499 ERROR RequestCycle - concurrent access to
> HashMap attempted by Thread[WebContainer : 6,5,main]
> java.util.ConcurrentModificationException: concurrent access to
> HashMap attempted by Thread[WebContainer : 6,5,main]
> at java.util.HashMap.onExit(HashMap.java:217)
> at java.util.HashMap.transfer(HashMap.java:514)
> at java.util.HashMap.resize(HashMap.java:500)
> at java.util.HashMap.addEntry(HashMap.java:800)
> at java.util.HashMap.put(HashMap.java:441)
> at
> org.apache.wicket.protocol.http.WebApplication.addBufferedResponse(WebApplication.java:639)
> at
> org.apache.wicket.protocol.http.WebRequestCycle.redirectTo(WebRequestCycle.java:201)
> at
> org.apache.wicket.request.target.component.PageRequestTarget.respond(PageRequestTarget.java:58)
> at
> org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:104)
> ・・・
>
> [Test environment]
> OS:AIX5.3 TL005 +WAS6.1.0.21
> Java:JDK1.5.0
> Wicket:wicket1.3.5
>
> [Consideration And Question]
> I think that it is a cause that the bufferedResponses instance of the
> WebApplication class is not the thread safe.
>
> The sessionDestroyed method and the addBufferedResponse method of the
> WebApplication class might have to be controlled exclusively(When
> these methods were declared in synchronized, the problem was
> canceled).
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: About a thread safe problem of the WebApplication class

2008-12-24 Thread kanou

It might be one idea to use concurrenthashmap. 
However, concurrenthashmap is API supported from JDK1.5. 
Moreover, I think that the Wicket1.3 series was JDK1.4 support. 

Therefore, I think that the method of exclusively controlling 
the method is suitable in this case(synchronized). 
-- 
View this message in context: 
http://www.nabble.com/About-a-thread-safe-problem-of-the-WebApplication-class-tp21154813p21156901.html
Sent from the Wicket - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



Re: About a thread safe problem of the WebApplication class

2008-12-24 Thread Johan Compagner
1.3 has its own ConcurrentHashmap copied from the 1.4 port

On Wed, Dec 24, 2008 at 17:46, kanou  wrote:

>
> It might be one idea to use concurrenthashmap.
> However, concurrenthashmap is API supported from JDK1.5.
> Moreover, I think that the Wicket1.3 series was JDK1.4 support.
>
> Therefore, I think that the method of exclusively controlling
> the method is suitable in this case(synchronized).
> --
> View this message in context:
> http://www.nabble.com/About-a-thread-safe-problem-of-the-WebApplication-class-tp21154813p21156901.html
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>