Class LegacyJobRunrDeadlineManagerAutoConfiguration

java.lang.Object
org.axonframework.extension.springboot.autoconfig.LegacyJobRunrDeadlineManagerAutoConfiguration

@AutoConfiguration(afterName="org.jobrunr.spring.autoconfigure.JobRunrAutoConfiguration") @ConditionalOnClass({org.jobrunr.scheduling.JobScheduler.class,JobRunrDeadlineManager.class}) @ConditionalOnBean(org.jobrunr.scheduling.JobScheduler.class) public class LegacyJobRunrDeadlineManagerAutoConfiguration extends Object
Auto-configures a JobRunrDeadlineManager when the application has a JobRunr JobScheduler, as Axon Framework 4's Spring Boot auto-configuration did.

The manager converts the deadlines it stores with the EventConverter, the counterpart of the event serializer Axon Framework 4 wired, so that deadlines an Axon Framework 4 application scheduled keep firing. A fired deadline runs in a unit of work from the configuration's default UnitOfWorkFactory, and is delivered through the configuration's ScopeAwareProvider, with which the Saga managers register themselves. Define a DeadlineManager bean to configure the manager differently, for example with another converter. This is needed, for example, when running a DeadlineManager in an upgrade scenario with an XStream-based serializer in Axon Framework 4.

Since:
5.4.0
Author:
Jakob Hatzl
  • Constructor Details

    • LegacyJobRunrDeadlineManagerAutoConfiguration

      public LegacyJobRunrDeadlineManagerAutoConfiguration()
  • Method Details

    • deadlineManager

      @Bean @ConditionalOnMissingBean(DeadlineManager.class) public JobRunrDeadlineManager deadlineManager(org.jobrunr.scheduling.JobScheduler jobScheduler, ScopeAwareProvider scopeAwareProvider, Configuration configuration, EventConverter eventConverter)
      Creates the JobRunrDeadlineManager, unless the application defines its own DeadlineManager.
      Parameters:
      jobScheduler - the JobRunr scheduler storing and firing the deadlines
      scopeAwareProvider - the configuration's provider of the components a fired deadline is delivered to
      configuration - the Axon configuration, providing the default UnitOfWorkFactory, the factory of the unit of work a fired deadline runs in
      eventConverter - the converter of the stored deadlines
      Returns:
      the JobRunr deadline manager