}
}
private static FaunusGremlinScriptEngine getScriptEngine(final RexsterApplicationGraph rag,
final Map<String,String> configOverrides) {
final FaunusGremlinScriptEngine engine = new FaunusGremlinScriptEngine();
final Configuration configuration = new Configuration();
final Map<String,String> properties = rag.findExtensionConfiguration(
FaunusRexsterExecutorExtension.EXTENSION_NAMESPACE, FaunusRexsterExecutorExtension.EXTENSION_NAME)
.tryGetMapFromConfiguration();
// add properties from rexster.xml to the configuration
applyToConfiguration(configuration, properties);
// override rexster.xml values with those from the job request
applyToConfiguration(configuration, configOverrides);
writeConfigurationToLog(configuration);
final FaunusGraph graph = new FaunusGraph(configuration);
engine.put("g", graph);
return engine;
}