Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-1671

MyFacesGenericPortlet is causing multiple instances of PhaseListeners to be created

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 1.1.4
    • None
    • Portlet_Support
    • None
    • WinXP / Liferay 4.3.0 / Tomcat 6.0.13 / Seam 1.2.1GA

    Description

      As described in this issue:
      http://jira.jboss.com/jira/browse/JBSEAM-1556

      When running in a portlet environment and using MyFaces, JSF PhaseListeners get registered TWICE, due to the way MyFaces initializes itself:

      1. MyFaces has a StartupServletContextListener that initializes the JSF framework (the first time).

      2. The MyFacesGenericPortlet.initMyFaces() method initializes the JSF framework (a second time).

      In order to fix this, the MyFacesGenericPortlet must do a better job at determining whether or not the JSF framework has been initialized. There is no need to add the PhaseListeners to the Lifecycle a second time. And in the case of Seam, this can actually cause a problem, because there can be only one Seam phase listener active (that extends Seam's AbstractSeamPhaseListener) at any given time. In the case of other portlet phase listeners (like FileUpload ones that parse mutlipart-formdata), uploaded files would get saved twice, I would imagine.

      Attachments

        Activity

          People

            Unassigned Unassigned
            ngriffin7a Neil Griffin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: