Relative Content

Tag Archive for springpostgresqlspring-boothibernate

Persistence operations not committed when using @Scheduled annotation

This Spring service, EmailsOutgoingService, is responsible for processing outgoing emails and it is scheduled to run every 60 seconds using the @Scheduled(fixedRate = 60000) annotation.
Basically it checks the status of the email in the queue and performs operations on the existing record or creates another one.
The problem is that the “repository.save” transaction is not committed to the database.