Allow to use ImpermanentGraphDatabase with EmbeddedDriver
See original GitHub issueThe docs says “As you can see to use an impermanent data store, you just omit the URI attribute.”
But this is not equivalent to ImpermanentGraphDatabase. ImpermanentGraphDatabase doesn’t create any temporary files and seems to be slightly faster (although I don’t have any benchmark for this at hand).
I can do following, which is slightly awkward, but seems to work fine.
Components.setDriver(new EmbeddedDriver(new TestGraphDatabaseFactory().newImpermanentDatabase()));
new SessionFactory(".. packages .."); // no configuration instance there
It also works with parallel execution, when each worker runs in its own JVM (I tested gradle’s maxParallelForks and expect maven’s forkCount would work as well).
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Reference - OGM Library - Neo4j
To use an impermanent data store which will be deleted on shutdown of the JVM, you just omit the URI attribute. Table 4....
Read more >Temporary Neo4j database to test services - Stack Overflow
I'm building a Spring Application using a Neo4j database. I have some services, that implement basic database-functions like persisting a user ...
Read more >Good Relationships: The Spring Data Neo4j Guide Book
has a powerful graph query language called Cypher, which allows users ... required if you only want to use the embedded driver for...
Read more >Improving the Flavour- Upgrading to Spring Data Neo4j 4.1
In SDN 4.1, the InProcessServer we used in our tests earlier has been deprecated. Instead, we will use an impermanent embedded database. The ......
Read more >org.neo4j.ogm.drivers.embedded.driver.EmbeddedDriver java ...
Best Java code snippets using org.neo4j.ogm.drivers.embedded.driver. ... getURI(); // if no URI is set, create a temporary folder for the graph db //...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Without this, it is also not possible to pass any configuration to the embedded neo4j instance (e.g. via neo4j.conf with Neo4j 3.0). This is prohibits upgrades from Neo4j 2.x to 3.x as setting the
option is not possible.
See this StackOverflow. As a workaround, doing the migration externally is suggested. However this may not be possible in all scenarios.
See my comment here: https://github.com/neo4j/neo4j-ogm/issues/408#issuecomment-442465303.