Explicitly exclude Reactor Core to avoid the Neo4j reactive auto-configuration kicking in, now unconditionally registering a reactive transaction manager causing simple @Transactional declarations to break as two transaction manager beans are present.
Also upgrade to Spring Framework 6.1.4 for Javadoc reference.
Added indexes for HSQLDB (after fix for GH-507). Removed by-listener index for MySQL as it would not be used anyway. Polished index names. Disable Spring Boot banners in tests.
Original pull request: GH-411.
We now use ResourceDatabasePopulator to execute the schema files creating the infrastructure for the event publication registry. This makes sure that the statements in those files are executed individually.
Related ticket: GH-403.
We now properly wrap the null value returned as a result from the RabbitMQ event externalization into a CompletableFuture. Tightened test case to prevent regressions going forward.
The default EventPublicationRegistry previously erroneously called find*In*completePublications(), i.e. returned incomplete publications when it was supposed to look up the completed ones. To be able to do the latter we need to extend EventPublicationRepository and introduce a query execution for all completed publications.
As we'd normally only chance API in major versions, but the bugfix needing to go into a bugfix release, the new method is introduced as default method rejecting the execution in case a currently existing repository implementation does not implement it. This allows us to adapt the implementations we ship to support the bugfix, but will require other implementations to ship an adapted version. This means we can ship a release that's not breaking assuming one of the official store implementations is used.
We now explicitly handle CompletableFuture instances returned from transactional event listeners by registering the completion handlers only on success, the debug logging on failure and immediately return the decorated instance.
Previously, a failed CompletableFuture instance would still have the publication marked completed as it doesn't cause any exception being thrown and thus ultimately ending up in the code path that issues the completion.
We now propagate potentially occurring exceptions in CompletionRegisteringAdvisor to make sure the standard exception handling facilities kick in, both for synchronous and asynchronous listener invocations.
This implies that during republication we need to handle exceptions to make sure that failing synchronous listeners to not prevent the submission of subsequent publications. We currently log such exceptions into error.
We now skip the defaulting to wait of the pool shutdown termination on Spring Framework 6.1, as on that, pools implement Lifecycle and we need to wait for complete shutdown during Lifecycle.stop() already and setting the flag would delay that wait to the actual destruction phase.
The maintain general compatibility with Spring Framework 6.0, we issue a few reflective inspections on ApplicationListenerMethodAdapter. To make this work properly in native images, we now register those methods for GraalVM reflection.
We now gracefully fall back to reflective invocation of the application event listener shouldHandle(…) method if we're not on Spring Framework 6.2. If we are, we invoke the newly introduced method directly.
This allows projects to upgrade to Spring Modulith 1.1 without necessarily upgrading to Boot 3.2.
DelegatingEventExternalizer.externalize(…) flavors now return a CompletableFuture to allow the target APIs to use asynchronous message sending and to transparently return a result from those invocations.
We now expose spring.modulith.events.externalization.enabled that can be set to false to disable the event externalization completely. Useful in test cases, for example.
We now reflectively invoke ApplicationListenerMethodAdapter.shouldHandle(…) when selecting event listeners to make sure that conditions defined in, for example, @TransactionalEventListener are considered before registering an event publication.