throw new RuntimeException(ex); } finally { monitor.clear();
public void printBootStatistics() { final StabilityStatistics statistics = new StabilityStatistics(); try { monitor.awaitStability(statistics); } catch (final InterruptedException e) { Thread.currentThread().interrupt(); return; } finally { serviceTarget.removeMonitor(monitor); final long bootstrapTime = System.currentTimeMillis() - startTime; done(bootstrapTime, statistics); monitor.clear(); } }
public void printBootStatistics() { final StabilityStatistics statistics = new StabilityStatistics(); try { monitor.awaitStability(statistics); } catch (final InterruptedException e) { Thread.currentThread().interrupt(); return; } finally { serviceTarget.removeMonitor(monitor); final long bootstrapTime = System.currentTimeMillis() - startTime; done(bootstrapTime, statistics); monitor.clear(); } }
public void printBootStatistics() { final StabilityStatistics statistics = new StabilityStatistics(); try { monitor.awaitStability(statistics); } catch (final InterruptedException e) { Thread.currentThread().interrupt(); return; } finally { serviceTarget.removeMonitor(monitor); final long bootstrapTime = System.currentTimeMillis() - startTime; done(bootstrapTime, statistics); monitor.clear(); } }
return; } finally { monitor.clear();
return; } finally { monitor.clear();
return; } finally { monitor.clear();
/** * Publish the webapp for the WS deployment unit * * @param target * @param unit * @return * @throws Exception */ protected Context doPublish(ServiceTarget target, DeploymentUnit unit) throws Exception { Deployment deployment = unit.getAttachment(WSAttachmentKeys.DEPLOYMENT_KEY); List<Endpoint> endpoints = deployment.getService().getEndpoints(); //If we're running in a Service, that will already have proper dependencies set on the installed endpoint services, //otherwise we need to explicitly wait for the endpoint services to be started before creating the webapp. if (!runningInService) { final ServiceRegistry registry = unit.getServiceRegistry(); final StabilityMonitor monitor = new StabilityMonitor(); for (Endpoint ep : endpoints) { final ServiceName serviceName = EndpointService.getServiceName(unit, ep.getShortName()); monitor.addController(registry.getRequiredService(serviceName)); } try { monitor.awaitStability(); } finally { monitor.clear(); } } deployment.addAttachment(WebDeploymentController.class, startWebApp(host, unit)); //TODO simplify and use findChild later in destroy()/stopWebApp() return new Context(unit.getAttachment(WSAttachmentKeys.JBOSSWEB_METADATA_KEY).getContextRoot(), endpoints); }