Separating Concurrency Control Code with AOP
This article shows how to use Spring AOP to separate distributed-lock handling completely from business logic. When you use the Lock interface for concurrency control, try-finally blocks and lock-management code can overwhelm the business logic. Just as Spring's @Transactional simplifies transaction management, we will solve this problem with a DistributedLock aspect and extend @DistributedLock with a SpEL evaluator modeled after Spring Cache.


