ClassLoader unitCl = unit.getClassLoader();
// Create the container's WebClassLoader
// and register it with the web service.
String webClassLoaderName = getWebClassLoader(conf, bean);
log.debug("Creating WebClassLoader of class " + webClassLoaderName);
WebClassLoader wcl = null;
try
{
Class clazz = unitCl.loadClass(webClassLoaderName);
wcl = WebClassLoaderFactory.createWebClassLoader(clazz, container.getJmxName(), (RealClassLoader) unitCl);
}
catch (Exception e)
{
throw new DeploymentException("Failed to create WebClassLoader of class " + webClassLoaderName + ": ", e);
}
if (webServiceName != null)
{
WebServiceMBean webServer = (WebServiceMBean) MBeanProxyExt.create(WebServiceMBean.class, webServiceName);
URL[] codebase = {webServer.addClassLoader(wcl)};
wcl.setWebURLs(codebase);
} // end of if ()
container.setWebClassLoader(wcl);
// Create classloader for this container
// Only used to unique the bean ENC and does not augment class loading