Closed thibaultmeyer closed 2 years ago
This pull request adds support for the use @Schedule with annotations such as @UnitOfWork or @Transactional or more generally a proxy class.
@Schedule
@UnitOfWork
@Transactional
@Singleton public class TestJob { private final TestService testService; @Inject public TestJob (final TestService testService) { this.testService= testService; } @Schedule(delay = 30, initialDelay = 30, timeUnit = TimeUnit.SECONDS) public void every30seconds() { runOnTransaction(); } @UnitOfWork public void runOnTransaction() { testService.doWork(); } }
@Singleton public class TestJob { private final TestService testService; @Inject public TestJob (final TestService testService) { this.testService= testService; } @Schedule(delay = 30, initialDelay = 30, timeUnit = TimeUnit.SECONDS) @UnitOfWork public void every30seconds() { testService.doWork(); } }
Done + rebase to fix conflict on Changelog.md
Changelog.md
@raphaelbauer
Nice!
This pull request adds support for the use
@Schedule
with annotations such as@UnitOfWork
or@Transactional
or more generally a proxy class.Before
After