Class WebBeansContext


  • public class WebBeansContext
    extends Object
    This is the central point to manage the whole CDI container for a single application There is one WebBeansContext per BeanManagerImpl.
    Version:
    $Rev$ $Date$
    • Constructor Detail

      • WebBeansContext

        public WebBeansContext()
    • Method Detail

      • getBeanManagerBean

        public jakarta.enterprise.inject.spi.Bean<jakarta.enterprise.inject.spi.BeanManager> getBeanManagerBean()
      • currentInstance

        public static WebBeansContext currentInstance()
        Method to be used when static use is truely unavoidable, such as serialization Ideally this method would never lazily create a WebBeansContext and as we don't want to do any deployment of new apps during deserialization, we want to rehydrate objects from an existing WebBeansContext which should be the active context. This method could throw a runtime exception if no instance currently exists.
        Returns:
      • getService

        public <T> T getService​(Class<T> clazz)
      • registerService

        public <T> void registerService​(Class<T> clazz,
                                        T t)
      • getTransactionService

        public org.apache.webbeans.spi.TransactionService getTransactionService()
      • getScannerService

        public org.apache.webbeans.spi.ScannerService getScannerService()
      • getContextsService

        public org.apache.webbeans.spi.ContextsService getContextsService()
      • getSecurityService

        public org.apache.webbeans.spi.SecurityService getSecurityService()
      • getBeanArchiveService

        public org.apache.webbeans.spi.BeanArchiveService getBeanArchiveService()
      • getConversationService

        public org.apache.webbeans.spi.ConversationService getConversationService()
      • get

        public <T> T get​(Class<T> clazz)
      • clear

        public void clear()
        Clear and destroy the whole WebBeansContext. This will also properly destroy all SPI services
      • getLoaderService

        public org.apache.webbeans.spi.LoaderService getLoaderService()
      • getApplicationBoundaryService

        public org.apache.webbeans.spi.ApplicationBoundaryService getApplicationBoundaryService()
      • findMissingAnnotatedType

        public boolean findMissingAnnotatedType​(Class<?> missing)