user2690349
user2690349

Reputation: 1

Neo4j connection issue

I have recently started using neo4j and I'd like to know how can I use neo4j jdbc url? There are few options as mentioned here https://github.com/neo4j-contrib/neo4j-jdbc. However, let's say, one process starts in-memory database and another process wants to use the same db using connection. than how can i use jdbc url jdbc:neo4j:mem or jdbc:neo4j:mem:name ? How can I get the database name. Also I tried using jdbc:neo4j:file:/home/user/neo/graph.db but it seems neo4j always try to start the server and hence it failed because there is one location of database files. please help.

Thanks

Upvotes: 0

Views: 353

Answers (1)

Aravind Yarram
Aravind Yarram

Reputation: 80192

There is a java method which starts the in memory database using GraphdatabaseService. This database is using db file:/pathtodb/

That is not a in-memory database. You are actually pointing to the file backed neo4j instance. You cannot create multiple instances of GraphdatabaseService against the same neo4j file based DB.

When can we say its a pure in memory startup?

When you are either using org.neo4j.test.ImpermanentGraphDatabase or using jdbc:neo4j:mem in case of neo4j-jdbc

Upvotes: 1

Related Questions