ICEfaces
  1. ICEfaces
  2. ICE-4839

Views and request-scoped beans can be orphaned if all portlets are not fully rendered

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8.1
    • Fix Version/s: 1.8.2-RC1, 1.8.2
    • Component/s: Documentation, Framework
    • Labels:
      None
    • Environment:
      portal portlet

      Description

      In a normal use case, when you navigate away from a normal ICEfaces page, the client bridge attempts to dispose the views on that page along with any request-scoped beans that are associated with it. With portlets there can be 1 or more views that are registered and the dispose-views request will send all the views on that page.

      However if you a number of portlets on the page and navigate away from the portal page before it's had a chance to render all the portlets, the views that have not yet been rendered (along with their request-scoped beans) will be orphaned. This is due to the fact that the server-side objects (views and request beans) are created for all the portlets but the ones that are not rendered don't get a chance to register themselves with the client bridge. This means that when the dispose-views is issued, it only includes the views that it knows about (ie the ones that have been rendered).

        Activity

        Deryk Sinotte created issue -
        Hide
        Deryk Sinotte added a comment -

        Associating with SalesForce ticket

        Show
        Deryk Sinotte added a comment - Associating with SalesForce ticket
        Deryk Sinotte made changes -
        Field Original Value New Value
        Estimated Complexity High
        Salesforce Case [50070000009M3AS]
        Fix Version/s 1.8.2 [ 10190 ]
        Assignee Priority P1
        Assignee Deryk Sinotte [ deryk.sinotte ]
        Hide
        Deryk Sinotte added a comment -

        The approach we are going to try is to associate views on the same page and track them together. If one view is disposed, we'll check for associated views and dispose them all. This requires an attempt to use a common identifier of some kind. Since the portlet spec/api doesn't provide direct access to this information, we'll likely need to use container specific mechanisms. As per the customer's environment, we'll first target JBoss Portal 2.7.

        Show
        Deryk Sinotte added a comment - The approach we are going to try is to associate views on the same page and track them together. If one view is disposed, we'll check for associated views and dispose them all. This requires an attempt to use a common identifier of some kind. Since the portlet spec/api doesn't provide direct access to this information, we'll likely need to use container specific mechanisms. As per the customer's environment, we'll first target JBoss Portal 2.7.
        Hide
        Deryk Sinotte added a comment -

        One use case that this does not cover is if the portal page is requested but there is enough delay (due to a long running process for example) to prevent even a single portlet from rendering but the user navigates away (for example clicking a different portal tab). In this case, it's possible for 1 or all of the portlet views/beans to be created on the server but since not a single instance of the bridge is created on the client, there will never be a dispose-views request made. In this case, each set of view+beans that was created will be orphaned. At this point, not quite sure how to avoid this.

        Show
        Deryk Sinotte added a comment - One use case that this does not cover is if the portal page is requested but there is enough delay (due to a long running process for example) to prevent even a single portlet from rendering but the user navigates away (for example clicking a different portal tab). In this case, it's possible for 1 or all of the portlet views/beans to be created on the server but since not a single instance of the bridge is created on the client, there will never be a dispose-views request made. In this case, each set of view+beans that was created will be orphaned. At this point, not quite sure how to avoid this.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19213 Thu Sep 03 09:52:04 MDT 2009 deryk.sinotte ICE-4839: Initial checkin to support disposing of all views associated with a single page (typically portal pages)
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/MainSessionBoundServlet.java
        Commit graph ADD /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/portlet/page/AssociatedPageViewsImpl.java
        Commit graph ADD /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/portlet/page/NoOpAssociatedPageViews.java
        Commit graph ADD /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/portlet/page/ViewsPageBidiMap.java
        Commit graph ADD /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/portlet/page/AssociatedPageViews.java
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/core/DisposeViews.java
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/core/MultiViewServer.java
        Commit graph ADD /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/portlet/page
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19214 Thu Sep 03 09:54:47 MDT 2009 deryk.sinotte ICE-4839: JBoss implementation of AssociatedPageViews
        Files Changed
        Commit graph ADD /projects/portletviews/trunk/src/com
        Commit graph ADD /projects/portletviews/trunk/lib/jboss/portal-api-lib.jar
        Commit graph ADD /projects/portletviews/trunk/src/com/icesoft/faces/webapp/http/portlet/page/JBossAssociatedPageViews.java
        Commit graph ADD /projects/portletviews/trunk/src/com/icesoft
        Commit graph ADD /projects/portletviews/trunk/src
        Commit graph ADD /projects/portletviews/trunk/src/com/icesoft/faces/webapp/http/portlet/page
        Commit graph ADD /projects/portletviews
        Commit graph ADD /projects/portletviews/trunk/build.xml
        Commit graph ADD /projects/portletviews/trunk/lib
        Commit graph ADD /projects/portletviews/trunk/build.properties
        Commit graph ADD /projects/portletviews/trunk/src/com/icesoft/faces/webapp/http/portlet
        Commit graph ADD /projects/portletviews/trunk/src/com/icesoft/faces
        Commit graph ADD /projects/portletviews/trunk/lib/jboss
        Commit graph ADD /projects/portletviews/trunk/src/com/icesoft/faces/webapp/http
        Commit graph ADD /projects/portletviews/trunk/lib/jboss/portlet-container.jar
        Commit graph ADD /projects/portletviews/trunk/src/com/icesoft/faces/webapp
        Commit graph ADD /projects/portletviews/trunk/lib/jboss/portal-core-lib.jar
        Commit graph ADD /projects/portletviews/trunk
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #19220 Thu Sep 03 16:05:19 MDT 2009 deryk.sinotte ICE-4839: added readme.txt to explain purpose of this project
        Files Changed
        Commit graph ADD /projects/portletviews/trunk/readme.txt
        Hide
        Deryk Sinotte added a comment -

        I've committed the changes to support disposing of associated views.

        The non-container specific extension point code is r19213 and is now included in core.
        The container specific stuff is r19214 and checked under ossrepo/projects/portletviews.

        This means that the core framework now has a non-specific extension point from which to add container specific implementations.

        Show
        Deryk Sinotte added a comment - I've committed the changes to support disposing of associated views. The non-container specific extension point code is r19213 and is now included in core. The container specific stuff is r19214 and checked under ossrepo/projects/portletviews. This means that the core framework now has a non-specific extension point from which to add container specific implementations.
        Deryk Sinotte made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Deryk Sinotte added a comment -

        To specify the platform-specific logic for determining which page a portlet view is associated with, you use the following context parameter:

        <context-param>
        <param-name>com.icesoft.faces.portlet.associatedPageViewsImpl</param-name>
        <param-value>com.icesoft.faces.webapp.http.portlet.page.JBossAssociatedPageViews</param-value>
        </context-param>

        The value should be a fully-qualified class name that extends the com.icesoft.faces.webapp.http.portlet.page.AssociatedPageViewsImpl.

        Show
        Deryk Sinotte added a comment - To specify the platform-specific logic for determining which page a portlet view is associated with, you use the following context parameter: <context-param> <param-name>com.icesoft.faces.portlet.associatedPageViewsImpl</param-name> <param-value>com.icesoft.faces.webapp.http.portlet.page.JBossAssociatedPageViews</param-value> </context-param> The value should be a fully-qualified class name that extends the com.icesoft.faces.webapp.http.portlet.page.AssociatedPageViewsImpl.
        Deryk Sinotte made changes -
        Component/s  Documentation [ 10018 ]
        Ken Fyten made changes -
        Fix Version/s 1.8.2-RC1 [ 10210 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Priority P1
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #21464 Mon May 24 18:04:15 MDT 2010 deryk.sinotte ICE-4839: Add support for disposing associated views in Liferay against patch branch for IBM Belgium
        Files Changed
        Commit graph MODIFY /icefaces/scratchpads/patches/SF8080/icefaces/core/src/com/icesoft/faces/webapp/http/core/DisposeViews.java
        Commit graph ADD /icefaces/scratchpads/patches/SF8080/icefaces/core/src/com/icesoft/faces/webapp/http/portlet/page/LiferayAssociatedPageViews.java
        Commit graph MODIFY /icefaces/scratchpads/patches/SF8080/icefaces/core/src/com/icesoft/faces/context/View.java
        Commit graph ADD /icefaces/scratchpads/patches/SF8080/icefaces/core/src/com/icesoft/faces/webapp/http/portlet/page/AssociatedPageViews.java
        Commit graph ADD /icefaces/scratchpads/patches/SF8080/icefaces/core/src/com/icesoft/faces/webapp/http/portlet/page/NoOpAssociatedPageViews.java
        Commit graph MODIFY /icefaces/scratchpads/patches/SF8080/icefaces/core/build.xml
        Commit graph ADD /icefaces/scratchpads/patches/SF8080/icefaces/core/src/com/icesoft/faces/webapp/http/portlet/page
        Commit graph MODIFY /icefaces/scratchpads/patches/SF8080/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/MainSessionBoundServlet.java
        Commit graph ADD /icefaces/scratchpads/patches/SF8080/icefaces/core/src/com/icesoft/faces/webapp/http/portlet/page/ViewsPageBidiMap.java
        Commit graph ADD /icefaces/scratchpads/patches/SF8080/icefaces/core/src/com/icesoft/faces/webapp/http/portlet/page/AssociatedPageViewsImpl.java
        Commit graph MODIFY /icefaces/scratchpads/patches/SF8080/icefaces/core/src/com/icesoft/faces/webapp/http/core/MultiViewServer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #21471 Tue May 25 11:01:49 MDT 2010 deryk.sinotte ICE-4839: Add support for disposing associated views in Liferay against patch branch for IBM Belgium
        Files Changed
        Commit graph MODIFY /icefaces/scratchpads/patches/SF8080/icefaces/core/src/com/icesoft/faces/context/View.java
        Commit graph MODIFY /icefaces/scratchpads/patches/SF8080/icefaces/core/src/com/icesoft/faces/webapp/http/core/MultiViewServer.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #21474 Tue May 25 13:06:02 MDT 2010 deryk.sinotte ICE-4839: add in liferay library that platform specific code depends on
        Files Changed
        Commit graph ADD /icefaces/scratchpads/patches/SF8080/icefaces/lib/liferay/portal-service.jar
        Commit graph ADD /icefaces/scratchpads/patches/SF8080/icefaces/lib/liferay
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #21481 Wed May 26 10:51:14 MDT 2010 deryk.sinotte ICE-4839: add support for Liferay from original customer patches to 1.7
        Files Changed
        Commit graph MODIFY /projects/portletviews/trunk/src/com/icesoft/faces/webapp/http/portlet/page/JBossAssociatedPageViews.java
        Commit graph ADD /projects/portletviews/trunk/lib/liferay
        Commit graph MODIFY /projects/portletviews/trunk/build.xml
        Commit graph ADD /projects/portletviews/trunk/src/com/icesoft/faces/webapp/http/portlet/page/LiferayAssociatedPageViews.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #21484 Wed May 26 14:40:22 MDT 2010 deryk.sinotte ICE-4839: additional view disposal logging
        Files Changed
        Commit graph MODIFY /icefaces/scratchpads/patches/SF8080/icefaces/core/src/com/icesoft/faces/webapp/http/core/DisposeViews.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #21496 Wed May 26 16:41:36 MDT 2010 deryk.sinotte ICE-4839: updated view disposal logic to support Liferay
        Files Changed
        Commit graph MODIFY /icefaces/scratchpads/patches/SF-8988a/icefaces/core/src/com/icesoft/faces/webapp/http/core/MultiViewServer.java
        Commit graph MODIFY /icefaces/scratchpads/patches/SF-8988a/icefaces/core/src/com/icesoft/faces/webapp/http/portlet/page/AssociatedPageViewsImpl.java
        Commit graph MODIFY /icefaces/scratchpads/patches/SF-8988a/icefaces/core/src/com/icesoft/faces/webapp/http/portlet/page/NoOpAssociatedPageViews.java
        Commit graph MODIFY /icefaces/scratchpads/patches/SF-8988a/icefaces/core/src/com/icesoft/faces/webapp/http/portlet/page/AssociatedPageViews.java
        Commit graph MODIFY /icefaces/scratchpads/patches/SF-8988a/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/MainSessionBoundServlet.java
        Commit graph MODIFY /icefaces/scratchpads/patches/SF-8988a/icefaces/core/src/com/icesoft/faces/context/View.java
        Commit graph MODIFY /icefaces/scratchpads/patches/SF-8988a/icefaces/core/src/com/icesoft/faces/webapp/http/core/DisposeViews.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #21524 Fri May 28 11:07:54 MDT 2010 deryk.sinotte ICE-4839: adding associated views fix to 1.8.2 EE patch
        Files Changed
        Commit graph MODIFY /icefaces/scratchpads/patches/SF-8988-EE_p01/icefaces/core/src/com/icesoft/faces/webapp/http/core/MultiViewServer.java
        Commit graph MODIFY /icefaces/scratchpads/patches/SF-8988-EE_p01/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/MainSessionBoundServlet.java
        Commit graph MODIFY /icefaces/scratchpads/patches/SF-8988-EE_p01/icefaces/core/src/com/icesoft/faces/webapp/http/portlet/page/AssociatedPageViews.java
        Commit graph MODIFY /icefaces/scratchpads/patches/SF-8988-EE_p01/icefaces/core/src/com/icesoft/faces/context/View.java
        Commit graph MODIFY /icefaces/scratchpads/patches/SF-8988-EE_p01/icefaces/core/src/com/icesoft/faces/webapp/http/portlet/page/NoOpAssociatedPageViews.java
        Commit graph MODIFY /icefaces/scratchpads/patches/SF-8988-EE_p01/icefaces/core/src/com/icesoft/faces/webapp/http/portlet/page/AssociatedPageViewsImpl.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #21828 Wed Jun 30 16:24:03 MDT 2010 deryk.sinotte ICE-4839: bring relevant adjustments from customer patch to 1.8 trunk
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/servlet/MainSessionBoundServlet.java
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/portlet/page/AssociatedPageViewsImpl.java
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/portlet/page/NoOpAssociatedPageViews.java
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/portlet/page/AssociatedPageViews.java
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/core/DisposeViews.java
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/core/MultiViewServer.java
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/context/View.java

          People

          • Assignee:
            Deryk Sinotte
            Reporter:
            Deryk Sinotte
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: