- public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOException {
- System.out.println("*********************");
- Logger.getRootLogger().removeAllAppenders();
- BasicConfigurator.configure();
- registerShutdownHook();
- /* Load config */
- try {
- File configFile = new File(getServletContext().getRealPath(CONFIG_PATH));
- Properties props = new Properties();
- props.load(new FileReader(configFile));
- props.load(new FileReader(configFile));
- ProcessingQueue.getInstance().configure(props);
- /* Start all processing threads */
- for (Runnable runnable : ProcessingQueue.getInstance().getRunnables()) {
- Thread thread = ThreadManager.createBackgroundThread(runnable);
- thread.start();
- }
- } catch (Exception e) {
- throw new IOException("Could not create processing threads", e);
- }
- logger.info("App started");
- }
Stikked
