View on GitHub

spring-cqrs-arch

Extension for the Spring framework using CQRS principles. It's useful to implement quickly an webapp.

Changelog

Fixed bean scopes to force singleton scopes. Better exception message for failed command validation. Fixed a bug in the Guava Event bus service. Added a new interface to throw events when a command is successful or failed.

public interface EventThrower {

    /**
     * Event on failure.
     *
     * @return the event that should be thrown (null does not send event)
     */
    Object eventOnFailure(Throwable failure);

    /**
     * Event on success.
     *
     * @param result
     *            the result
     * @return the event that should be thrown (null does not send event)
     */
    Object eventOnSuccess(Object result);
}

Added a new annotation to return an event rather than a value in a CommandServiceSpec

@CommandService
@ReturnEventOnSuccess
public class NotifyCrawlStatusCommandHandler
	implements CommandServiceSpec<NotifyCrawlStatusCommand, EventCrawlStatusUpdated> {

Allow trace configuration override.


www.byoskill.com www.sylvainleroy.com