List processors = new ArrayList();
processors.add(new ClassLoaderXmlPreprocessor(new FileSystemRepository(new File("."))));
System.out.println("Loading Apache ServiceMix from file: " + file);
context = new FileSystemXmlApplicationContext(file, processors);
}
SpringJBIContainer container = (SpringJBIContainer) context.getBean("jbi");
Object lock = new Object();
container.setShutdownLock(lock);
// lets wait until we're killed.
synchronized (lock) {
lock.wait();
}