// temporary classloader is used for processing ejb annotations and byte code manipulation during ejb load
// TemporaryClassLoader temporaryClassLoader = new TemporaryClassLoader(new URL[0], bundleLoader);
// create an openejb app module for the ear containing all ejb modules
AppModule appModule = new AppModule(bundleLoader, earContext.getConfigID().toString(), null, ejbModule.isStandAlone());
for (EjbModule module : earData.getEjbModules()) {
module.setClassLoader(bundleLoader);
appModule.getEjbModules().add(module.getEjbModule());
}
if(!ejbModule.isStandAlone())
{
appModule.setModuleId(ejbModule.getParentModule().getName());
}
// build the config info tree
// this method fills in the ejbJar jaxb tree based on the annotations
// (metadata complete) and it run the openejb verifier
AppInfo appInfo;
try {
appInfo = configureApplication(appModule, ejbModule, earContext.getConfiguration());
} catch (ValidationFailedException set) {
StringBuilder sb = new StringBuilder();
sb.append("Jar failed validation: ").append(appModule.getModuleId());
for (ValidationError e : set.getErrors()) {
sb.append(e.getPrefix()).append(" ... ").append(e.getComponentName()).append(":\t").append(e.getMessage(2));
}