David_W (70) [Avatar] Offline
#1
I suspect that the execution(* Order.*(..)) part of the pointcut should be modified to only include methods that update the order, assuming that order validation could be a slow process.
David_W (70) [Avatar] Offline
#2
Re: listing 16.21 pointcut
In fact, if you had an annotation (like ReadOnly) on methods, you could also use this in the pointcut of listing 16.23. Of course, there are complications - like, the validation and freeze-check on an order also has to detect changes to line items associated with the order.
ramnivas (171) [Avatar] Offline
#3
Re: listing 16.21 pointcut
If validation logic is slow, your suggestion will definitely help, especially if the code is written with @ReadOnly consistently.