Skip to content

Commit

Permalink
Added missing transactionManagers
Browse files Browse the repository at this point in the history
  • Loading branch information
spinsysmpeterson committed Dec 23, 2024
1 parent 016943b commit 9e71e01
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/java/org/ohdsi/webapi/service/CDMResultsService.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import org.springframework.transaction.PlatformTransactionManager;

import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.GET;
Expand Down Expand Up @@ -134,6 +135,9 @@ public class CDMResultsService extends AbstractDaoService implements Initializin
@Autowired
private ConversionService conversionService;

@Autowired
private PlatformTransactionManager transactionManager;

@Override
public void afterPropertiesSet() throws Exception {
queryRunner.init(this.getSourceDialect(), objectMapper);
Expand Down Expand Up @@ -555,14 +559,14 @@ private Step getAchillesStep(Source source, String jobStepName) {
AchillesCacheTasklet achillesTasklet = new AchillesCacheTasklet(source, instance, cacheService,
queryRunner, objectMapper);
return stepBuilderFactory.get(jobStepName + " achilles")
.tasklet(achillesTasklet)
.tasklet(achillesTasklet).transactionManager(transactionManager)
.build();
}

private Step getCountStep(Source source, String jobStepName) {
CDMResultsCacheTasklet countTasklet = new CDMResultsCacheTasklet(source, cdmCacheService);
return stepBuilderFactory.get(jobStepName + " counts")
.tasklet(countTasklet)
.tasklet(countTasklet).transactionManager(transactionManager)
.build();
}

Expand Down

0 comments on commit 9e71e01

Please sign in to comment.