Class GlassFishInjectionProvider
- java.lang.Object
-
- com.sun.faces.spi.DiscoverableInjectionProvider
-
- fish.payara.server.internal.admingui.GlassFishInjectionProvider
-
- All Implemented Interfaces:
com.sun.faces.spi.AnnotationScanner,com.sun.faces.spi.HighAvailabilityEnabler,com.sun.faces.spi.InjectionProvider,com.sun.faces.spi.ThreadContext
public class GlassFishInjectionProvider extends com.sun.faces.spi.DiscoverableInjectionProvider implements com.sun.faces.spi.AnnotationScanner, com.sun.faces.spi.HighAvailabilityEnabler, com.sun.faces.spi.ThreadContextThis
InjectionProvideris specific to the Payara/GlassFish/SJSAS 9.x PE/EE application servers.
-
-
Constructor Summary
Constructors Constructor Description GlassFishInjectionProvider(jakarta.servlet.ServletContext servletContext)Constructs a newGlassFishInjectionProviderinstance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearChildContext()voidenableHighAvailability(jakarta.servlet.ServletContext ctx)Method to test with HA has been enabled.Map<String,List<com.sun.faces.spi.AnnotationScanner.ScannedAnnotation>>getAnnotatedClassesInCurrentModule(jakarta.servlet.ServletContext servletContext)ObjectgetParentWebContext()voidinject(Object managedBean)The implementation of this method must perform the following steps: Inject the supported resources per the Servlet 2.5 specification into the provided objectvoidinvokePostConstruct(Object managedBean)The implemenation of this method must invoke any method marked with the@PostConstructannotation (per the Common Annotations Specification).voidinvokePreDestroy(Object managedBean)The implemenation of this method must invoke any method marked with the@PreDestroyannotation (per the Common Annotations Specification).voidpropagateWebContextToChild(Object context)
-
-
-
Method Detail
-
getAnnotatedClassesInCurrentModule
public Map<String,List<com.sun.faces.spi.AnnotationScanner.ScannedAnnotation>> getAnnotatedClassesInCurrentModule(jakarta.servlet.ServletContext servletContext) throws com.sun.faces.spi.InjectionProviderException
- Specified by:
getAnnotatedClassesInCurrentModulein interfacecom.sun.faces.spi.AnnotationScanner- Throws:
com.sun.faces.spi.InjectionProviderException
-
inject
public void inject(Object managedBean) throws com.sun.faces.spi.InjectionProviderException
The implementation of this method must perform the following steps:
- Inject the supported resources per the Servlet 2.5 specification into the provided object
- Specified by:
injectin interfacecom.sun.faces.spi.InjectionProvider- Parameters:
managedBean- the target managed bean- Throws:
com.sun.faces.spi.InjectionProviderException
-
invokePostConstruct
public void invokePostConstruct(Object managedBean) throws com.sun.faces.spi.InjectionProviderException
The implemenation of this method must invoke any method marked with the
@PostConstructannotation (per the Common Annotations Specification).- Specified by:
invokePostConstructin interfacecom.sun.faces.spi.InjectionProvider- Parameters:
managedBean- the target managed bean- Throws:
com.sun.faces.spi.InjectionProviderException- if an error occurs when invoking the method annotated by the@PostConstructannotation
-
invokePreDestroy
public void invokePreDestroy(Object managedBean) throws com.sun.faces.spi.InjectionProviderException
The implemenation of this method must invoke any method marked with the
@PreDestroyannotation (per the Common Annotations Specification).- Specified by:
invokePreDestroyin interfacecom.sun.faces.spi.InjectionProvider- Parameters:
managedBean- the target managed bean- Throws:
com.sun.faces.spi.InjectionProviderException
-
getParentWebContext
public Object getParentWebContext()
- Specified by:
getParentWebContextin interfacecom.sun.faces.spi.ThreadContext
-
propagateWebContextToChild
public void propagateWebContextToChild(Object context)
- Specified by:
propagateWebContextToChildin interfacecom.sun.faces.spi.ThreadContext
-
clearChildContext
public void clearChildContext()
- Specified by:
clearChildContextin interfacecom.sun.faces.spi.ThreadContext
-
enableHighAvailability
public void enableHighAvailability(jakarta.servlet.ServletContext ctx)
Method to test with HA has been enabled. If so, then set the JSF context param com.sun.faces.enableAgressiveSessionDirtying to true- Specified by:
enableHighAvailabilityin interfacecom.sun.faces.spi.HighAvailabilityEnabler- Parameters:
ctx-
-
-