Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(14)

Issue 471041: Fix the logic for Context class with ThreadLocal (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 10 months ago by henry.saputra
Modified:
15 years, 9 months ago
Reviewers:
Base URL:
http://svn.apache.org/repos/asf/click/trunk/click
Visibility:
Public.

Description

In the Context class, it has a ThreadLocal with type ContextStack which suppose to contain list of contexts created. However, since Click is using Servlet mechanism, each request comes in is processed by a separate thread so no need to use ContextStack to store the Context instance. By definition of Context, it is a request scope instance that is used manage context during a request to Click servlet. So by just using ThreadLocal<Context> it could could serve the purpose of having a single instance of Context during the life of the request to Click.

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -119 lines) Patch
framework/src/org/apache/click/ClickServlet.java View 2 chunks +2 lines, -4 lines 0 comments Download
framework/src/org/apache/click/Context.java View 8 chunks +27 lines, -110 lines 0 comments Download
mock/src/org/apache/click/MockContainer.java View 3 chunks +3 lines, -3 lines 0 comments Download
mock/src/org/apache/click/MockContext.java View 2 chunks +2 lines, -2 lines 0 comments Download

Messages

Total messages: 1
henry.saputra
15 years, 10 months ago (2010-03-12 07:44:54 UTC) #1

          
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b