@Override public void handleEvent(ServiceController<?> controller, LifecycleEvent event) { if(event == LifecycleEvent.REMOVED) { context.complete(); } } });
@Override public void run() { try { stopService(); } finally { stopContext.complete(); } } };
@Override public void run() { try { stopContext(); } finally { stopContext.complete(); } } });
@Override public void stop(final StopContext context) { if (executorServicesConsumer != null) executorServicesConsumer.accept(null); if (executor != null) { context.asynchronous(); new Thread(() -> { super.shutdown(); executor = null; context.complete(); }).start(); } }
@Override public void run() { try { getValue().stop(); } finally { context.complete(); } } };
@Override public void run() { // orb.destroy blocks until the ORB has shutdown. We must signal the context when the process is complete. try { CorbaUtils.setOrbProperties(null); this.orb.destroy(); } finally { this.context.complete(); } } }
@Override public void stop(final StopContext context) { if (this.asyncStop) { Runnable task = () -> { try { this.service.stop(context); } finally { context.complete(); } }; try { this.executor.get().execute(task); } catch (RejectedExecutionException e) { task.run(); } finally { context.asynchronous(); } } else { this.service.stop(context); } } }
@Override public void run() { try { invokeLifecycleMethod(stopMethod, context); } catch (Exception e) { SarLogger.ROOT_LOGGER.error(SarLogger.ROOT_LOGGER.failedExecutingLegacyMethod("stop()"), e); } finally { context.complete(); } } };
@Override public void stop(final StopContext context) { // Remove the server activity suspendControllerInjector.getValue().unRegisterActivity(serverActivity); final ExecutorService service = executorInjector.getValue(); final Runnable task = () -> { // Should already be stopped, but just to be safe we'll make one more attempt serverActivity.stopRunningJobs(false); batchEnvironment = null; classLoader = null; context.complete(); }; try { service.execute(task); } catch (RejectedExecutionException e) { task.run(); } finally { context.asynchronous(); } }
@Override public void stop(final StopContext context) { if (this.stopAsynchronously) { Runnable task = () -> { try { this.service.stop(context); } finally { context.complete(); } }; try { this.executor.getValue().execute(task); } catch (RejectedExecutionException e) { task.run(); } finally { context.asynchronous(); } } else { this.service.stop(context); } } }
@Override public void run() { try { DEPLOYMENT_CONNECTOR_LOGGER.debugf("Stopping service %s", serviceName); WritableServiceBasedNamingStore.pushOwner(serviceName); unregisterAll(deploymentName); } finally { WritableServiceBasedNamingStore.popOwner(); context.complete(); } } };
@Override public void run() { try { if(managedReference != null) { managedReference.release(); } invokeLifecycleMethod(destroyMethod, context); } catch (Exception e) { SarLogger.ROOT_LOGGER.error(SarLogger.ROOT_LOGGER.failedExecutingLegacyMethod("destroy()"), e); } finally { uninjectDependencies(); context.complete(); } } };
@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 run() { try { performUndeployment(); } finally { context.complete(); } } });
public void run() { try { performUndeployment(); } finally { context.complete(); } } });
public void run() { try { performUndeployment(); } finally { context.complete(); } } });
@Override public void run() { try { executorService.shutdown(); } finally { executorService = null; context.complete(); } } };
@Override public void run() { try { scheduledExecutorService.shutdown(); } finally { scheduledExecutorService = null; context.complete(); } } };
@Override public void run() { try { executorService.shutdown(); } finally { executorService = null; context.complete(); } } }, "ServerExecutorService Shutdown Thread");
@Override public void run() { try { // Wait for all mgmt requests to complete trackerService.awaitShutdown(SHUTDOWN_TIMEOUT, TIME_UNIT); } catch (InterruptedException e) { // } finally { context.complete(); } } });