citu_adrian (17) [Avatar] Offline
Hi again,

Here are my comments about the chapter 16:

Paragraph 16.1.2 Injecting dependencies with Spring and AspectJ.
- In the Listing 16.9 you use the ConfigurableObject interface. I think you should tell that it is a Spring interface (added to the Spring v 2.5). And for those that want more details about the Spring AbstractInterfaceDrivenDependencyInjectionAspect aspect you maybe should add a pointer to this blog entry (written by you smilie ):

- page 459. "Second, we can use the interface implementation
idiom discussed in chapter 5 to relieve each class ...". I think it's a good idea to specify the exact paragraph where an interface contains also his implementation; The exact paragraph from the chapter 5 is the 5.1.5 ( Providing a default interface implementation)

- 16.3.2 "Applying the general policies"
I think that a simpler solution would be to have only the Aggregate annotation. The annotation will have as parameter the root classes:

@Aggregate(rootClasses = {Order.class })
public class LineItem extends DomainEntity {

The AggregateBoundaryEnforcementAspect will verify that for the execution of all methods of the non-root classes, that the target object (found by thisJoinPoint.getTarget()) is one of the rootClasses from the "rootClasses" parameter.

- Listing 16.30 "Generalized aspect to enforce aggregate boundary policies" Here, I have a question. Can you explain why it is possible to pass the parameter * to the nonAggregateRootModification pointcut (I never see this before)?

pointcut directModification()
: nonAggregateRootModification(*)
&& !cflowbelow(aggregateRootOperation(*));

ramnivas (171) [Avatar] Offline
Re: comments about the chapter 16

Thanks for your as usual helpful comments. I will surely incorporate this feedback.