Achow
Achow

Reputation: 8678

Aspect Oriented Programming- advice runs in same thread?

If I have an advice(before, after or around) which will be applicable to a method, will this advice run in the same thread which invokes the method? This is Spring's AOP.

Upvotes: 8

Views: 2252

Answers (1)

EdH
EdH

Reputation: 5003

Yes, it will run in the same thread. The Aspect will create a proxy of the object method which matches the pointcut definition which will be executed around the method. But it does not do anything on a different thread.

Upvotes: 11

Related Questions