The `@Nullable` annotations have been removed. JSR 305 is dormant and we don’t want neither Spring Core nor JetBrains nor any other bigger library on the classpath for those.
Some Assertions have been copied over from Spring Core.
This brings back the log output. junit-jupiter-causal-cluster-testcontainer-extension 4.0.1.0 included slf4j-simple as transitive dependency and so the log was piped there.
This brings in support for causal bookmarks of Neo4j. It requires no configuration from the user nor an additional library. It works out of the box for everything that runs inside a Spring managed transaction, for both imperative and reactive scenarios.
The core idea for both scenarios is as follows:
* Keep a list of all bookmarks ever retrieved from a cluster
* Pass that list to new transactions, the server sorts and merges them for us, no need to worry about the order
* When the transaction completes, collect the last bookmark from it and replace the used bookmarks from beforehand (and only them) with it. Thus, the bookmark returned by a parallel transactions is not affected
* The bookmarks work as a "at least" indicator, so all new transactions will see at least what they have written and are thus serialisable on the application side of things.
This closes#158.
Co-authored-by: Gerrit Meier <meistermeier@gmail.com>
This fixes#124 by providing the a Neo4jDatabaseNameProvider.
The Neo4jDatabaseNameProvider allows for configuring the database used by all transactions managers and all templates. The configured database will be passed on to the Neo4j templates, both reactive and imperative. The Neo4j clients are still be able to use all databases, they don't know a fixed database name provider.
The database name provider must of course be provided to the transaction managers. Both reactive and imperative transaction managers keep on synchronising on the driver, but check the target database and will prevent switching the database in-between an application level transaction.
For those scenarios where a client wants to use a different database than the one configured with the default transaction manager, it must run in an implicit (aka auto commit transaction) or run a second transaction manager, configured to use the correct database.
In case interactions spawn multiple databases, several transaction managers must be applied and the propagation behaviour needs to be `REQUIRES_NEW`, meaning an ongoing transaction will be suspended when the database is switched and resumed when the inner transaction finishes.
The commit also contains the requried properties for the Spring Boot autoconfiguration.
Although the R2DBC dependency is only used for testing
the BOM will get picked up by gradle.
Because it is a SNAPSHOT dependency the resolution will fail
and SDN-RX cannot be used in gradle projects if the users
do not add the Spring snapshots repository.
This adds a new @DataNeo4jTest that provides additional auto configuration. When the Neo4j test harness (https://medium.com/neo4j/testing-your-neo4j-based-java-application-34bef487cc3c) is on the class-path and no other Driver bean is provided, it creates an embedded test server.
An already existing test server is recognised, so that user can run their own enterprise test harness if they want.
If test harness isn't on the class-path or excluded from the slice, the slice falls back to using an existing driver bean respectively delegates to the drivers auto configuration, thus recognising org.neo4j.driver.uri and related properties.
We can upgrade the optional dependencies for the test harness in a later step.
* fixed test : SessionConfig builder doesn't lowercase the database in this version
* success/failure becoming commit/rollback in the driver api
* Bookmark has been moved to public driver api.
This commit closes#40 by updating Spring Data Commons to RC3 and Spring Boot to M6. It also drops management of Kotlin and Project Reactor dependencies. Instead, it relies on the management done by Spring Data Commons in RC3.
Furthermore, it restores convergences between the dependencies of Spring Data R2DBC and R2DBC-H2 by using R2DBC’s bom as well.
This is done by Spring Datas parent build infrastructure already when run with profile CI or distribute.
Spring Datas configuration of JavaDoc doesn’t handle self-closing html tags, so I replaced them.
See https://maven.apache.org/maven-ci-friendly.html for reference.
In addition, all examples are now independ from the main project. They use the same technique for the dependencies as the neo4j-java-driver-spring-boot-starter.
When run without the version numbers set, they define their own and recreate the dependencies version based on that.
When the first alpha has been released, the changelist attribute should reflect that, too.
* Update Spring Data commons to 2.2.0-RC1.
Also update Spring Data R2DBC to a buildsnapshot as its reactive
transaction manager doesn't work with the latest Spring Framework 5.2
and Spring Data Parent installments.
* Provide BeforeBindCallback and related infrastructure.
* Provide reactive BeforeBindCallback and related infrastructure.
* Implement imperative and reactive auditing of entities.
This creates independent projects for the Spring Boot Starter and the examples. The Spring Boot Starter project inherits now from Spring Boot.
The required Java version for the examples has been bumped to 12 (latest version as of writing).
- Set dependency to Spring Data commons 2.2.0.M4.
- Transaction synchronization with other transaction managers.
- Shared Neo4jTransactionUtils for reactive and imperative.