-
Type:
Bug
-
Status: Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: richfaces-archetype-2.0.1, primefaces-archetype-2.0.1, jsf-archetype-2.0.1, icefaces-archetype-2.0.1, liferay-faces-2.1.5-ga6, liferay-faces-2.2.5-ga6, liferay-faces-3.0.5-legacy-ga6, liferay-faces-3.0.5-ga6, liferay-faces-3.1.5-ga6, liferay-faces-3.2.5-ga6, liferay-faces-4.2.5-ga6, alloy-1.0.0, alloy-2.0.0, alloy-3.0.0, portal-1.0.0, portal-2.0.0, portal-3.0.0, util-1.0.0, util-2.0.0, util-3.0.0, bridge-impl-2.0.0, bridge-impl-3.0.0, metal-1.0.0, bridge-ext-1.0.0, bridge-ext-2.0.0, bridge-ext-3.0.0, bridge-ext-5.0.0, facesbridge-api-5.0.0, bridge-api-2.0.0, bridge-api-3.0.0, bridge-api-4.0.0, showcase-2.0.0, bridge-impl-4.0.0, facesbridge-api-6.0.0, showcase-3.0.0, alloy-archetype-2.0.1, icefaces-archetype-3.0.1, alloy-archetype-3.0.1, alloy-archetype-5.0.1, icefaces-archetype-5.0.1, jsf-archetype-3.0.1, jsf-archetype-5.0.1, primefaces-archetype-3.0.1, primefaces-archetype-5.0.1, richfaces-archetype-3.0.1, richfaces-archetype-5.0.1
-
Fix Version/s: richfaces-archetype-2.0.2, primefaces-archetype-2.0.2, jsf-archetype-2.0.2, icefaces-archetype-2.0.2, alloy-1.0.1, alloy-2.0.1, portal-2.0.1, util-1.1.0, util-2.1.0, bridge-impl-2.1.0, metal-1.0.0, bridge-ext-1.0.1, bridge-ext-2.0.1, bridge-ext-3.0.1, facesbridge-api-5.0.0, bridge-impl-3.1.0, bridge-impl-4.1.0, util-3.1.0, facesbridge-api-6.0.0, portal-3.0.1, showcase-2.0.1, showcase-3.0.1, bridge-ext-5.0.1, bridge-ext-7.0.0, alloy-3.0.1, bridge-ext-8.0.0, icefaces-archetype-3.0.2, alloy-archetype-2.0.2, alloy-archetype-3.0.2, alloy-archetype-5.0.2, icefaces-archetype-5.0.2, jsf-archetype-3.0.2, jsf-archetype-5.0.2, primefaces-archetype-3.0.2, primefaces-archetype-5.0.2, richfaces-archetype-3.0.2, richfaces-archetype-5.0.2, bridge-api-2.1.0, bridge-api-3.1.0, bridge-api-4.1.0
-
Component/s: Alloy Archetype, FacesBridge API, ICEfaces Archetype, JSF Archetype, JSF Showcase, Liferay Faces Alloy / Showcase / Tests, Liferay Faces Bridge API, Liferay Faces Bridge Ext, Liferay Faces Bridge Impl / Demos / Tests, Liferay Faces Metal / Showcase / Tests, Liferay Faces Portal / Demos / Tests, Liferay Faces Util, PrimeFaces Archetype, RichFaces Archetype
-
Labels:None
The com.liferay.faces.util.factory.internal.FactoryExtensionFinderImpl class keeps a cache of factory instances in a HashMap. In order to move towards the goal of supporting Liferay Faces jars in the global classpath, it is necessary to store the cache in a ServletContext attribute.
This is also a concern in com.liferay.faces.bridge.config.internal.PortletConfigParamUtil and com.liferay.faces.util.config.WebConfigParamUtil, each of which keep a cache that depends on the ClassLoader rather than the ServletContext.
The main problem is that the com.liferay.faces.util.factory.FactoryExtensionFinder and com.liferay.face.bridge.BridgeFactoryFinder API does not accommodate passing PortletContext, ExternalContext, or ServletContext during factory registration or lookup. In addition, there is no concept of releasing factories during context destruction or when a portlet is taken out of service. Because of this, it will be necessary to modify the API with the following:
@Deprecated public static Object getFactory(Class<?> factoryClass) { // Replacement public static Object getFactory(ExternalContext externalContext, Class<?> factoryClass) { @Deprecated public abstract Object getFactoryInstance(Class<?> factoryClass); // Replacement public abstract Object getFactoryInstance(ExternalContext externalContext, Class<?> factoryClass); @Deprecated public abstract void registerFactory(ConfiguredElement configuredFactoryExtension); // Replacement public abstract void registerFactory(ExternalContext externalContext, ConfiguredElement configuredFactoryExtension); // New public abstract void releaseFactories(ExternalContext externalContext);
@Deprecated public static Object getFactory(Class<?> factoryClass) { // Replacement public static Object getFactory(PortletContext portletContext, Class<?> factoryClass) { @Deprecated public abstract Object getFactoryInstance(Class<?> factoryClass); // Replacement public abstract Object getFactoryInstance(PortletContext portletContext, Class<?> factoryClass); // New public abstract void releaseFactories(PortletContext portletContext);
- Testing discovered
-
LPS-69940 Servlet 3 spec. notifications shutdown order is not accomplished. SessionListener.sessionDestroyed is invoked after ServletContextListener.contextDestroyed on shutdown
- Closed