/**
* Starts the web container
*/
private void startWebContainer() {
Sniffer webSniffer = webSnifferProvider.get();
if (webSniffer==null) {
if (logger.isLoggable(Level.INFO)) {
logger.info(mWebContainerNotInstalled);
}
return;
}
if (containerRegistry.getContainer(
webSniffer.getContainersNames()[0]) != null) {
containerRegistry.getContainer(
webSniffer.getContainersNames()[0]).getContainer();
} else {
try {
Collection<EngineInfo> containersInfo =
containerStarter.startContainer(webSniffer);
if (containersInfo != null && !containersInfo.isEmpty()) {
// Start each container
for (EngineInfo info : containersInfo) {
info.getContainer();
if (logger.isLoggable(Level.INFO)) {
logger.log(Level.INFO, mStartContainerDone,
webSniffer.getModuleType());
}
}
} else {
logger.severe(mUnableStartContainerNoException);
}
} catch (Exception e) {
String msg;
if ( rb != null ) {
msg = MessageFormat.format( rb.getString(mUnableStartContainer), webSniffer.getContainersNames()[0]);
} else {
msg = "Unable to start Web Container: " + webSniffer.getContainersNames()[0];
}
logger.log(Level.SEVERE, msg, e);
}
}
}