/*
 * JBoss, the OpenSource J2EE webOS
 * 
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */
package org.jboss.test.web.servlets;

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

import org.jboss.logging.Logger;

public class TestContextListener implements ServletContextListener
{
   private static final Logger log = Logger.getLogger(TestContextListener.class);
   
   public void contextInitialized(ServletContextEvent event)
   {
      ClassLoader cl = Thread.currentThread().getContextClassLoader();
      log.info("contextInitialized cl=" + cl);
      try
      {
         cl.loadClass("org.jboss.test.web.util.EarLibUser");
      }
      catch (ClassNotFoundException e)
      {
         log.error("Cannot load class", e);
         throw new RuntimeException(e.toString());
      }
   }

   public void contextDestroyed(ServletContextEvent event)
   {
   }
}
