New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Configurer#registerHandlerEnhancerDefinition
#2545
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add a method to register HandlerEnhancerDefinitions through the Configurer. The Configurer should receive a default implementation doing nothing to support users using a custom Configurer instance. The DefaultConfigurer should adjust the defaultHandlerDefinition() operation such that registered HandlerEnhancerDefinitions are added and combined with enhancers originating from the default HandlerDefinition itself, if this is a MultiHandlerDefinition. All enhancers should be flattened into one big collection for the final HandlerDefinition. Lastly, tests should show this behavior to work for non-Spring and Spring environments #feature/handler-enhancer-configuration
smcvb
added
Type: Feature
Use to signal an issue is completely new to the project.
Priority 3: Could
Low priority. Issues that are nice to have but have a straightforward workaround.
Status: In Progress
Use to signal this issue is actively worked on.
labels
Jan 3, 2023
smcvb
requested review from
gklijs and
CodeDrivenMitch
and removed request for
a team
January 3, 2023 15:53
CodeDrivenMitch
approved these changes
Jan 3, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
abuijze
requested changes
Jan 4, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very small change request
Remove default implementation, as we expect a concrete implementation at all times. Furthermore, the chances are slim users implement their own Configurer from scratch. Thus, users wouldn't hit a breaking changes through this non-default interface method. #2545
Kudos, SonarCloud Quality Gate passed! |
smcvb
added
Status: Resolved
Use to signal that work on this issue is done.
and removed
Status: In Progress
Use to signal this issue is actively worked on.
labels
Jan 5, 2023
smcvb
added a commit
to AxonIQ/reference-guide
that referenced
this pull request
Jan 23, 2023
The Handler Enhancers section contains some minor inconsistency that should be resolved. Like, usage of the `annotationAttributes` method, which is deprecated. Furthermore, the configuration section shouldn't point to HandlerDefinition configuration at all, as that should be a separate section. Lasty, we can add the new registerHandlerEnhancerDefinition method of the Configurer, following PR AxonFramework/AxonFramework#2545 #enhancement/af-4.7-adjustments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Priority 3: Could
Low priority. Issues that are nice to have but have a straightforward workaround.
Status: Resolved
Use to signal that work on this issue is done.
Type: Feature
Use to signal an issue is completely new to the project.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces a method to the
Configurer
to registerHandlerEnhancerDefinitions
.The
DefaultConfigurer#defaultHandlerDefinition
operation is adjusted to combine allHandlerEnhancerDefinitions
registered through theConfigurer
with enhancer definitions originating from the ServiceLoader mechanism.It does so through construction of the default
HandlerDefinition
through theClasspathHandlerDefinition
.This implementation in turn uses the
ClasspathHandlerEnhancerDefinition
to retrieve enhancers through the ServiceLoader mechanism.The service-loaded instances and registered instances are flattened into a single collection and given to a new `MultiHandlerDefinition.
Lastly, this PR validates this behavior to work for non-Spring and Spring environments.