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);
}