Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
liferay-faces-2.1.2-ga3, liferay-faces-3.0.2-legacy-ga3, liferay-faces-3.0.2-ga3, liferay-faces-3.1.2-ga3
-
None
Description
Part of the fix for FACES-1470 was discovering the Mojarra InjectionProvider. The original mechanism was to have BridgeSessionListener.java discover it during context initialization, but that only worked if the Mojarra ConfigureListener was explicitly registered in WEB-INF/web.xml descriptor before the BridgeSessionListener, like this:
<listener> <listener-class>com.sun.faces.config.ConfigureListener</listener-class> </listener> <listener> <listener-class>com.liferay.faces.bridge.servlet.BridgeSessionListener</listener-class> </listener>
In fact, this led to adding the aforementioned markup to WEB-INF/web.xml in the Liferay Faces demo portlets (FACES-1483), Maven Archetypes (MAVEN-78), and Plugins SDK Templates (LPS-36125).
In addition, a special issue was create (FACES-1511) in order to direct developers to a place where they could investigate how to fix the "Unable to determine Mojarra InjectionProvider" warning in the server console.
But upon closer inspection of the Mojarra source code, it turns out that ApplicationAssociate().getInstance(ExternalContext).getInjectionProvider() can be called either during context initialization, or during execution of the JSF lifecycle.
The main benefit is that if ConfigureListener and BridgeSessionListener are not explicitly specified in the WEB-INF/web.xml descriptor (in that order), then Liferay Faces Bridge will still be able to discover the Mojarra InjectionProvider.
An additional benefit is that ConfigureListener does not need to appear in the WEB-INF/web.xml descriptor, since the jsf-impl.jar dependency has a TLD file that declares the Mojarra ConfigureListener in a TLD <listener> element.
Thanks to FACES-1655, the BridgeSessionListener will not need to appear in the WEB-INF/web.xml descriptor either.
Attachments
Issue Links
- is related to
-
FACES-1470 Memory leak for RequestScoped, SessionScoped, and ViewScoped managed-beans when running under Mojarra + JBoss AS
-
- Closed
-
-
FACES-1511 Warning in console log during JSF portlet deployment: Unable to determine Mojarra InjectionProvider
-
- Closed
-
-
FACES-1634 Warning in GlassFish console log: Unable to determine Mojarra InjectionProvider
-
- Closed
-
-
LPS-36125 Upgrade Plugins SDK JSF portlet templates to Liferay Faces 3.1.2-ga3
- Closed
-
FACES-1483 Explicitly specify Mojarra ConfigureListener and Liferay Faces BridgeSessionListener in WEB-IN/web.xml descriptor of demo and issue portlets
-
- Closed
-
-
MAVEN-78 Upgrade JSF portlet archetypes to Liferay Faces 3.1.2-ga3
-
- Closed
-
-
FACES-1655 Enable zero-config of com.liferay.faces.bridge.servlet.BridgeSessionListener by registering it in liferay-faces-bridge-impl!META-INF/bridge.tld
-
- Closed
-
- relates
-
FACES-1666 Remove Mojarra ConfigureListener and Liferay Faces BridgeSessionListener from WEB-INF/web.xml descriptor of demo/issue/test portlets
-
- Closed
-