Package org.glassfish.faces.integration
Class GlassFishInjectionProvider
- java.lang.Object
-
- com.sun.faces.spi.DiscoverableInjectionProvider
-
- org.glassfish.faces.integration.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.ThreadContext
This
InjectionProvider
is specific to the Payara/GlassFish/SJSAS 9.x PE/EE application servers.
-
-
Constructor Summary
Constructors Constructor Description GlassFishInjectionProvider(jakarta.servlet.ServletContext servletContext)
Constructs a newGlassFishInjectionProvider
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearChildContext()
void
enableHighAvailability(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)
Object
getParentWebContext()
void
inject(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 objectvoid
invokePostConstruct(Object managedBean)
The implemenation of this method must invoke any method marked with the@PostConstruct
annotation (per the Common Annotations Specification).void
invokePreDestroy(Object managedBean)
The implemenation of this method must invoke any method marked with the@PreDestroy
annotation (per the Common Annotations Specification).void
propagateWebContextToChild(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:
getAnnotatedClassesInCurrentModule
in 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:
inject
in 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
@PostConstruct
annotation (per the Common Annotations Specification).- Specified by:
invokePostConstruct
in 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@PostConstruct
annotation
-
invokePreDestroy
public void invokePreDestroy(Object managedBean) throws com.sun.faces.spi.InjectionProviderException
The implemenation of this method must invoke any method marked with the
@PreDestroy
annotation (per the Common Annotations Specification).- Specified by:
invokePreDestroy
in interfacecom.sun.faces.spi.InjectionProvider
- Parameters:
managedBean
- the target managed bean- Throws:
com.sun.faces.spi.InjectionProviderException
-
getParentWebContext
public Object getParentWebContext()
- Specified by:
getParentWebContext
in interfacecom.sun.faces.spi.ThreadContext
-
propagateWebContextToChild
public void propagateWebContextToChild(Object context)
- Specified by:
propagateWebContextToChild
in interfacecom.sun.faces.spi.ThreadContext
-
clearChildContext
public void clearChildContext()
- Specified by:
clearChildContext
in 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:
enableHighAvailability
in interfacecom.sun.faces.spi.HighAvailabilityEnabler
- Parameters:
ctx
-
-
-