Replies: 1 comment 1 reply
-
Hi! I can schedule new instances of tasks without a reference to the task. See for example LongRunningJobConfiguration.java public static final TaskWithDataDescriptor<PrimeGeneratorState> LONG_RUNNING_TASK =
new TaskWithDataDescriptor<>("long-running-task", PrimeGeneratorState.class);
...
LONG_RUNNING_TASK.instance("prime-generator", initialState), Instant.now() ...
... |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have created following Spring service that schedules a task:
Here is the task configuration:
However,
LpSakService
is relied on another serviceMailService
which is also using db-scheduler for handling e-posts.In this scenario,
NewApplicationRoutingTaskScheduler
depends onScheduler
, andLpSakService
itself has a subordinate dependency,MailService
, which in turn relies onScheduler
. Notably, there seems to be no explicit circular reference in this configuration.My conjecture is that the issue lies in the fact that the
Scheduler
is awaiting database availability, causing a delay in its instantiation. Consequently, this delay triggers the error message: "Requested bean is currently in creation: Is there an unresolvable circular reference?".I am using
@Lazy
to solve this. Are there alternative methods that could be considered? Am I doing something wrong?Beta Was this translation helpful? Give feedback.
All reactions