Class MigrateDeadlineManagerConfiguration
- All Implemented Interfaces:
Cloneable
Axon Framework 4's ConfigurationScopeAwareProvider collected the components a fired deadline is delivered
to from the configuration. The legacy module does not port it: it registers its own ScopeAwareProvider as a
component of the configuration, with which the Saga managers register themselves. The recipe therefore replaces
new ConfigurationScopeAwareProvider(configuration) with
configuration.getComponent(ScopeAwareProvider.class), which compiles against both the Axon Framework 4 and
the Axon Framework 5 Configuration. For the same reason, it replaces configuration.deadlineManager()
with configuration.getComponent(DeadlineManager.class).
Axon Framework 4 registered a SimpleDeadlineManager by default, and Axoniq Framework 5 registers no
DeadlineManager, except for the JobRunr and db-scheduler deadline managers of its Spring Boot
auto-configuration. Where the replacement is a decision of the application, the recipe leaves a
// TODO(axon4to5): marker on the statement:
configuration.deadlineManager(), as the component it now looks up has to be registered;Configurer#configureDeadlineManager(..), which Axon Framework 5 configurers do not have;registerDispatchInterceptor(..)andregisterHandlerInterceptor(..)called on aDeadlineManager, as the interface no longer declares them;- a
ScopeAwareProviderregistered by the application, throughregisterComponent(..)or a Spring@Beanmethod, as it would replace the provider of the legacy module.
- Since:
- 5.4.0
- Author:
- Mateusz Nowak
-
Nested Class Summary
Nested classes/interfaces inherited from class org.openrewrite.Recipe
org.openrewrite.Recipe.Builder, org.openrewrite.Recipe.DelegatingRecipe -
Field Summary
Fields inherited from class org.openrewrite.Recipe
contributors, examples, PANIC -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.openrewrite.TreeVisitor<?, org.openrewrite.ExecutionContext> Methods inherited from class org.openrewrite.Recipe
addDataTable, aggregateDataTableDescriptors, builder, buildRecipeList, causesAnotherCycle, clone, createRecipeDescriptor, equals, getContributors, getDataTableDescriptors, getDescriptor, getEstimatedEffortPerOccurrence, getExamples, getInstanceName, getInstanceNameSuffix, getJacksonPolymorphicTypeTag, getMaintainers, getName, getRecipeList, getTags, hashCode, maxCycles, noop, onComplete, run, run, run, setContributors, setExamples, validate, validate, validateAll, validateAll, withOptions
-
Constructor Details
-
MigrateDeadlineManagerConfiguration
public MigrateDeadlineManagerConfiguration()
-
-
Method Details
-
getDisplayName
- Specified by:
getDisplayNamein classorg.openrewrite.Recipe
-
getDescription
- Specified by:
getDescriptionin classorg.openrewrite.Recipe
-
getVisitor
public org.openrewrite.TreeVisitor<?,org.openrewrite.ExecutionContext> getVisitor()- Overrides:
getVisitorin classorg.openrewrite.Recipe
-