FileSystemXmlApplicationContext context=new FileSystemXmlApplicationContext("file: +descriptorFile.getAbsolutePath(),Arrays.asList(new Object[] { new XBeanProcessor() })); root=(Descriptor) context.getBean("jbi"); }finally{
FileSystemXmlApplicationContext context = new FileSystemXmlApplicationContext( "file: Arrays.asList(new Object[] { new XBeanProcessor() })); root = (Descriptor) context.getBean("jbi"); } finally {
    protected static Descriptor buildDescriptor(File tmpDir){        Descriptor root=null;        File descriptorFile=new File(tmpDir,DESCRIPTOR_FILE);        if(descriptorFile.exists()){            ClassLoader cl=Thread.currentThread().getContextClassLoader();            try{                Thread.currentThread().setContextClassLoader(AutoDeploymentService.class.getClassLoader());                FileSystemXmlApplicationContext context=new FileSystemXmlApplicationContext("file:///"                                +descriptorFile.getAbsolutePath(),Arrays.asList(new Object[] { new XBeanProcessor() }));                root=(Descriptor) context.getBean("jbi");            }finally{                Thread.currentThread().setContextClassLoader(cl);            }        }        return root;    }