public void registerProcess(ProcessWrapper processWrapper) {
processes.add(processWrapper);
pings.put(processWrapper.getName(), System.currentTimeMillis());
- processWrapper.start();
for (int i = 0; i < 10; i++) {
if (processWrapper.getProcessMXBean() == null || !processWrapper.getProcessMXBean().isReady()) {
try {
}
}
}
+ processWrapper.start();
}
private class ProcessWatch implements Runnable {
}
} catch (Exception e) {
LOGGER.error("Error while pinging {}", process.getName(), e);
+ terminate();
}
}
}
*/
package org.sonar.server.app;
+import org.slf4j.LoggerFactory;
import org.sonar.process.ConfigurationUtils;
import org.sonar.process.Props;
@Override
public void onStart() {
- tomcat.start();
+ try {
+ tomcat.start();
+ } catch (Exception e) {
+ LoggerFactory.getLogger(getClass()).error("TC error", e);
+ } finally {
+ terminate();
+ }
}
@Override