Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
01-07-2020 12:02 PM
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? https://neo4j.com/developer/java-driver-spring-boot-starter/#_configuration_options
Solved! Go to Solution.
01-14-2020 06:31 AM
01-07-2020 01:13 PM
Along the spring default, you configure the default ogm connection within "application.properties" as described in https://neo4j.com/developer/spring-data-neo4j-rx/ , 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/)
01-07-2020 01:43 PM
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:
01-07-2020 04:16 PM
Hello Mike
I provided with an answer to @SledgeHammer01, I could imagine it will also will support your issue.
Best regards
N
01-14-2020 06:31 AM
All the sessions of the conference are now available online