binder.bind(ResourceLocator.class).toInstance(
new FilesystemResourceLocator(projectFile));
}
};
ServerRuntime runtime = new ServerRuntime(projectFileLocation,
dataPortModule);
DataDomain domain;
ClassLoader threadContextClassLoader = Thread.currentThread()
.getContextClassLoader();
try {
// need to set context class loader so that cayenne can find jdbc
// driver and
// PasswordEncoder
// TODO: andrus 04/11/2010 is this still relevant in 3.1?
Thread.currentThread().setContextClassLoader(
getClass().getClassLoader());
domain = runtime.getDataDomain();
} catch (Exception ex) {
throw new BuildException(
"Error loading Cayenne configuration from " + projectFile,
ex);
} finally {