I’m using axon version 4.9.1 and jobrunr-spring-boot-3-starter 6.3.4.
I started with the deadlinemanager bean, then had to add jobscheduler, then the storageprovider and now it’s asking for the jobmapper bean. I have a feeling this is not the correct way of implementing the deadline manager bean.
Thanks in advance!
I have these beans in my axonconfiguration.java class:
@Bean
public StorageProvider storageProvider(final JobMapper jobMapper) {
final InMemoryStorageProvider storageProvider = new InMemoryStorageProvider();
storageProvider.setJobMapper(jobMapper);
return storageProvider;
}
@Bean
public JobScheduler JobScheduler(final StorageProvider StorageProvider) {
return JobRunr.configure()
.useStorageProvider(StorageProvider)
.useBackgroundJobServer().initialize().getJobScheduler();
}
@Bean
public DeadlineManager deadlineManager(
@Qualifier("eventSerializer") final Serializer serializer,
final JobScheduler jobScheduler,
final TransactionManager transactionManager,
final org.axonframework.config.Configuration configuration
) {
return JobRunrDeadlineManager.builder()
.jobScheduler(jobScheduler)
.scopeAwareProvider(configuration.scopeAwareProvider())
.serializer(serializer)
.transactionManager(transactionManager)
.build();
}
It should work, with just the jobrunner starter as dependency, it should them auto configure the JobRunrDeadlineManager for you. What do you use as persistence layer? Job runner supports a bunch, but maybe the one you use is not compatible, or not correctly configured for Job Runner. I used it a couple of times with both PostgreSQL and MongoDB, and did not need additional configuration.
we use an oracle sql database, could be that that is not yet configured correctly for the job runner, as this will be the first time using it in the project