You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Neil Griffin (JIRA)" <de...@myfaces.apache.org> on 2007/06/27 21:35:26 UTC
[jira] Created: (MYFACES-1671) MyFacesGenericPortlet is causing
multiple instances of PhaseListeners to be created
MyFacesGenericPortlet is causing multiple instances of PhaseListeners to be created
-----------------------------------------------------------------------------------
Key: MYFACES-1671
URL: https://issues.apache.org/jira/browse/MYFACES-1671
Project: MyFaces Core
Issue Type: Bug
Components: Portlet_Support
Affects Versions: 1.1.4
Environment: WinXP / Liferay 4.3.0 / Tomcat 6.0.13 / Seam 1.2.1GA
Reporter: Neil Griffin
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.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.