-
Type:
Task
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: facesbridge-spec-5.0.0
-
Component/s: FacesBridge Spec
-
Labels:None
This issue serves as a task for adding a new chapter titled "Factories" to the Bridge Spec which should document the additions to the API as described in the following issues:
FACES-2536: BridgeFactoryFinderFACES-2595: BridgeConfigFactoryFACES-2657: BridgeURLFactoryFACES-2679: BridgePortletRequestFactory / BridgePortletResponseFactoryFACES-2684: BridgePortletConfigFactory / BridgePortletContextFactoryFACES-2692: RequestAttributeInspectorFactoryFACES-2778: BridgeEventHandlerFactory / BridgePublicRenderParameterHandlerFactory
The new chapter must also state that bridge implementations must scan the classpath when a listener receives notification of javax.faces.event.PostConstructApplicationEvent.
Also, the chapter must describe that the javax.portlet.faces.BridgeFactoryFinder may not be called at the time of portlet/bridge initialization, such as when the Bridge.init(PortletConfig) method is called. This is caused by the fact that the Portlet Specification does not require portlet container implementations to ensure that ServletContextListeners (like the Mojarra ConfigureListener) execute before portlets are initialized. While this is indeed the case with Apache Pluto (the reference implementation), it is not the case with Liferay Portal. As a result, the javax.portlet.faces.BridgeFactoryFinder can only be used to find factories during request/response processing. This also has the effect of preventing factories from returning objects that are guaranteed to be stateless, thread-safe singletons unless the factories use a thread-safe double-checked locking pattern to initialize the objects.
The following factories return singletons:
- BridgeFactoryFinder
The following factories do not return singletons:
- BridgeConfigFactory
- BridgeEventHandlerFactory
- BridgePublicRenderParameterHandlerFactory
- BridgePortletConfigFactory
- BridgePortletContextFactory
- BridgeURLFactory
- HeadResponseWriterFactory
- BridgePortletRequestFactory
- BridgePortletResponseFactory
- RequestAttributeInspectorFactory
- relates
-
FACES-2536 Add javax.portlet.faces.BridgeFactoryFinder to the Bridge API
-
- Closed
-