Commit Graph

443 Commits

Author SHA1 Message Date
Oliver Drotbohm
bbae486935 GH-454 - Fix event externalization for RabbitMQ.
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.
2024-01-16 19:54:31 +01:00
Oliver Drotbohm
f98162ae87 GH-453 - Guard against AutoConfiguration- and EntityScanPackages bean definitions not having any constructor argument defined. 2024-01-16 19:52:51 +01:00
Oliver Drotbohm
6afc00c554 GH-452 - Introduce EventPublicationRepository.findCompletedPublications().
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.
2024-01-16 19:50:41 +01:00
Oliver Drotbohm
e3dbd029d0 GH-446 - Fix invalid reference in event externalization reference docs. 2024-01-10 15:30:12 +01:00
Oliver Drotbohm
0aa101d5ee GH-444 - Polishing. 2024-01-10 14:49:56 +01:00
Oliver Drotbohm
86a9775e47 GH-444 - Declare most concrete type for EventPublicationRegistry configuration. 2024-01-10 14:49:13 +01:00
Oliver Drotbohm
edaec89ef4 GH-434 - Prepare next development iteration. 2023-12-21 23:28:18 +01:00
Oliver Drotbohm
96cd72ee91 GH-434 - Release version 1.1.1. 2023-12-21 23:28:17 +01:00
Oliver Drotbohm
9ce5b33743 GH-431 - Include JSR 303 ConstraintValidator implementations in bootstrap dependency analysis.
Spring Boot configures Hibernate Validator in a way that the latter looks up the components it needs to instantiate via the Spring container. That in turn then creates prototype instances of the types requested. This means, implementations of e.g. ConstraintValidator do not need to be explicitly marked as Spring beans, but could still declare dependencies to other Spring beans. If such a dependency crosses a module boundary, we currently fail to detect that implicitly established module dependency.

This is now fixed by considering ConstraintValidator implementations Spring beans implicitly in out bootstrap dependency analysis.
2023-12-21 22:29:48 +01:00
Oliver Drotbohm
3b8b10497d GH-429 - Avoid duplicate inclusions of modules in test executions. 2023-12-21 22:22:44 +01:00
Oliver Drotbohm
85520fe4b2 GH-424 - Update compatibility builds. 2023-12-21 14:22:48 +01:00
Oliver Drotbohm
b53d463195 GH-425 - Upgrade to jMolecules 2023.1.1. 2023-12-21 14:21:10 +01:00
Oliver Drotbohm
7012e1c9cc GH-424 - Upgrade to Spring Boot 3.2.1. 2023-12-21 14:19:45 +01:00
Oliver Drotbohm
5794e06e33 GH-423 - Upgrade to Spring Cloud AWS 3.0.4. 2023-12-21 14:18:41 +01:00
Oliver Drotbohm
5d703a5eaf GH-407 - Ignore Spring AOT generated types in architecture model.
We now explicitly exclude classes generated by Spring AOT in the architectural model. For technical reasons, they might introduce dependencies to application components considered module internals otherwise. Also, proxies generated do not need to be considered either.
2023-12-06 14:20:57 +01:00
Oliver Drotbohm
69ec01ac01 GH-399 - Avoid event publication completion for failed CompletableFutures.
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.
2023-11-28 17:13:03 +01:00
Oliver Drotbohm
768103fd32 GH-393 - Prepare next development iteration. 2023-11-28 17:09:00 +01:00
Oliver Drotbohm
c6c0c0f500 GH-393 - Release version 1.1.0. 2023-11-24 18:22:06 +01:00
Oliver Drotbohm
8195f2abb0 GH-389 - Upgrade to Spring Framework 6.1. 2023-11-24 17:28:45 +01:00
Oliver Drotbohm
2a826e87c7 GH-388 - Upgrade to Spring Boot 3.2. 2023-11-24 17:27:10 +01:00
Niki Micallef
f81c155011 GH-383 - Update runtime.adoc by completing intro paragraph.
Original pull request: GH-384.
2023-11-24 15:32:45 +01:00
nkolosnjaji
2afa435722 GH-369 - Prefer MongoTemplate.findAndModify(…) over ….updateFirst(…).
Original pull request: GH-380.
2023-11-24 13:28:32 +01:00
Oliver Drotbohm
b4bb541649 GH-372 - Propagate original exception from CompletionRegisteringAdvisor.
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.
2023-11-19 21:58:32 +01:00
Oliver Drotbohm
9d30fcd29c GH-373 - Fix detection of jMolecules Layered Architecture presence. 2023-11-17 17:14:17 +01:00
Oliver Drotbohm
af0323893b GH-376 - Polishing. 2023-11-17 16:46:02 +01:00
Oliver Drotbohm
37f2bdb4d6 GH-376 - Avoid initializing ApplicationModules for actuators on native images.
We now register a BeanFactoryInitializationAotProcessor to generate the actuator endpoint content representing the application module structure at AOT processing time. That file is then preferred over bootstrapping an ApplicationModules instance when bootstrapping the endpoint.
2023-11-17 16:30:16 +01:00
Oliver Drotbohm
08e837f7ec GH-375 - Avoid initialization of ApplicationModulesRuntime if possible. 2023-11-17 15:23:10 +01:00
Oliver Drotbohm
9f42ae4308 GH-368 - Polishing. 2023-11-14 11:02:21 +01:00
Oliver Drotbohm
80e53accf7 GH-368 - Integration tests. 2023-11-14 11:01:49 +01:00
Benjamin Knauer
74dda2cdae GH-368 - Consider filter handed into IncompleteEventPublications.resubmitIncompletePublications(…).
Original pull request: GH-367.
2023-11-14 11:00:41 +01:00
Oliver Drotbohm
a518707c7e GH-371 - Disable waiting for termination defaulting on Spring Framework 6.1.
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.
2023-11-14 10:16:57 +01:00
Oliver Drotbohm
3692a209d7 GH-364 - Register reflection metadata for ApplicationListenerMethodAdapter.
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.
2023-11-07 20:35:22 +01:00
Oliver Drotbohm
e2cc4fe2a4 GH-345 - Properly handle manually declared entity scan and autoconfiguration packages.
If Spring Modulith packages were explicitly configured as autoconfiguration or entity scan packages, the test autoconfiguration would fail as it previously attempted to manipulate an immutable list. We now create a copy of that list to fix this.
2023-11-03 20:16:38 +01:00
Oliver Drotbohm
4e453885ee GH-359 - Add Now.instant(). 2023-11-03 10:42:30 +01:00
Oliver Drotbohm
20a7474f2f GH-358 - Prepare next development iteration. 2023-11-03 09:02:46 +01:00
Oliver Drotbohm
6336e32d54 GH-358 - Release version 1.1.0-RC2. 2023-11-03 09:02:45 +01:00
Oliver Drotbohm
72e33fca5f GH-354 - Upgrade to Spring Boot 3.2 RC2.
Also, let only examples run on integration versions.
2023-11-03 08:24:11 +01:00
Oliver Drotbohm
40ab6cecfc GH-357 - Reinstantiate general compatibility with Boot 3.2 / Framework 6.1.
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.
2023-11-02 14:27:52 +01:00
Oliver Drotbohm
cef3ffbe7e GH-356 - Removed legacy way of tweaking autoconfiguration and entity scan packages for test runs. 2023-11-02 14:06:11 +01:00
Oliver Drotbohm
792b69c25e GH-355 - Polish Kotlin code samples in event section of reference documentation. 2023-11-02 08:26:00 +01:00
Oliver Drotbohm
e8898c1da1 GH-344 - Polishing.
Switch to DelegatingEventExternalizer APIs changed to return CompletableFuture. Imports, formatting. Drop dependencies not needed.
2023-11-02 08:22:28 +01:00
Maciej Walkowiak
d95da874bd GH-344 - Support for event externalization into AWS SNS and SQS.
Additional event externalization implementations for AWS SNS and SQS.

Original pull request: GH-350.
2023-11-02 08:22:28 +01:00
Oliver Drotbohm
0ae19fb301 GH-353 - Improvements in internal event externalization APIs.
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.
2023-11-01 23:48:06 +01:00
Oliver Drotbohm
e4190c47aa GH-346 - Allow explicit declaration of identifier in @ApplicationModuleListener. 2023-11-01 23:48:04 +01:00
Oliver Drotbohm
e5ca4f7183 GH-349 - Register parameters of methods annotated with @TransactionalEventListener for reflection. 2023-10-27 13:45:25 +02:00
Oliver Drotbohm
889c849492 GH-348 - Avoid eager reference to runtime artifact from core starter.
Removed the inclusion of the spring-modulith-runtime artifact from the …-starter-core one to avoid issues in native images in a Spring Modulith default setup. As the artifact is still needed to support ApplicationModuleInitializer implementations, we now explicitly check for the presence of those and verify the artifact is actually available and hint the user at explicitly adding it if missing.
2023-10-27 09:41:26 +02:00
Oliver Drotbohm
576b8f5074 GH-342 - Allow disabling event externalization.
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.
2023-10-23 12:22:42 +02:00
Oliver Drotbohm
69fd64dbf7 GH-341 - Prepare next development iteration. 2023-10-23 09:12:13 +02:00
Oliver Drotbohm
d4cde409a1 GH-341 - Release version 1.1.0-RC1. 2023-10-23 09:12:13 +02:00
Oliver Drotbohm
00abfca27c GH-330 - Upgrade to Spring Framework 6.1 RC1 for Javadoc. 2023-10-23 08:46:47 +02:00