Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.7.1, 1.7.2
-
Component/s: Framework
-
Labels:None
-
Environment:Ajax Push
-
Support Case References:
-
Workaround Exists:Yes
-
Workaround Description:Ensure all render group creation is done on JSF threads.
Description
The code where this occurs is the constructor for GroupAsyncRenderer:
public GroupAsyncRenderer() {
applicationMap = FacesContext.getCurrentInstance().getExternalContext().getApplicationMap();
}
The applicationMap is only required to retrieve the ServletContext under certain circumstances when using the SessionRenderer. We need to refactor to ensure that the map is retrieved as lazily and reduntantly as possible, and only in situations when actually required.
public GroupAsyncRenderer() {
applicationMap = FacesContext.getCurrentInstance().getExternalContext().getApplicationMap();
}
The applicationMap is only required to retrieve the ServletContext under certain circumstances when using the SessionRenderer. We need to refactor to ensure that the map is retrieved as lazily and reduntantly as possible, and only in situations when actually required.
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
The offending FacesContext.getCurrentInstance() call is moved from the GroupAsyncRenderer's constructor to the requestRender(String) method. Additionally, guards are in place now warning the user when an invocation is done on a non-JSF thread to one of the methods that require the JSF context. Marking this one as FIXED.