private void initSingletonContext() { singletonContext.setActive(true); }
@Override protected void createSingletonContext() { singletonContext = new SingletonContext(); singletonContext.setActive(true); }
@Override protected void createSingletonContext() { final SingletonContext ctx = new SingletonContext(); ctx.setActive(true); singletonContext.set(ctx); }
public CdiAppContextsService(final WebBeansContext wbc, final boolean supportsConversation) { if (wbc != null) { webBeansContext = wbc; } else { webBeansContext = WebBeansContext.currentInstance(); } dependentContext.setActive(true); if (supportsConversation) { conversationContext = new ThreadLocal<ConversationContext>(); } else { conversationContext = null; } applicationContext.setActive(true); singletonContext.setActive(true); }
/** * Initialize singleton context. * @param startupObject servlet context */ protected void initSingletonContext(Object startupObject) { if (singletonContext != null) { return; } synchronized (this) { if (singletonContext == null) { singletonContext = new SingletonContext(); singletonContext.setActive(true); Object payLoad = startupObject instanceof ServletContext ? (ServletContext) startupObject : new Object(); webBeansContext.getBeanManagerImpl().fireContextLifecyleEvent( payLoad, InitializedLiteral.INSTANCE_SINGLETON_SCOPED); } } }