public WebappClassLoader run() {
return new WebappClassLoader(parent);
}
});
try {
WebDirContext r = new WebDirContext();
File base = new File(context.getSource().getURI());
r.setDocBase(base.getAbsolutePath());
cloader.setResources(r);
cloader.addRepository("WEB-INF/classes/", new File(base, "WEB-INF/classes/"));
if (context.getScratchDir("ejb") != null) {
cloader.addRepository(context.getScratchDir("ejb").toURI().toURL().toString().concat("/"));