File descriptor = new File(installRoot + META_INF, DESCRIPTOR_FILE);
log.debug("Checking for descriptor " + descriptor.getAbsolutePath());
if (descriptor.exists()) {
try {
Thread.currentThread().setContextClassLoader(Descriptor.class.getClassLoader());
FileSystemXmlApplicationContext context = new FileSystemXmlApplicationContext("file:///"
+ descriptor.getAbsolutePath(),
Arrays.asList(new Object[] { new XBeanProcessor()}));
root = (Descriptor) context.getBean("jbi");
log.debug("Parsed descriptor " + root);
} catch (Throwable e) {
throw new RuntimeException("Unable to parse the jbi.xml", e);
}
} else {