/** * Called when the deployment is undeployed. * * Remove all the instances of {@link HealthCheck} from the {@link HealthMonitor}. * Handle manually their CDI destroy lifecycle. */ public void close(@Observes final BeforeShutdown bs) { healthChecks.forEach(healthCheck -> healthMonitor.removeHealthCheck(healthCheck)); healthChecks.clear(); healthCheckInstances.forEach(instance -> instance.preDestroy().dispose()); healthCheckInstances.clear(); }
void beforeShutdown(@Observes BeforeShutdown event) { for (HandlerInstance<?> handler : handlerInstances) { handler.dispose(); } handlerInstances.clear(); handlerTypes.clear(); routeObservers.clear(); }
void stop( @Observes BeforeShutdown beforeShutdown ) { try { if( scheduler.isStarted() ) { scheduler.shutdown(); } } catch( SchedulerException ex ) { LOG.log( Level.SEVERE, null, ex ); } }
/** * Called when the deployment is undeployed. * * Remove all the instances of {@link HealthCheck} from the {@link Monitor}. * Handle manually their CDI destroy lifecycle. */ public void beforeShutdown(@Observes final BeforeShutdown bs) { healthChecks.forEach(healthCheck -> monitor.unregisterHealthBean(healthCheck)); healthChecks.clear(); healthCheckInstances.forEach(instance -> instance.preDestroy().dispose()); healthCheckInstances.clear(); }
public void beforeShutdown(@Observes BeforeShutdown event) { if (processEngineLookup != null) { processEngineLookup.ungetProcessEngine(); processEngineLookup = null; } LOGGER.info("Shutting down flowable-cdi"); }
public void destroyIfCreated(final @Observes BeforeShutdown beforeShutdown) { if (cacheManager != null) { cacheManager.close(); } if (cachingProvider != null) { cachingProvider.close(); } }
/** * {@link BeforeShutdown} CDI event observer. * * @param event CDI Event instance. */ public void beforeShutdown(@Observes BeforeShutdown event) { if (_deployment != null) { _deployment.stop(); _deployment.destroy(); } }
/** * Destroy this extension. Removes all services. * * @param shut The before shutdown event */ public void destroy(@Observes BeforeShutdown shut) { exportedBeans.values().stream(). forEach((s) -> { try { s.unregister(); } catch (Exception exc) {} }); trackers.values().forEach((t) -> t.destroy()); }
/** * Destroy this extension. Removes the scope services. * * @param shut The shutdown event */ public void destroy(@Observes BeforeShutdown shut) { this.contexts.forEach((c) -> c.destroy()); this.registrations.stream(). forEach((s) -> { try { s.unregister(); } catch (Exception exc) {} }); }
public void beforeShutdown(@Observes BeforeShutdown event) { if(processEngineLookup != null) { processEngineLookup.ungetProcessEngine(); processEngineLookup = null; } logger.info("Shutting down activiti-cdi"); }
protected void shutdown(final @Observes BeforeShutdown unused) { final HessianService service = SystemInstance.get().getComponent(HessianService.class); if (service == null) { return; } final HessianRegistry registry = service.getRegistry(); for (final DeployedEndpoint pair : deployed) { registry.undeploy(service.getVirtualHost(), pair.app, pair.name); LOGGER.info("Undeployed CDI hessian service " + pair.name); } deployed.clear(); }
public void cleanupStoredBeanManagerOnShutdown(final @Observes BeforeShutdown beforeShutdown) { if (CDI_1_1_AVAILABLE || bmpSingleton == null) { return; } bmpSingleton.bmInfos.remove(loader()); }
public <X> void stopScheduler(@Observes BeforeShutdown beforeShutdown) { if (!this.isActivated) { return; } if (this.scheduler != null) { this.scheduler.stop(); this.scheduler = null; } }
/** * Cleanup on container shutdown. * * @param beforeShutdown CDI shutdown event */ public void cleanupStoredBeanManagerOnShutdown(@Observes BeforeShutdown beforeShutdown) { if (bmpSingleton == null) { // this happens if there has been a failure at startup return; } bmpSingleton.bmInfos.remove(ClassUtils.getClassLoader(null)); }
/** * This method triggers freeing of the ConfigSources. */ @SuppressWarnings("UnusedDeclaration") public void freeConfigSources(@Observes BeforeShutdown bs) { String appName = ConfigResolver.getPropertyValue(ConfigResolver.DELTASPIKE_APP_NAME_CONFIG); unRegisterConfigMBean(appName); ConfigResolver.freeConfigSources(); detectedParentPropertyFileConfigs.remove(ClassUtils.getClassLoader(null)); }
public void beforeShutdown( @Observes BeforeShutdown type ) { if( provider != null ) { provider.close(); } }
public void shutdown(@Observes BeforeShutdown bsd) { DefaultConfigProvider.instance().releaseConfig(config); }
void cleanUp(@Observes final BeforeShutdown beforeShutdown) { canWrite = false; new ArrayList<>(jsonbs).forEach(this::untrack); jsonbs.clear(); }
void logLifecycleEvent(@Observes BeforeShutdown event) { LOGGER.info("BeforeShutdown"); }
protected void cleanup(@Observes BeforeShutdown beforeShutdown) { //we can reset it in any case, //because every application produced a copy as application-scoped bean (see RepositoryComponentsFactory) REPOSITORY_CLASSES.clear(); }
public void freeViewConfigCache(@Observes BeforeShutdown bs) { this.viewConfigResolver = null; this.transformed = false; }