public void destroy(final Object destroyObject) { super.destroy(destroyObject); removeThreadLocals(); }
@Override public void contextExited(final ThreadContext exitedContext, final ThreadContext reenteredContext) { if (exitedContext == null) { return; } final DestroyContext destroyContext = exitedContext.get(DestroyContext.class); if (destroyContext == null || destroyContext.threadContext != exitedContext) { return; } destroyContext.contextsService.endContext(RequestScoped.class, null); CdiAppContextsService.class.cast(destroyContext.contextsService).removeThreadLocals(); }
@Override public void contextExited(final ThreadContext exitedContext, final ThreadContext reenteredContext) { if (exitedContext == null) { return; } final DestroyContext destroyContext = exitedContext.get(DestroyContext.class); if (destroyContext == null || destroyContext.threadContext != exitedContext) { return; } destroyContext.contextsService.endContext(RequestScoped.class, CdiAppContextsService.EJB_REQUEST_EVENT); CdiAppContextsService.class.cast(destroyContext.contextsService).removeThreadLocals(); }
public void destroy(final Object destroyObject) { //Destroy application context endContext(ApplicationScoped.class, destroyObject); //Destroy singleton context endContext(Singleton.class, destroyObject); removeThreadLocals(); }
public static void stopContexts(final ContextsService contextsService, final ServletContext servletContext, final HttpSession session) throws Exception { contextsService.endContext(SessionScoped.class, session); contextsService.endContext(RequestScoped.class, null); contextsService.endContext(ConversationScoped.class, null); if (CdiAppContextsService.class.isInstance(contextsService)) { CdiAppContextsService.class.cast(contextsService).removeThreadLocals(); } } }
public static void stopContexts(final ContextsService contextsService, final ServletContext servletContext, final HttpSession session) throws Exception { contextsService.endContext(Singleton.class, null); contextsService.endContext(ApplicationScoped.class, null); contextsService.endContext(SessionScoped.class, session); contextsService.endContext(RequestScoped.class, null); contextsService.endContext(ConversationScoped.class, null); if (CdiAppContextsService.class.isInstance(contextsService)) { CdiAppContextsService.class.cast(contextsService).removeThreadLocals(); } } }
protected void afterStopApplication(final Object stopObject) throws Exception { //Clear the resource injection service final ResourceInjectionService injectionServices = webBeansContext.getService(ResourceInjectionService.class); if (injectionServices != null) { injectionServices.clear(); } //Comment out for commit OWB-502 //ContextFactory.cleanUpContextFactory(); CdiAppContextsService.class.cast(contextsService).removeThreadLocals(); WebBeansFinder.clearInstances(WebBeansUtil.getCurrentClassLoader()); }
contextsService.removeThreadLocals(); ThreadSingletonServiceImpl.enter((WebBeansContext) oldContext);
contextsService.removeThreadLocals(); ThreadSingletonServiceImpl.enter((WebBeansContext) oldContext);
CdiAppContextsService.class.cast(contextsService).removeThreadLocals();