Database Reference
In-Depth Information
to gain access to the Neo4j database by instantiating an appropriate instance of the
GraphDatabaseService interface. Your application can then use this reference to
interact with Neo4j, using all of the APIs we've discussed so far. The Embed-
dedGraphDatabase class typically is used for a single machine setup; the
HighlyAvailableGraphDatabase class is used for a multimachine setup. High
Availability (HA) is covered in chapter 11 .
Required libraries
If you're using Maven within your project ( http://maven.apache.org ) , the following listing
shows all that's required to import the appropriate embedded Neo4j libraries into your ap-
plication.
Listing 10.1. Embedded Neo4j dependencies
Maven will ensure that all the required dependencies will also be downloaded for you
as part of its transitive dependency management system. In other words, Maven will work
out what other supporting libraries also need to be downloaded in addition to the main
Neo4j libraries and ensure that these are retrieved for you.
Ifyoudon'tuseMaven,you'llneedtodownloadtheappropriatezip/tarballfromtheNeo4j
websiteandextractthenecessarylibrariesfoundinthelibdirectory.Thenextlistingshows
theresultoftheMaven dependency:tree execution ,showingwhatadditionallib-
raries Maven downloads when you request the core embedded libraries.
 
Search WWH ::




Custom Search