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

        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
        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.
        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.
        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.
        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.

          People

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

            Dates

            • Created:
              Updated:
              Resolved: