Class CdiServletContainerInitializer

  • All Implemented Interfaces:

    public class CdiServletContainerInitializer
    extends java.lang.Object
    implements javax.servlet.ServletContainerInitializer

    A ServletContainerInitializer that introspects for a CDI API implementation within a web application and applies an integration mode if CDI is found. CDI integration modes can be selected per webapp with the "org.eclipse.jetty.cdi" init parameter or default to the mode set by the "org.eclipse.jetty.cdi" server attribute. Supported modes are:

    Jetty will call the CDI SPI within the webapp to decorate objects (default).
    The webapp may register a decorator on the context attribute "org.eclipse.jetty.cdi.decorator".
    See Also:
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void onStartup​(java.util.Set<java.lang.Class<?>> c, javax.servlet.ServletContext ctx)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail


        public static final java.lang.String CDI_INTEGRATION_ATTRIBUTE
        See Also:
        Constant Field Values
    • Constructor Detail

      • CdiServletContainerInitializer

        public CdiServletContainerInitializer()
    • Method Detail

      • onStartup

        public void onStartup​(java.util.Set<java.lang.Class<?>> c,
                              javax.servlet.ServletContext ctx)
        Specified by:
        onStartup in interface javax.servlet.ServletContainerInitializer