/** * Tears down a container, remove all imported libraries from the module * subsystem. */ @Override public void tearDown() { if (lifecycle!=null) { lifecycle.destroy(); } }
@SuppressWarnings("unused") @PreDestroy private void preDestroy() { if (fighterFishHandles == null) return; List<ServiceHandle<?>> localHandles = new LinkedList<ServiceHandle<?>>(fighterFishHandles); fighterFishHandles.clear(); for (ServiceHandle<?> handle : localHandles) { handle.destroy(); } }
@Override public Object remove(String arg0) { // TODO: One possibility is to truly keep the handles ServiceHandle<?> handle = getServiceFromName(arg0); if (handle == null) return null; handle.destroy(); return null; }
@Override public void run() { for (;;) { ActiveDescriptor<?> job = null; synchronized (queueLock) { if (caput) return; if (queue.isEmpty()) { queueLock.notify(); return; } job = queue.remove(0); } try { locator.getServiceHandle(job).destroy(); } catch (Throwable th) { synchronized (queueLock) { parent.lastError = th; parent.lastErrorDescriptor = job; queueLock.notify(); } } } }
/** * For when the server shuts down */ @Override public void shutdown() { List<ImmediateErrorHandler> errorHandlers = locator.getAllServices(ImmediateErrorHandler.class); synchronized (this) { for (Map.Entry<ActiveDescriptor<?>, HandleAndService> entry : new HashSet<Map.Entry<ActiveDescriptor<?>, HandleAndService>>(currentImmediateServices.entrySet())) { HandleAndService has = entry.getValue(); ServiceHandle<?> handle = has.getHandle(); if (handle != null) { handle.destroy(); } else { destroyOne(entry.getKey(), errorHandlers); } } } }
/** * For when the server shuts down */ @Override public void shutdown() { List<ImmediateErrorHandler> errorHandlers = locator.getAllServices(ImmediateErrorHandler.class); synchronized (this) { for (Map.Entry<ActiveDescriptor<?>, HandleAndService> entry : new HashSet<Map.Entry<ActiveDescriptor<?>, HandleAndService>>(currentImmediateServices.entrySet())) { HandleAndService has = entry.getValue(); ServiceHandle<?> handle = has.getHandle(); if (handle != null) { handle.destroy(); } else { destroyOne(entry.getKey(), errorHandlers); } } } }
/** * For when the server shuts down */ @Override public void shutdown() { List<ImmediateErrorHandler> errorHandlers = locator.getAllServices(ImmediateErrorHandler.class); synchronized (this) { for (Map.Entry<ActiveDescriptor<?>, HandleAndService> entry : new HashSet<Map.Entry<ActiveDescriptor<?>, HandleAndService>>(currentImmediateServices.entrySet())) { HandleAndService has = entry.getValue(); ServiceHandle<?> handle = has.getHandle(); if (handle != null) { handle.destroy(); } else { destroyOne(entry.getKey(), errorHandlers); } } } }
/** * For when the server shuts down */ @Override public void shutdown() { List<ImmediateErrorHandler> errorHandlers = locator.getAllServices(ImmediateErrorHandler.class); synchronized (this) { for (Map.Entry<ActiveDescriptor<?>, HandleAndService> entry : new HashSet<Map.Entry<ActiveDescriptor<?>, HandleAndService>>(currentImmediateServices.entrySet())) { HandleAndService has = entry.getValue(); ServiceHandle<?> handle = has.getHandle(); if (handle != null) { handle.destroy(); } else { destroyOne(entry.getKey(), errorHandlers); } } } }
public void stop(Logger logger) { if (getDeployer()!=null) { ServiceHandle<?> i = registry.habitat.getServiceHandle(getDeployer().getClass()); if (i!=null) { i.destroy(); } } if (container != null && container.isActive()) { container.destroy(); } registry.removeContainer(this); if (logger.isLoggable(Level.FINE)) { logger.fine("Container " + getContainer().getName() + " stopped"); } } }
handle.destroy();
PerLookup.class.getName().equals(jitResolver.getActiveDescriptor().getScope())) { jitResolver.destroy();
PerLookup.class.getName().equals(jitResolver.getActiveDescriptor().getScope())) { jitResolver.destroy();
PerLookup.class.getName().equals(jitResolver.getActiveDescriptor().getScope())) { jitResolver.destroy();
PerLookup.class.getName().equals(jitResolver.getActiveDescriptor().getScope())) { jitResolver.destroy();