You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While both imperative and reactive transaction managers and the underlying support for Neo4j causal cluster bookmarks have been designed as black boxes and the bookmark manager is not intended to be configurable, there are some scenarios in which it would be helpful to retrieve the latest bookmark an application received from a cluster and seed the transaction system with some bookmarks available.
One of these scenarios is simple: Testing against a cluster database and seeding that database via a driver session outside Springs transaction management so that the code under test is not used to seed and assert, too.
The new APIs introduced for that should be considered experimental for the time being, but we intend to keep them around for the purpose mentioned above and support them in the future.
We will use Springs event system to retrieve the latest bookmark and allow exactly one supplier of bookmarks to seed the transaction system.
The text was updated successfully, but these errors were encountered:
…nsaction managers.
This change introduces the `Neo4jBookmarksUpdatedEvent`. It will be published by both the imperative and reactive transaction managers as soon as any of them receives a new bookmark from the cluster. Applications will be able to listen to it by implementation `ApplicationListener<Neo4jBookmarksUpdatedEvent>`. The event returns an unmodifiable view of new bookmarks.
In addition a new constructor has been added to the transaction managers for allowing the configuration of the bookmark system. `org.springframework.data.neo4j.core.transaction.Neo4jBookmarkManager#create(java.util.function.Supplier<java.util.Set<org.neo4j.driver.Bookmark>>)` can be used to add a supplier of bookmarks as seeding mechanism.
This closes#2252.
While both imperative and reactive transaction managers and the underlying support for Neo4j causal cluster bookmarks have been designed as black boxes and the bookmark manager is not intended to be configurable, there are some scenarios in which it would be helpful to retrieve the latest bookmark an application received from a cluster and seed the transaction system with some bookmarks available.
One of these scenarios is simple: Testing against a cluster database and seeding that database via a driver session outside Springs transaction management so that the code under test is not used to seed and assert, too.
The new APIs introduced for that should be considered experimental for the time being, but we intend to keep them around for the purpose mentioned above and support them in the future.
We will use Springs event system to retrieve the latest bookmark and allow exactly one supplier of bookmarks to seed the transaction system.
The text was updated successfully, but these errors were encountered: