This is a Java-configured exact mirror of the SB flow XML configuration from the previous example (Listing 9-63). The main class of this example is also similar; we excluded the annotations @EnableBatchProcessing (because this annotation is located in BatchConfiguration) and @ImportResource (because in this case we don’t have any XML configuration files). The output of this example is again the same as in the previous example (Listing 9-65) and shows that batch scopes work as expected when transferring state.
Batch-Processing Listeners
Most of the Spring abstractions provide powerful mechanisms for their interceptions. SB is no exception, and we can intercept as follows:
- Before and after Job with the JobExecutionListener interface or @BeforeJob ...
Get Pivotal Certified Spring Enterprise Integration Specialist Exam now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.