Skip to content

Commit

Permalink
#2319 Documentation about AOP proxy clarified
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-krecan committed Jan 2, 2025
1 parent 4bb16b7 commit b265117
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,7 @@ and one that proxies TaskScheduler (PROXY_SCHEDULER)
Since version 4.0.0, the default mode of Spring integration is an AOP proxy around the annotated method.

The main advantage of this mode is that it plays well with other frameworks that want to somehow alter the default Spring scheduling mechanism.
The disadvantage is that the lock is applied even if you call the method directly. If the method returns a value and the lock is held
It also means that *the lock is applied even if you call the method directly*. If the method returns a value and the lock is held
by another process, null or an empty Optional will be returned (primitive return types are not supported).

Final and non-public methods are not proxied so either you have to make your scheduled methods public and non-final or use TaskScheduler proxy.
Expand Down

0 comments on commit b265117

Please sign in to comment.