WeakReference<ClassLoader> ref = new WeakReference<ClassLoader>(Thread.currentThread().getContextClassLoader());
context.setAttribute("seam.context.classLoader",ref);
log.debug("Cached the context classloader in servletContext as 'seam.context.classLoader'");
context.setAttribute(SERVLET_CONTEXT_KEY, context);
servletContext = context;
Lifecycle.beginApplication( new ServletApplicationMap(context) );
}