class WeldContextListener implements ServletContextListener {

    public void contextDestroyed(ServletContextEvent sce) {
        if (null != beanManager) {
            beanManager = null;
        }
    }

}