/** * Fires given event for non-web modules. Used for @BeforeDestroyed and @Destroyed events. */ private void fireEventForNonWebModules(Type eventType, Object event, Annotation... qualifiers) { try { BeanDeploymentModules modules = deploymentManager.getServices().get(BeanDeploymentModules.class); if (modules != null) { // fire event for non-web modules // web modules are handled by HttpContextLifecycle for (BeanDeploymentModule module : modules) { if (!module.isWebModule()) { module.fireEvent(eventType, event, qualifiers); } } } } catch (Exception ignored) { } } }
/** * Fires given event for non-web modules. Used for @BeforeDestroyed and @Destroyed events. */ private void fireEventForNonWebModules(Type eventType, Object event, Annotation... qualifiers) { try { BeanDeploymentModules modules = deploymentManager.getServices().get(BeanDeploymentModules.class); if (modules != null) { // fire event for non-web modules // web modules are handled by HttpContextLifecycle for (BeanDeploymentModule module : modules) { if (!module.isWebModule()) { module.fireEvent(eventType, event, qualifiers); } } } } catch (Exception ignored) { } } }
/** * Fires given event for non-web modules. Used for @BeforeDestroyed and @Destroyed events. */ private void fireEventForNonWebModules(Type eventType, Object event, Annotation... qualifiers) { try { BeanDeploymentModules modules = deploymentManager.getServices().get(BeanDeploymentModules.class); if (modules != null) { // fire event for non-web modules // web modules are handled by HttpContextLifecycle for (BeanDeploymentModule module : modules) { if (!module.isWebModule()) { module.fireEvent(eventType, event, qualifiers); } } } } catch (Exception ignored) { } } }
/** * Fires given event for non-web modules. Used for @BeforeDestroyed and @Destroyed events. */ private void fireEventForNonWebModules(Type eventType, Object event, Annotation... qualifiers) { try { BeanDeploymentModules modules = deploymentManager.getServices().get(BeanDeploymentModules.class); if (modules != null) { // fire event for non-web modules // web modules are handled by HttpContextLifecycle for (BeanDeploymentModule module : modules) { if (!module.isWebModule()) { module.fireEvent(eventType, event, qualifiers); } } } } catch (Exception ignored) { } } }
private void fireEventForApplicationScope(ServletContext ctx, Annotation qualifier) { if (module != null) { // Deliver events sequentially synchronized (container) { if (module.isWebModule()) { module.fireEvent(ServletContext.class, ctx, qualifier); } else { // fallback for backward compatibility ServletLogger.LOG.noEeModuleDescriptor(beanManager); final EventMetadata metadata = new EventMetadataImpl(ServletContext.class, null, Collections.singleton(qualifier)); beanManager.getAccessibleLenientObserverNotifier().fireEvent(ServletContext.class, ctx, metadata, qualifier); } } } }
/** * Fires given event for non-web modules. Used for @BeforeDestroyed and @Destroyed events. */ private void fireEventForNonWebModules(Type eventType, Object event, Annotation... qualifiers) { try { BeanDeploymentModules modules = deploymentManager.getServices().get(BeanDeploymentModules.class); if (modules != null) { // fire event for non-web modules // web modules are handled by HttpContextLifecycle for (BeanDeploymentModule module : modules) { if (!module.isWebModule()) { module.fireEvent(eventType, event, qualifiers); } } } } catch (Exception ignored) { } } }
private void fireEventForApplicationScope(ServletContext ctx, Annotation qualifier) { if (module != null) { // Deliver events sequentially synchronized (container) { if (module.isWebModule()) { module.fireEvent(ServletContext.class, ctx, qualifier); } else { // fallback for backward compatibility ServletLogger.LOG.noEeModuleDescriptor(beanManager); final EventMetadata metadata = new EventMetadataImpl(ServletContext.class, null, Collections.singleton(qualifier)); beanManager.getAccessibleLenientObserverNotifier().fireEvent(ServletContext.class, ctx, metadata, qualifier); } } } }
private void fireEventForApplicationScope(ServletContext ctx, Annotation qualifier) { if (module != null) { // Deliver events sequentially synchronized (container) { if (module.isWebModule()) { module.fireEvent(ServletContext.class, ctx, qualifier); } else { // fallback for backward compatibility ServletLogger.LOG.noEeModuleDescriptor(beanManager); final EventMetadata metadata = new EventMetadataImpl(ServletContext.class, null, Collections.singleton(qualifier)); beanManager.getAccessibleLenientObserverNotifier().fireEvent(ServletContext.class, ctx, metadata, qualifier); } } } }
private void fireEventForApplicationScope(ServletContext ctx, Annotation qualifier) { if (module != null) { // Deliver events sequentially synchronized (container) { if (module.isWebModule()) { module.fireEvent(ServletContext.class, ctx, qualifier); } else { // fallback for backward compatibility ServletLogger.LOG.noEeModuleDescriptor(beanManager.getId()); final EventMetadata metadata = new EventMetadataImpl(ServletContext.class, null, Collections.singleton(qualifier)); beanManager.getAccessibleLenientObserverNotifier().fireEvent(ServletContext.class, ctx, metadata, qualifier); } } } }
if (!module.isWebModule()) { module.fireEvent(Object.class, ContextEvent.APPLICATION_DESTROYED, DestroyedLiteral.APPLICATION);
if (!module.isWebModule()) { module.fireEvent(Object.class, ContextEvent.APPLICATION_INITIALIZED, InitializedLiteral.APPLICATION);
if (!module.isWebModule()) { module.fireEvent(Object.class, ContextEvent.APPLICATION_INITIALIZED, Initialized.Literal.APPLICATION);
if (!module.isWebModule()) { module.fireEvent(Object.class, ContextEvent.APPLICATION_INITIALIZED, Initialized.Literal.APPLICATION);
if (!module.isWebModule()) { module.fireEvent(Object.class, ContextEvent.APPLICATION_INITIALIZED, Initialized.Literal.APPLICATION);
if (!module.isWebModule()) { module.fireEvent(Object.class, ContextEvent.APPLICATION_INITIALIZED, Initialized.Literal.APPLICATION);
if (!module.isWebModule()) { module.fireEvent(Object.class, ContextEvent.APPLICATION_INITIALIZED, Initialized.Literal.APPLICATION);