I am facing strange issue, i have same @EventHandler method with same event class in Aggregate and in non Aggregate class, only aggregate @EventHandler methods are called.I assume both methods should be called, one in Aggregate and in non Aggregate(EventListener) class.
I have configured properly as per the ToDoItem example, created bean in spring config file and also added axon:annotation-config/ <context:annotation-config /> and even i tried adding AnnotationEventListenerBeanPostProcessor bean also.
Am i missing any configurations. I am completely blocked after the initial aggregate based conditions i need to publish other commands and events. Please help me.
I have tested with JUnit test cases with Axon 2.0.2 and 2.0.4 no luck.
Have few question for clarity.
- Can we inject or @Autowire beans in Aggregate class.
- I am sure at least one event handler method must present in Aggregate class for replay before applying new event in the event store.
- As a best practice where should i add my business logic either in command handler or EventHandler or EventListener.
Thanks for the help in Advance.