question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow to use ImpermanentGraphDatabase with EmbeddedDriver

See original GitHub issue

The 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:closed
  • Created 7 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
geld0rcommented, Aug 4, 2016

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

dbms.allow_format_migration=true

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.

0reactions
michael-simonscommented, Nov 28, 2018
Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found