users@glassfish.java.net

In wich order and by who PhaseListeners get called (faces-config.xml files)

From: <glassfish_at_javadesktop.org>
Date: Fri, 20 Jun 2008 06:24:59 PDT

Hi; please could some one tell us by who and how are the differents PhaseListeners constructors called by the Glassfish server while deploying ?

My probleme is that I've seen in a sample project (a ear demonstration Seam uses under Glassfish) that when jsf-extensions-dynamic-faces-0.1.jar is in the project libs the app fails ( an exception ..two SeamPhaseListener installed...)

All this seams because of the handling done with the PhaseListeners instanciations.
So being able to change the order in which this is done will resolve the (blocking) issue

As for me this has to do with the way the server collects all faces-config.xml presents in the ear
I got mine
stating this :
[i]<lifecycle>
        <phase-listener>
            org.jboss.seam.jsf.SeamPhaseListener
        </phase-listener>
</lifecycle>[/i]

and in jsf-extensions-dynamic-faces-0.1.jar there is another faces-config.xml
and so may be in other jars...


Seems like Glassfish is instantiating mine once then again when dealing with the faces-config in jsf-extensions-dynamic-faces-0.1.jar

I post here an excerpt from jsf-extensions-dynamic-faces-0.1.jar's faces-config in case ypu can see what is conflicting with
 <lifecycle>
        <phase-listener>
            org.jboss.seam.jsf.SeamPhaseListener
        </phase-listener>
</lifecycle>


Regards.


[i]<faces-config xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
    version="1.2">

    <application>
      <state-manager>com.sun.faces.extensions.avatar.application.DeferredStateManager</state-manager>
    </application>

    <factory>
      <lifecycle-factory>com.sun.faces.extensions.avatar.lifecycle.ExtensionsLifecycleFactoryImpl</lifecycle-factory>
    </factory>

    <component>
....
.....
...
</component>


  <render-kit>

    <renderer>
        <component-family>com.sun.faces.extensions.avatar.Scripts</component-family>
        <renderer-type>com.sun.faces.extensions.avatar.Scripts</renderer-type>
        <renderer-class>com.sun.faces.extensions.avatar.renderkit.ScriptsRenderer</renderer-class>
    </renderer>

    <renderer>
        <component-family>com.sun.faces.AjaxZone</component-family>
        <renderer-type>com.sun.faces.AjaxZone</renderer-type>
        <renderer-class>com.sun.faces.extensions.avatar.renderkit.AjaxZoneRenderer</renderer-class>
    </renderer>
    
  </render-kit>

</faces-config>[/i]
[Message sent by forum member 'hagbc' (hagbc)]

http://forums.java.net/jive/thread.jspa?messageID=281609