← Quiz: Scheduling and Async: all 10 questions
Quiz: Scheduling and Async · Question 6 of 10
An @Async method is private and called from another method of the same bean. What happens?
An @Async method is private and called from another method of the same bean. What happens?
- A.It runs on a background thread
- B.Spring throws an error at startup
- C.It runs normally on the caller's thread, because the proxy is bypassed
- D.It never runs
Answer & explanation
Correct answer: It runs normally on the caller's thread, because the proxy is bypassed
@Async is proxy-based, like @Transactional; private methods and self-calls are not intercepted.
Can you get the rest right without peeking?
Take the timed Quiz: Scheduling and Async quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →