Uploaded image for project: 'PUBLIC - Liferay Faces'
  1. PUBLIC - Liferay Faces
  2. FACES-1656

Provide ability to discover Mojarra InjectionProvider during execution of the JSF lifecycle

Details

    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&gt;com.sun.faces.config.ConfigureListener</listener-class&gt;
      </listener>
      <listener>
          <listener-class&gt;com.liferay.faces.bridge.servlet.BridgeSessionListener</listener-class&gt;
      </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

          Activity

            People

              neil.griffin Neil Griffin
              neil.griffin Neil Griffin
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Packages

                  Version Package
                  liferay-faces-2.1.3-ga4
                  liferay-faces-3.0.3-legacy-ga4
                  liferay-faces-3.0.3-ga4
                  liferay-faces-3.1.3-ga4