001package org.javasimon.spring;
002
003import javax.servlet.ServletContext;
004
005import org.javasimon.utils.SimonUtils;
006
007import org.springframework.web.context.ServletContextAware;
008
009/**
010 * {@link SimonConfigurationBean} with extended function - just pushes configured manager to the {@link ServletContext} attribute
011 * {@link SimonUtils#MANAGER_SERVLET_CTX_ATTRIBUTE}.
012 *
013 * @author <a href="mailto:virgo47@gmail.com">Richard "Virgo" Richter</a>
014 */
015public class SimonWebConfigurationBean extends SimonConfigurationBean implements ServletContextAware {
016        @Override
017        public void setServletContext(ServletContext servletContext) {
018                servletContext.setAttribute(SimonUtils.MANAGER_SERVLET_CTX_ATTRIBUTE, getSimonManager());
019        }
020}