final String directory = this.configuration.getString(CONFIG_DIRECTORY);
final Map neo4jSpecificConfig = ConfigurationConverter.getMap(this.configuration.subset(CONFIG_CONF));
final boolean ha = this.configuration.getBoolean(CONFIG_HA, false);
// if HA is enabled then use the correct factory to instantiate the GraphDatabaseService
this.baseGraph = ha ?
new HighlyAvailableGraphDatabaseFactory().newHighlyAvailableDatabaseBuilder(directory).setConfig(neo4jSpecificConfig).newGraphDatabase() :
new GraphDatabaseFactory().newEmbeddedDatabaseBuilder(directory).
setConfig(neo4jSpecificConfig).newGraphDatabase();
this.transactionManager = ((GraphDatabaseAPI) this.baseGraph).getDependencyResolver().resolveDependency(TransactionManager.class);
this.cypher = new ExecutionEngine(this.baseGraph);
this.neo4jGraphVariables = new Neo4jGraphVariables(this);