ICEfaces
  1. ICEfaces
  2. ICE-3488

Possible null value in group set of GroupAsyncRenderer

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.7.1
    • Fix Version/s: 1.7.2
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEfaces 1.7.1

      Description

      When adding a session using the SessionRenderer.addCurrentSession(String) method, it's possible that a WeakReference containing null is added to the GroupAsyncRenderer's group set due to an HttpSession not being there yet. When requesting a render the null value is not an instance of Renderable nor HttpSession ending up at the final check to see if it's a PortletSession causing the ClassNotFoundException to be thrown in a non-portal environment as mentioned in the forum.

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #17507 Fri Sep 05 16:15:32 MDT 2008 jack.van.ooststroom Fixed JIRA ICE-3488 : Possible null value in group set of GroupAsyncRenderer
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/async/render/GroupAsyncRenderer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #17508 Fri Sep 05 16:16:27 MDT 2008 jack.van.ooststroom Fixed JIRA ICE-3488 : Possible null value in group set of GroupAsyncRenderer
        Files Changed
        Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/core/src/com/icesoft/faces/async/render/GroupAsyncRenderer.java
        Jack Van Ooststroom created issue -
        Jack Van Ooststroom made changes -
        Field Original Value New Value
        Assignee Jack Van Ooststroom [ jack.van.ooststroom ]
        Jack Van Ooststroom made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        Hide
        Jack Van Ooststroom added a comment -

        Changed Fix Version(s) to 1.7.2

        Show
        Jack Van Ooststroom added a comment - Changed Fix Version(s) to 1.7.2
        Jack Van Ooststroom made changes -
        Fix Version/s 1.7.2 [ 10130 ]
        Hide
        Jack Van Ooststroom added a comment -

        Now when invoking addCurrentSession(String) a new session is created if there is no current session yet. Marking this one as FIXED.

        Show
        Jack Van Ooststroom added a comment - Now when invoking addCurrentSession(String) a new session is created if there is no current session yet. Marking this one as FIXED.
        Jack Van Ooststroom made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 1.7.2RC1 [ 10140 ]
        Fix Version/s 1.7.2 [ 10130 ]
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Assignee Priority P1
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #17511 Mon Sep 08 13:32:45 MDT 2008 jack.van.ooststroom Fixed JIRA ICE-3488 : Possible null value in group set of GroupAsyncRenderer; Changed the strategy: no session is created if there was no session, instead an IllegalStateException is thrown as addCurrentSession should always be called from threads executing the JSF lifecycle.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/async/render/GroupAsyncRenderer.java
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/org/icefaces/x/core/push/SessionRenderer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #17512 Mon Sep 08 13:33:38 MDT 2008 jack.van.ooststroom Fixed JIRA ICE-3488 : Possible null value in group set of GroupAsyncRenderer; Changed the strategy: no session is created if there was no session, instead an IllegalStateException is thrown as addCurrentSession should always be called from threads executing the JSF lifecycle.
        Files Changed
        Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/core/src/org/icefaces/x/core/push/SessionRenderer.java
        Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/core/src/com/icesoft/faces/async/render/GroupAsyncRenderer.java
        Hide
        Jack Van Ooststroom added a comment -

        Changed the strategy a bit. A new session is not created anymore when a session does not exist during the addCurrentSession invocation. Instead an IllegalStateException is thrown as the addCurrentSession method should always be called from threads executing the JSF lifecycle. Additionally, warn level messages are logged when either addCurrentSession or removeCurrentSession is invoked and no session exists. Marking this one as FIXED again.

        Show
        Jack Van Ooststroom added a comment - Changed the strategy a bit. A new session is not created anymore when a session does not exist during the addCurrentSession invocation. Instead an IllegalStateException is thrown as the addCurrentSession method should always be called from threads executing the JSF lifecycle. Additionally, warn level messages are logged when either addCurrentSession or removeCurrentSession is invoked and no session exists. Marking this one as FIXED again.
        Jack Van Ooststroom made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #17527 Tue Sep 09 10:48:03 MDT 2008 jack.van.ooststroom Fixed JIRA ICE-3488 : Possible null value in group set of GroupAsyncRenderer; WeakReference objects can point to null when sessions are cleaned up, these WeakReference objects are now removed from the Set.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/async/render/GroupAsyncRenderer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #17528 Tue Sep 09 10:48:30 MDT 2008 jack.van.ooststroom Fixed JIRA ICE-3488 : Possible null value in group set of GroupAsyncRenderer; WeakReference objects can point to null when sessions are cleaned up, these WeakReference objects are now removed from the Set.
        Files Changed
        Commit graph MODIFY /icefaces/branches/icefaces-1.7/icefaces/core/src/com/icesoft/faces/async/render/GroupAsyncRenderer.java
        Hide
        Jack Van Ooststroom added a comment -

        Reopening once again as the combination of CopyOnWriteArraySet and WeakReferences does not result in the WeakReferences being cleaned up automatically.

        Show
        Jack Van Ooststroom added a comment - Reopening once again as the combination of CopyOnWriteArraySet and WeakReferences does not result in the WeakReferences being cleaned up automatically.
        Jack Van Ooststroom made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Jack Van Ooststroom added a comment -

        It was still possible getting null-values as after session clean-up the contained WeakReferences will point to null. They are not automatically removed from the CopyOnWriteArraySet. Therefore, on each render call whenever a WeakReference is encountered that points to null, it is removed from the Set. Later on we could consider a more pro-active solution to clean the Set of these kind of WeakReferences. Marking this one as FIXED once again.

        Show
        Jack Van Ooststroom added a comment - It was still possible getting null-values as after session clean-up the contained WeakReferences will point to null. They are not automatically removed from the CopyOnWriteArraySet. Therefore, on each render call whenever a WeakReference is encountered that points to null, it is removed from the Set. Later on we could consider a more pro-active solution to clean the Set of these kind of WeakReferences. Marking this one as FIXED once again.
        Jack Van Ooststroom made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Fix Version/s 1.7.2 [ 10130 ]
        Fix Version/s 1.7.2RC1 [ 10140 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P1
        Assignee Jack Van Ooststroom [ jack.van.ooststroom ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Jack Van Ooststroom
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: