ICEfaces
  1. ICEfaces
  2. ICE-9357

ICE Renderers have thread unsafe instance field

    Details

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

      Description

      Similarly to ICE-9348, but involving the compat components.

      As reported in the forum, this renderer uses instance fields that they read from and write to during rendering:

      - SelectInputTextRenderer

      Additionally, auditing found a problem with:

      - OutputStyleRenderer

      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.

        Activity

        Mark Collette created issue -
        Mark Collette made changes -
        Field Original Value New Value
        Summary ICE Renderers have thrread unsafe instance field ICE Renderers have thread unsafe instance field
        Mark Collette made changes -
        Assignee Mark Collette [ mark.collette ]
        Mark Collette made changes -
        Assignee Priority P1 [ 10010 ]
        Hide
        Mark Collette added a comment - - edited

        Only these two were actually broken:

        icefaces3/compat/components/src/main/java/com/icesoft/faces/component/style/OutputStyleRenderer.java
        browserSpecificFilename

        /Users/mark/Documents/ICEsoft/trunk/icefaces3/compat/components/src/main/java/com/icesoft/faces/component/selectinputtext/SelectInputTextRenderer.java
        domUpdateMap

        The rest were ones that were alright but failed the stringent test set by ICE-9358.

        icefaces3 trunk
        Subversion 36235

        icefaces EE 3.3 branch tag
        Subversion 36240

        Show
        Mark Collette added a comment - - edited Only these two were actually broken: icefaces3/compat/components/src/main/java/com/icesoft/faces/component/style/OutputStyleRenderer.java browserSpecificFilename /Users/mark/Documents/ICEsoft/trunk/icefaces3/compat/components/src/main/java/com/icesoft/faces/component/selectinputtext/SelectInputTextRenderer.java domUpdateMap The rest were ones that were alright but failed the stringent test set by ICE-9358 . icefaces3 trunk Subversion 36235 icefaces EE 3.3 branch tag Subversion 36240
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #36235 Fri Jun 14 14:57:31 MDT 2013 mark.collette ICE-9357 : ICE Renderers have thread unsafe instance field
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/panelpositioned/PanelPositionedRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/panelpopup/PanelPopupRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/selectinputdate/SelectInputDateRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/ext/renderkit/GroupRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/core/src/main/java/com/icesoft/faces/renderkit/dom_html_basic/MenuRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/panelcollapsible/PanelCollapsibleRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/core/src/main/java/com/icesoft/faces/renderkit/dom_html_basic/FormRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/outputmedia/OutputMediaRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/ext/renderkit/InputTextRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/ext/renderkit/ImageRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/core/src/main/java/com/icesoft/faces/renderkit/dom_html_basic/OutputLinkRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/style/OutputStyleRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/effect/ApplyEffectRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/selectinputtext/SelectInputTextRenderer.java
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/outputprogress/OutputProgressRenderer.java
        Mark Collette made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Liana Munroe added a comment -

        No Issues found in IE7 & 9, FF 3.6 or Chrome

        Show
        Liana Munroe added a comment - No Issues found in IE7 & 9, FF 3.6 or Chrome
        Hide
        Jack Van Ooststroom added a comment -

        WebSphere Application Server 8.x doesn't like the FacesContext.getInstance() invocation in a static context:

        private static final String ID_SUFFIX = UINamingContainer.getSeparatorChar(FacesContext.getCurrentInstance()) + "j_idcl";

        This either needs to be a non-static, or the assignment needs to be done on a JSF thread in a non-static context.

        Show
        Jack Van Ooststroom added a comment - WebSphere Application Server 8.x doesn't like the FacesContext.getInstance() invocation in a static context: private static final String ID_SUFFIX = UINamingContainer.getSeparatorChar(FacesContext.getCurrentInstance()) + "j_idcl"; This either needs to be a non-static, or the assignment needs to be done on a JSF thread in a non-static context.
        Jack Van Ooststroom made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Jack Van Ooststroom added a comment -

        See ICE-7772 for additional info.

        Show
        Jack Van Ooststroom added a comment - See ICE-7772 for additional info.
        Hide
        Jack Van Ooststroom added a comment -

        Sending icefaces/compat/components/src/main/java/com/icesoft/faces/component/selectinputdate/SelectInputDateRenderer.java
        Transmitting file data .
        Committed revision 36439.

        Show
        Jack Van Ooststroom added a comment - Sending icefaces/compat/components/src/main/java/com/icesoft/faces/component/selectinputdate/SelectInputDateRenderer.java Transmitting file data . Committed revision 36439.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #36439 Thu Jun 27 14:43:06 MDT 2013 jack.van.ooststroom Fixed JIRA ICE-9357 : ICE Renderers have thread unsafe instance field
        Files Changed
        Commit graph MODIFY /icefaces3/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/selectinputdate/SelectInputDateRenderer.java
        Hide
        Jack Van Ooststroom added a comment -

        As ID_SUFFIX needs to be and static and final as a class member, I removed the class member altogether and replaced the two references to it with the actual code. Marking this one as FIXED again.

        Show
        Jack Van Ooststroom added a comment - As ID_SUFFIX needs to be and static and final as a class member, I removed the class member altogether and replaced the two references to it with the actual code. Marking this one as FIXED again.
        Jack Van Ooststroom made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Liana Munroe added a comment -

        Works on Tomcat7, IE 8, FF21, build 24

        Show
        Liana Munroe added a comment - Works on Tomcat7, IE 8, FF21, build 24
        Ken Fyten made changes -
        Fix Version/s 4.0 [ 11382 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Mark Collette
            Reporter:
            Mark Collette
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: