All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.alogic.doer.webapp.Bootstrap Maven / Gradle / Ivy

There is a newer version: 1.6.16
Show newest version
package com.alogic.doer.webapp;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.alogic.doer.core.TaskCenter;

/**
 * Bootstrap
 * @author yyduan
 * 
 * @since 1.6.9.3
 */
public class Bootstrap implements ServletContextListener {
	/**
	 * a logger of log4j
	 */
	protected static final Logger logger = LoggerFactory.getLogger(Bootstrap.class);
	
	public void contextInitialized(ServletContextEvent sce) {
		logger.info("The task center will start..");
		TaskCenter tc = TaskCenter.TheFactory.get();
		tc.start();
	}

	public void contextDestroyed(ServletContextEvent sce) {
		TaskCenter tc = TaskCenter.TheFactory.get();
		tc.stop();
		logger.info("The task center has stopped.");
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy