/** * Invokes {@link Registry#shutdown()}. */ public void destroy() { if (_registry != null) _registry.shutdown(); _filterConfig = null; }
/** * Shutdown the registry so to notify every * {@link org.apache.hivemind.events.RegistryShutdownListener}. */ public void dispose() { if (registry != null) { registry.shutdown(); logger.debug("Registry halted"); } } }
private synchronized void checkRegistryRebuild(ServletRequest request) { if (request.getAttribute(REBUILD_REQUEST_KEY) == null) return; Registry oldRegistry = _registry; // Replace the old Registry with a new one. All other threads, but this // one, will begin using the new Registry. Hopefully, we didn't get // rebuild requests on multiple threads. initializeRegistry(); // Shutdown the old Registry. Perhaps we should sleep for a moment, first, // to help ensure that other threads have "cleared out". If not, we'll see some // instability at the instant we shutdown (i.e., all the proxies will get disabled). // Alternately, we should create a WeakReference based monitor that shuts down the // old registry when it is no longer used by any other threads. For the moment, // this functionality is limited to development-time only (not production), so it isn't // urgent. oldRegistry.shutdown(); }
/** * Shuts down the registry (if it exists). * * @since 4.0 */ public void destroy() { getServletContext().removeAttribute(_registryKey); if (_registry != null) { _registry.shutdown(); _registry = null; } super.destroy(); } }
/** * Shuts down the registry (if it exists). * * @since 4.0 */ public void destroy() { getServletContext().removeAttribute(_registryKey); if (_registry != null) { _registry.shutdown(); _registry = null; } super.destroy(); } }