Question

How can Neo4j embedded be used from either Java or Scala version of Play framework? I'm having trouble finding any information on that.

Was it helpful?

Solution

I wrote AnormCypher for REST, based on Play's Anorm. I'm actually planning on adding some embedded support in 0.4.

However, Fynn came out with ACE (AnormCypherEmbedded), which I haven't tried--but it looks like it might fit your bill: http://fynnfeldpausch.github.com/ace/

You can also use the neo libraries directly via their Java API (or via SpringData).

OTHER TIPS

I got Neo4j version v1.9.M05 to work (on Windows) by including in Build.scala

 val appDependencies = Seq(
...
"org.neo4j.app" % "neo4j-server" % "1.9.M05" classifier "static-web" classifier "",
"ch.qos.logback" % "logback-core" % "1.0.3" force(),
"ch.qos.logback" % "logback-classic" % "1.0.3" force()

There's a thread about having to use older logbacks (otherwise causes some exception) - Play 2.1 and Neo4J WrappingNeoServer errors with Logback.xml

Details on the milestone build is here -http://docs.neo4j.org/chunked/milestone/server-embedded.html. I haven't tried for the stable release, but the documentation is similar - http://docs.neo4j.org/chunked/stable/server-embedded.html

E.g. test if it works

GraphDatabaseService graphDb = new GraphDatabaseFactory().newEmbeddedDatabase(DB_PATH);
// get all the nodes
Iterable<Node> nodes = GlobalGraphOperations.at(graphDb).getAllNodes();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top