Disable suppressing exceptions when handling annotated Saga's

Hi All,

Is there a way to disable suppressing exceptions while handling methods on annotated Saga’s when operating within a spring context? The AnnotatedSagaManager exposes a method (through AbstractSagaManager) to do a setSuppressExceptions(false).
When using axon 3.0.5 I could get around this by injecting the SagaManager and calling this operation, but in Axon 3.1.1+ this gives me a “IllegalStateException: Configuration is not initialized yet”. Is there any other way of changing this setting on the SagaManager?

Thanks for your help,

Hi Kris,

there is a timing issue between the Configurer being “confirmed” and the order in which autowired methods in different application contexts are executed. Moving the SagaManager autowiring method to another Configuration file may resolve the issue.

An alternative is to define a bean of type “SagaConfiguration” (carefully name it or mention the bean name in the @Saga annotation). This allows you to configure the components you wish to use for Sagas (or defaults if you like them).

In Axon 3.2, “setSuppressExceptions” will be deprecated and replaced by an HandlerInvocationErrorHandler, which gives more flexibility. This is also easier to configure, as the HandlerInvocationErrorHandler can be defined as a bean (to configure globally) or more specifically using the SagaConfiguration.

Hope this helps.