Class 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 Detail

      • GlassFishInjectionProvider

        public GlassFishInjectionProvider​(jakarta.servlet.ServletContext servletContext)

        Constructs a new GlassFishInjectionProvider instance.

        Parameters:
        servletContext -
    • 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 interface com.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 interface com.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 interface com.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 interface com.sun.faces.spi.InjectionProvider
        Parameters:
        managedBean - the target managed bean
        Throws:
        com.sun.faces.spi.InjectionProviderException
      • getParentWebContext

        public Object getParentWebContext()
        Specified by:
        getParentWebContext in interface com.sun.faces.spi.ThreadContext
      • propagateWebContextToChild

        public void propagateWebContextToChild​(Object context)
        Specified by:
        propagateWebContextToChild in interface com.sun.faces.spi.ThreadContext
      • clearChildContext

        public void clearChildContext()
        Specified by:
        clearChildContext in interface com.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 interface com.sun.faces.spi.HighAvailabilityEnabler
        Parameters:
        ctx -