Skip to content
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

Document limitations of Constructor Command Handler #206

Open
abuijze opened this issue Jun 24, 2021 · 0 comments
Open

Document limitations of Constructor Command Handler #206

abuijze opened this issue Jun 24, 2021 · 0 comments

Comments

@abuijze
Copy link
Collaborator

abuijze commented Jun 24, 2021

The Constructor Command Handler has a number of limitations compared to regular Command Handler (instance) methods. These should be documented explicitly in the reference guide:

[ ] @ExceptionHandler annotated methods aren't invoked - since there is no instance to invoke a method on
[ ] @HandlerInterceptor annotated methods aren't invoked - since there is no instance to invoke a method on
[ ] AggregateLifecycle.apply() invocations will not result in an immediate invocation of the @EventSourcingHandler. Instead, the @EventSourcingHandler methods are invoked once the constructor completes.

Also, we should (gently) promote the use of instance method with @CreationPolicy(ALWAYS) as an alternative to Constructor Command Handlers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant