Skip to content

Document limitations of Constructor Command Handler #206

@abuijze

Description

@abuijze

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions