Neo4j-OGM 4.x Database

Given the latest release of neo4j-ogm is now using the updated 4.x driver:

I'm having trouble finding the docs for how to configure the default database for the OGM driver to connect to on startup (let's say test.db). Today that's handled at the neo4j.conf level but with multi-tenant databases that now relies on the client.

Looking at the SDN-RX project this is done using the driver directly:

Given the tight coupling of Spring with OGM we're looking to see if we can use 4.x with OGM + multi-tenency before migrating to SDN-RX in the future.

Was thinking the relevant attributes would be found here? Neo4j Java Driver Spring Boot Starter - Developer Guides

Along the spring default, you configure the default ogm connection within "application.properties" as described in Spring Data Neo4j - Developer Guides , section "2.2.3. Configuration".
Using more elaborated spring configuration options as "profiles", you could end up having a variety of property files like "application-dev.properties", "application-test.properties", "application-integration.properties", each with different database configuration settings.
This is also possible using YAML files.
Studying the spring configuration options, you find a bunch helpful ways to accomplish the most elaborated "default", "profiled", "fallback" configurations.

Looking at the driver configuration for multi tenancy:
You can apply a multi tenancy schema by
a) one database engine instance accessed by one ip socket address serving one database configured with access rights and roles along the tenancy model
b) one database engine instance accessed by one ip socket address serving multiple databases, optionally configured with access rights and roles along the tenancy model. the client is required to explicitly address the database instance wanted aka "USE "
c) multiple database engine instances, each accessed by another ip socket address serving one or multiple databases, optionally configured with access rights and roles along the tenancy model. the . Or you have multiple different database engine instance, each with a different socket address.

You will address a certain database engine instance by a TCP/IP socket connection consisting of hostname/ip and port. ( e.g. fabric configuration: https://neo4j.com/docs/operations-manual/4.0-preview/fabric/configuration/)

Right - using Neo4jRX there are a litany of options for configuring the database when using the driver directly. My question surrounds configuring the Spring beans / properties to connect to a database on Spring context startup. Its also better articulated here as well:

Hello Mike
I provided with an answer to @SledgeHammer01, I could imagine it will also will support your issue.

Best regards
N

Thanks to @michael.simons cc @gerrit.meier this should work nicely for the time-being:

1 Like