Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
03-20-2020 03:02 PM
Im doing a migration from Neo4j 3 to 4, and I
m stuck at the following problem:
Before, I had this line to create an embedded database:
service = new GraphDatabaseFactory().newEmbeddedDatabase(dir);
Now, I can't find a similar substitute for it.
What is the correct way to create a embedded database on Neo4j 4.0.2?
03-20-2020 10:55 PM
It is described here: https://neo4j.com/docs/java-reference/current/java-embedded/include-neo4j/#tutorials-java-embedded-s...
DatabaseManagementService managementService = new DatabaseManagementServiceBuilder(databaseDirectory).build();
GraphDatabaseService graphDb = managementService.database(DEFAULT_DATABASE_NAME);
This should work.
Personally I'm struggling with the way to activate the http-console, because it should work with the following snippet (but it does not work)
DatabaseManagementService managementService = new DatabaseManagementServiceBuilder(databaseDirectory)
.setConfig(HttpConnector.enabled, true)
.build();
All the sessions of the conference are now available online