ClassLoader loader = context.getLoader().getClassLoader();
Object listener = event.getData();
if(listener.getClass().getName().equals("org.apache.webbeans.servlet.WebBeansConfigurationListener"))
{
InstanceManager processor = context.getInstanceManager();
InstanceManager custom = new TomcatInstanceManager(context.getLoader().getClassLoader(),processor);
context.setInstanceManager(custom);
context.getServletContext().setAttribute(InstanceManager.class.getName(), custom);
ContextAccessController.setReadOnly(context.getNamingContextListener().getName());