Package org.xbean.spring.context

Examples of org.xbean.spring.context.FileSystemXmlApplicationContext


                        context = new ClassPathXmlApplicationContext("servicemix.xml", processors);
                    }
                    else {
                        file = args[1];
                        System.out.println("Loading ServiceMix (compatible 1.x) from file: " + file);
                        context = new FileSystemXmlApplicationContext(file, processors);
                    }
                }
                else {
                    System.out.println("Loading ServiceMix from file: " + file);
                    context = new FileSystemXmlApplicationContext(file);
                }
            }
            SpringJBIContainer container = (SpringJBIContainer) context.getBean("jbi");
            Object lock = new Object();
            container.setShutdownLock(lock);
View Full Code Here


        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;
View Full Code Here

       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 {
View Full Code Here

TOP

Related Classes of org.xbean.spring.context.FileSystemXmlApplicationContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.