Class BeanManagerLookup


  • public final class BeanManagerLookup
    extends Object
    Defines several strategies for looking up a CDI BeanManager in a portable way. The following strategies are tried (in order):
    • JNDI under java:comp/BeanManager (default location)
    • JNDI under java:comp/env/BeanManager (for servlet containers like Tomcat and Jetty)
    • CDI.current().getBeanManager() (portable lookup)
    • Fallback
    The last successful lookup strategy is saved and tried first next time.
    Author:
    papegaaij
    • Method Detail

      • lookup

        public static javax.enterprise.inject.spi.BeanManager lookup()