ICEfaces
  1. ICEfaces
  2. ICE-9348

ACE Renderers have thread unsafe instance field

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • Fix Version/s: EE-3.3.0.GA, 4.0.BETA, 4.0
    • Component/s: ACE-Components
    • Labels:
      None
    • Environment:
      ACE

      Description

      As reported in the forum, these renderers use instance fields that they read from and write to during rendering:

      - TextAreaEntryRenderer
      - SliderEntryRenderer
      - PanelRenderer
      - DateTimeEntryRenderer
      - CheckboxButtonRenderer
      - CellEditorRenderer

      A common pattern found in some of them is to use this code:

      public class DateTimeEntryRenderer extends InputRenderer {
          private Map<String, Object> domUpdateMap = new HashMap<String, Object>();

      Which involves the encode methods using the domUpdateMap to create a hashcode. The domUpdateMap should be declared inside the methods, which might involve re-arranging code between the encodeBegin and encodeEnd methods.

      Renderers are application scoped, and can be used simultaneously by different requests / lifecycles. They should never use instance fields that are written to and then read from during a discrete render, since the same Renderer instance is used across threads for different views and users.

      We'll need to audit all of our ACE Renderers, as the forum posting might not have been comprehensive.

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #36260 Mon Jun 17 14:12:42 MDT 2013 nils.lundquist ICE-9348 - Changed useless uiParamChildren variable placement.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/checkboxbutton/CheckboxButtonRenderer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #36254 Mon Jun 17 11:18:54 MDT 2013 nils.lundquist ICE-9348 - Changed use of $.attr('value') for $ val()
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/resources/icefaces.ace/list/list.js
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #36238 Fri Jun 14 15:12:16 MDT 2013 mark.collette ICE-9348 : ACE Renderers have thread unsafe instance field
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/core/src/main/java/org/icefaces/impl/renderkit/html_basic/SingleSubmitRenderer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #36236 Fri Jun 14 15:02:07 MDT 2013 mark.collette ICE-9348 : ACE Renderers have thread unsafe instance field
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/fileentry/FileEntryRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/linkbutton/LinkButtonRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/datatable/DataTableRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/tabset/TabSetRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/roweditor/RowEditorRenderer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #36218 Thu Jun 13 13:42:40 MDT 2013 yip.ng ICE-9348: ACE Renderers have thread unsafe instance field.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/message/MessageRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/growlmessages/GrowlMessagesRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/growlmessages/GrowlMessagesMeta.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/messages/MessagesRenderer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #36217 Thu Jun 13 12:37:22 MDT 2013 art.zambrano ICE-9348 ACE Renderers have thread unsafe instance field
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/sliderentry/SliderEntryRenderer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #36203 Wed Jun 12 17:55:09 MDT 2013 yip.ng ICE-9348: ACE Renderers have thread unsafe instance field.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/textareaentry/TextAreaEntryRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/renderkit/InputRenderer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #36201 Wed Jun 12 17:49:21 MDT 2013 art.zambrano ICE-9348 ACE Renderers have thread unsafe instance field
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/panel/PanelRenderer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #36194 Wed Jun 12 17:06:33 MDT 2013 yip.ng ICE-9348: ACE Renderers have thread unsafe instance field.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/datetimeentry/DateTimeEntryRenderer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #36189 Wed Jun 12 15:49:17 MDT 2013 nils.lundquist ICE-9348 - Removed CellEditorRenderer state.
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/ace/component/src/org/icefaces/ace/component/celleditor/CellEditorRenderer.java

          People

          • Assignee:
            Nils Lundquist
            Reporter:
            Mark Collette
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: