[Minor] Code cleanup
This commit is contained in:
parent
61b3a3e5bf
commit
597441653a
|
@ -37,16 +37,20 @@ public class StartupListener implements ServletContextListener {
|
|||
|
||||
@Override
|
||||
public void contextInitialized(ServletContextEvent sce) {
|
||||
try {
|
||||
String realPath = sce.getServletContext().getRealPath("/WEB-INF");
|
||||
|
||||
String realPath = sce.getServletContext().getRealPath("/WEB-INF");
|
||||
|
||||
File pathF = new File(realPath);
|
||||
String environment = StrolchEnvironment.getEnvironmentFromEnvProperties(pathF);
|
||||
logger.info("Starting Agent...");
|
||||
this.agent = new StrolchBootstrapper(StartupListener.class).setupByRoot(environment, pathF);
|
||||
this.agent.initialize();
|
||||
this.agent.start();
|
||||
logger.info("Agent started.");
|
||||
File pathF = new File(realPath);
|
||||
String environment = StrolchEnvironment.getEnvironmentFromEnvProperties(pathF);
|
||||
logger.info("Starting Agent...");
|
||||
this.agent = new StrolchBootstrapper(StartupListener.class).setupByRoot(environment, pathF);
|
||||
this.agent.initialize();
|
||||
this.agent.start();
|
||||
logger.info("Agent started.");
|
||||
} catch (Exception e) {
|
||||
logger.error("Server startup failed due to: " + e.getMessage(), e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -37,16 +37,20 @@ public class StartupListener implements ServletContextListener {
|
|||
|
||||
@Override
|
||||
public void contextInitialized(ServletContextEvent sce) {
|
||||
try {
|
||||
String realPath = sce.getServletContext().getRealPath("/WEB-INF");
|
||||
|
||||
String realPath = sce.getServletContext().getRealPath("/WEB-INF");
|
||||
|
||||
File pathF = new File(realPath);
|
||||
String environment = StrolchEnvironment.getEnvironmentFromEnvProperties(pathF);
|
||||
logger.info("Starting Agent...");
|
||||
this.agent = new StrolchBootstrapper(StartupListener.class).setupByRoot(environment, pathF);
|
||||
this.agent.initialize();
|
||||
this.agent.start();
|
||||
logger.info("Agent started.");
|
||||
File pathF = new File(realPath);
|
||||
String environment = StrolchEnvironment.getEnvironmentFromEnvProperties(pathF);
|
||||
logger.info("Starting Agent...");
|
||||
this.agent = new StrolchBootstrapper(StartupListener.class).setupByRoot(environment, pathF);
|
||||
this.agent.initialize();
|
||||
this.agent.start();
|
||||
logger.info("Agent started.");
|
||||
} catch (Exception e) {
|
||||
logger.error("Server startup failed due to: " + e.getMessage(), e);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -22,22 +22,22 @@ public class StartupListener implements ServletContextListener {
|
|||
|
||||
@Override
|
||||
public void contextInitialized(ServletContextEvent sce) {
|
||||
|
||||
String realPath = sce.getServletContext().getRealPath("/WEB-INF");
|
||||
|
||||
File pathF = new File(realPath);
|
||||
String environment = StrolchEnvironment.getEnvironmentFromEnvProperties(pathF);
|
||||
logger.info("Starting Strolch Minimal Rest...");
|
||||
try {
|
||||
String realPath = sce.getServletContext().getRealPath("/WEB-INF");
|
||||
|
||||
File pathF = new File(realPath);
|
||||
String environment = StrolchEnvironment.getEnvironmentFromEnvProperties(pathF);
|
||||
logger.info("Starting Strolch Minimal Rest...");
|
||||
this.agent = new StrolchBootstrapper(StartupListener.class).setupByRoot(environment, pathF);
|
||||
this.agent.initialize();
|
||||
this.agent.start();
|
||||
|
||||
logger.info("Started Strolch Minimal Rest.");
|
||||
|
||||
} catch (Exception e) {
|
||||
logger.error("Failed to start Strolch due to: " + e.getMessage(), e);
|
||||
logger.error("Server startup failed due to: " + e.getMessage(), e);
|
||||
throw e;
|
||||
}
|
||||
|
||||
logger.info("Started Strolch Minimal Rest.");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue