package de.snailshell.consensus.demo;

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

import de.uka.ipd.consensus.foundation.ConsensusFoundation;

/**
 * @author Thomas Much
 * @version 2006-06-14
 */
public class ConsensusFoundationServletContextListener implements ServletContextListener {

	public void contextInitialized(ServletContextEvent event) { }

	
	public void contextDestroyed(ServletContextEvent event) {

		ConsensusFoundation cf = ConsensusFoundationUtils.getConsensusFoundationManager( event.getServletContext() );
		
		if (cf != null) {
			cf.shutdown();
		}
	}

}
