🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Spring AOP and Proxies: all 10 questions

Quiz: Spring AOP and Proxies · Question 6 of 10

Method a() calls b() in the same bean; b() has @Async. The controller calls a(). Does b() run asynchronously?

Method a() calls b() in the same bean; b() has @Async. The controller calls a(). Does b() run asynchronously?

  1. A.Yes, always
  2. B.No, because the call to b() is on this, not on the proxy
  3. C.Only if a() is also @Async
  4. D.Only on Java 21 or later
Answer & explanation

Correct answer: No, because the call to b() is on this, not on the proxy

Self-invocation skips the proxy, so the @Async advice never runs for that call.

Can you get the rest right without peeking?

Take the timed Quiz: Spring AOP and Proxies quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →