Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
09-07-2019 11:30 PM
Since I want to use different databases in different scenarios, I want to use AbstractRoutingDatasource. However, I could not find an appropriate setting in which I can use both AbstractRoutingDatasource and Spring Data Neo4j (e.g., using @Transactional and automatic session injection). How can I do that?
09-10-2019 12:27 AM
Hi, AbstractRoutingDatasource
is not supported by Neo4j, it's JDBC specific.
Here is one possible solution to implement what you want:
https://michael-simons.github.io/neo4j-sdn-ogm-tips/using_multiple_session_factories.html
Please let me know, if that helps.
09-10-2019 10:29 PM
The solution can be used if we have a constant number of databases. In our application, the databases may be added or deleted. What can be done in such an application?
09-11-2019 03:45 AM
That's a case for using Neo4j Causual Cluster, which is available in Enterprise edition.
The Bolt driver has dedicated routing support through the bolt+routing
protocol, which does exactly that.
09-11-2019 04:10 AM
It seems that causal clustering is for having redundancy in data storage and being able answer more requests. What I need here is different databases, each having its own independent data. Something similar to AbstractRoutingDatasource
or the solution you proposed in the previous post but with dynamic databases (databases being added and removed).
09-11-2019 04:23 AM
Sorry, but it seems I cannot help you on that. However, an upcoming Neo4j version will support multiple databases per instance.
09-11-2019 04:24 AM
Can't your proposed solution be extended to support dynamic databases?
All the sessions of the conference are now available online