kernel = KernelFactory.newInstance().createKernel(serviceUnitName);
boolean loaded = false;
try {
FileSystemRepository repository = new FileSystemRepository(new File(getRootPath()));
ClassLoaderXmlPreprocessor classLoaderXmlPreprocessor = new ClassLoaderXmlPreprocessor(repository);
List xmlPreprocessors = Collections.singletonList(classLoaderXmlPreprocessor);
SpringLoader springLoader = new SpringLoader();
springLoader.setKernel(kernel);
springLoader.setBaseDir(new File(getRootPath()));
springLoader.setXmlPreprocessors(xmlPreprocessors);