看代码有助于线上出现预料之外的事的时候,不至于心慌。。。
StandardEngine[Tomcat].StandardHost[localhost]的启动与StandardEngine不在同一个线程中,它的start:
// Start our child containers, if any
Container children[] = findChildren();
List<Future<Void>> results = new ArrayList<>(); for (int i = 0; i < children.length; i++) {
results.add(startStopExecutor.submit(new StartChild(children[i])));
} boolean fail = false; for (Future<Void> result : results) { try {
result.get();
} catch (Exception e) {
log.error(sm.getString("containerBase.threadedStartFailed"), e);
fail = true;
}
&nb


