@Override public void run() { WeldLogger.DEPLOYMENT_LOGGER.debugf("Weld container cleanup for deployment %s", deploymentName); ClassLoader oldTccl = WildFlySecurityManager.getCurrentContextClassLoaderPrivileged(); try { WildFlySecurityManager .setCurrentContextClassLoaderPrivileged(deployment.getModule().getClassLoader()); WeldProvider.containerShutDown(container); container.setState(ContainerState.SHUTDOWN); container.cleanup(); setStarted(false); } finally { WildFlySecurityManager.setCurrentContextClassLoaderPrivileged(oldTccl); ModuleGroupSingletonProvider.removeClassLoader(deployment.getModule().getClassLoader()); context.complete(); } } };
public void shutdown() { try { // The container must destroy all contexts. // For non-web modules, fire @BeforeDestroyed event fireEventForNonWebModules(Object.class, ContextEvent.APPLICATION_BEFORE_DESTROYED, BeforeDestroyed.Literal.APPLICATION); deploymentManager.instance().select(ApplicationContext.class).get().invalidate(); deploymentManager.instance().select(SingletonContext.class).get().invalidate(); } finally { // fire @Destroyed(ApplicationScope.class) for non-web modules fireEventForNonWebModules(Object.class, ContextEvent.APPLICATION_DESTROYED, Destroyed.Literal.APPLICATION); try { // Finally, the container must fire an event of type BeforeShutdown. BeforeShutdownImpl.fire(deploymentManager); } finally { Container container = Container.instance(contextId); container.setState(ContainerState.SHUTDOWN); container.cleanup(); } } }
public void shutdown() { try { // The container must destroy all contexts. // For non-web modules, fire @BeforeDestroyed event fireEventForNonWebModules(Object.class, ContextEvent.APPLICATION_BEFORE_DESTROYED, BeforeDestroyed.Literal.APPLICATION); deploymentManager.instance().select(ApplicationContext.class).get().invalidate(); deploymentManager.instance().select(SingletonContext.class).get().invalidate(); } finally { // fire @Destroyed(ApplicationScope.class) for non-web modules fireEventForNonWebModules(Object.class, ContextEvent.APPLICATION_DESTROYED, Destroyed.Literal.APPLICATION); try { // Finally, the container must fire an event of type BeforeShutdown. BeforeShutdownImpl.fire(deploymentManager); } finally { Container container = Container.instance(contextId); container.setState(ContainerState.SHUTDOWN); container.cleanup(); } } }
public void shutdown() { try { // The container must destroy all contexts. // For non-web modules, fire @BeforeDestroyed event fireEventForNonWebModules(Object.class, ContextEvent.APPLICATION_BEFORE_DESTROYED, BeforeDestroyed.Literal.APPLICATION); deploymentManager.instance().select(ApplicationContext.class).get().invalidate(); deploymentManager.instance().select(SingletonContext.class).get().invalidate(); } finally { // fire @Destroyed(ApplicationScope.class) for non-web modules fireEventForNonWebModules(Object.class, ContextEvent.APPLICATION_DESTROYED, Destroyed.Literal.APPLICATION); try { // Finally, the container must fire an event of type BeforeShutdown. BeforeShutdownImpl.fire(deploymentManager); } finally { Container container = Container.instance(contextId); container.setState(ContainerState.SHUTDOWN); container.cleanup(); } } }
public void shutdown() { try { // The container must destroy all contexts. // For non-web modules, fire @BeforeDestroyed event fireEventForNonWebModules(Object.class, ContextEvent.APPLICATION_BEFORE_DESTROYED, BeforeDestroyed.Literal.APPLICATION); deploymentManager.instance().select(ApplicationContext.class).get().invalidate(); deploymentManager.instance().select(SingletonContext.class).get().invalidate(); } finally { // fire @Destroyed(ApplicationScope.class) for non-web modules fireEventForNonWebModules(Object.class, ContextEvent.APPLICATION_DESTROYED, Destroyed.Literal.APPLICATION); try { // Finally, the container must fire an event of type BeforeShutdown. BeforeShutdownImpl.fire(deploymentManager); } finally { Container container = Container.instance(contextId); container.setState(ContainerState.SHUTDOWN); container.cleanup(); } } }
public void shutdown() { try { // The container must destroy all contexts. // For non-web modules, fire @BeforeDestroyed event fireEventForNonWebModules(Object.class, ContextEvent.APPLICATION_BEFORE_DESTROYED, BeforeDestroyed.Literal.APPLICATION); deploymentManager.instance().select(ApplicationContext.class).get().invalidate(); deploymentManager.instance().select(SingletonContext.class).get().invalidate(); } finally { // fire @Destroyed(ApplicationScope.class) for non-web modules fireEventForNonWebModules(Object.class, ContextEvent.APPLICATION_DESTROYED, Destroyed.Literal.APPLICATION); try { // Finally, the container must fire an event of type BeforeShutdown. BeforeShutdownImpl.fire(deploymentManager); } finally { Container container = Container.instance(contextId); container.setState(ContainerState.SHUTDOWN); container.cleanup(); } } }
} finally { Container container = Container.instance(contextId); container.setState(ContainerState.SHUTDOWN); container.cleanup();
public void validateBeans() { BootstrapLogger.LOG.validatingBeans(); tracker.start(Tracker.OP_VALIDATE_BEANS); try { for (BeanDeployment beanDeployment : getBeanDeployments()) { BeanManagerImpl beanManager = beanDeployment.getBeanManager(); beanManager.getBeanResolver().clear(); deployment.getServices().get(Validator.class).validateDeployment(beanManager, beanDeployment); beanManager.getServices().get(InjectionTargetService.class).validate(); } } catch (Exception e) { validationFailed(e); throw e; } getContainer().setState(ContainerState.VALIDATED); tracker.start(Tracker.OP_ADV); AfterDeploymentValidationImpl.fire(deploymentManager); tracker.end(); tracker.end(); }
public void validateBeans() { BootstrapLogger.LOG.validatingBeans(); tracker.start(Tracker.OP_VALIDATE_BEANS); try { for (BeanDeployment beanDeployment : getBeanDeployments()) { BeanManagerImpl beanManager = beanDeployment.getBeanManager(); beanManager.getBeanResolver().clear(); deployment.getServices().get(Validator.class).validateDeployment(beanManager, beanDeployment); beanManager.getServices().get(InjectionTargetService.class).validate(); } } catch (Exception e) { validationFailed(e); throw e; } getContainer().setState(ContainerState.VALIDATED); tracker.start(Tracker.OP_ADV); AfterDeploymentValidationImpl.fire(deploymentManager); tracker.end(); tracker.end(); }
public void validateBeans() { BootstrapLogger.LOG.validatingBeans(); tracker.start(Tracker.OP_VALIDATE_BEANS); try { for (BeanDeployment beanDeployment : getBeanDeployments()) { BeanManagerImpl beanManager = beanDeployment.getBeanManager(); beanManager.getBeanResolver().clear(); deployment.getServices().get(Validator.class).validateDeployment(beanManager, beanDeployment); beanManager.getServices().get(InjectionTargetService.class).validate(); } } catch (Exception e) { validationFailed(e); throw e; } getContainer().setState(ContainerState.VALIDATED); tracker.start(Tracker.OP_ADV); AfterDeploymentValidationImpl.fire(deploymentManager); tracker.end(); tracker.end(); }
public void validateBeans() { BootstrapLogger.LOG.validatingBeans(); tracker.start(Tracker.OP_VALIDATE_BEANS); try { for (BeanDeployment beanDeployment : getBeanDeployments()) { BeanManagerImpl beanManager = beanDeployment.getBeanManager(); beanManager.getBeanResolver().clear(); deployment.getServices().get(Validator.class).validateDeployment(beanManager, beanDeployment); beanManager.getServices().get(InjectionTargetService.class).validate(); } } catch (Exception e) { validationFailed(e); throw e; } getContainer().setState(ContainerState.VALIDATED); tracker.start(Tracker.OP_ADV); AfterDeploymentValidationImpl.fire(deploymentManager); tracker.end(); tracker.end(); }
public void validateBeans() { BootstrapLogger.LOG.validatingBeans(); tracker.start(Tracker.OP_VALIDATE_BEANS); try { for (BeanDeployment beanDeployment : getBeanDeployments()) { BeanManagerImpl beanManager = beanDeployment.getBeanManager(); beanManager.getBeanResolver().clear(); deployment.getServices().get(Validator.class).validateDeployment(beanManager, beanDeployment); beanManager.getServices().get(InjectionTargetService.class).validate(); } } catch (Exception e) { validationFailed(e); throw e; } getContainer().setState(ContainerState.VALIDATED); tracker.start(Tracker.OP_ADV); AfterDeploymentValidationImpl.fire(deploymentManager); tracker.end(); tracker.end(); }
public void validateBeans() { BootstrapLogger.LOG.validatingBeans(); tracker.start(Tracker.OP_VALIDATE_BEANS); try { for (BeanDeployment beanDeployment : getBeanDeployments()) { BeanManagerImpl beanManager = beanDeployment.getBeanManager(); beanManager.getBeanResolver().clear(); deployment.getServices().get(Validator.class).validateDeployment(beanManager, beanDeployment); beanManager.getServices().get(InjectionTargetService.class).validate(); } } catch (Exception e) { validationFailed(e); throw e; } getContainer().setState(ContainerState.VALIDATED); tracker.start(Tracker.OP_ADV); AfterDeploymentValidationImpl.fire(deploymentManager); tracker.end(); tracker.end(); }
getContainer().setState(ContainerState.INITIALIZED);