private Context getCurrentDependentContext() { if(dependentContext.get() == null) { dependentContext.set(new DependentContext()); } return dependentContext.get(); }
/** * Creates a new instance. */ public WebContextsService(WebBeansContext webBeansContext) { super(webBeansContext); conversationManager = webBeansContext.getConversationManager(); applicationContext = new ApplicationContext(); applicationContext.setActive(true); requestContexts = new ThreadLocal<>(); sessionContexts = new ThreadLocal<>(); conversationContexts = new ThreadLocal<>(); //Dependent context is always active dependentContext = new DependentContext(); dependentContext.setActive(true); configureEagerSessionInitialisation(webBeansContext); }