Details
Description
We have several web applications running, all use icefaces. We put icefaces jars and dependent jars in the global class path of the application server.
If the applications use different phase listeners defined in their faces-config.xml only the one deployed first is used for all web applications.
If the applications use different phase listeners defined in their faces-config.xml only the one deployed first is used for all web applications.
The issue was related to scoping variables as "static" in the LifecycleExecutor and its subclasses. In storing the JSF LifecycleFactory and our own specific executors (JsfLifecycleExecutor and SwfLifecycleExecutor) statically, it caused the noted problem when the libraries where deployed in a shared location on the app server. Due to classloading complexities, the application would end up with the same instances of the Lifecycle and Executors. Since they are responsible for running the JSF lifecycle (and, in turn, firing events to the PhaseListeners), having them as static would cause the first application to set the values for all applications.
I've changed the logic to remove the static scoping and store the desired executors in the application map. This should be nearly as efficient and allows each application to have it's own proper set of references.