Uploaded image for project: 'PUBLIC - Liferay Faces'
  1. PUBLIC - Liferay Faces
  2. FACES-1288

Memory leak when BridgeRequestScope created in RENDER_PHASE of portlet lifecycle

    Details

      Description

      The BridgeRequestScopeManagerImpl.getBridgeRequestScope(PortletConfig, PortletContext, PortletRequest, PortletResponse) method has a memory leak. However, this is only a problem when developers specify com.liferay.faces.bridge.bridgeRequestScopePreserved=true in the WEB-INF/portlet.xml descriptor (for more info, see FACES-219). The default value is false and so this probably isn't a serious issue for most portlets.

      The leak happens when the method is called during the RENDER_PHASE of portlet lifecycle. Specifically, after the BridgeRequestScope is instantiated, it is placed into the cache/map. But it should only be stored in the cache during the ACTION_PHASE, EVENT_PHASE, or RESOURCE_PHASE. No sense in storing it in the cache for a RENDER_PHASE since the lifespan of a BridgeRequestScope starts with an full postback action (most commonly), and with Ajax request (less commonly).

        Attachments

          Activity

            People

            • Assignee:
              neil.griffin Neil Griffin
              Reporter:
              neil.griffin Neil Griffin
              Participants of an Issue:
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Packages

                Version Package
                liferay-faces-3.0.0-legacy-ga1
                liferay-faces-3.0.0-ga1
                liferay-faces-3.1.0-ga1