David_W (70) [Avatar] Offline
#1
In 16.1.2, another alternative to domain interface-based DI is just to create another aspect that declares the Configurable and Autowired annotations where required.
ramnivas (171) [Avatar] Offline
#2
Re: bridging aspect for domain di
Correct. However, that will still have the same performance characteristics (due to the use of reflection).

BTW, I changed listing 16.9 to use a new aspect I added to Spring 3.0. Now the code looks like:

package ajia.domain;

import ...

public aspect PricingStrategyDependencyInjectionAspect
extends GenericInterfaceDrivenDependencyInjectionAspect<PricingStrategyClient> {

private PricingStrategy pricingStrategy;

public void configure(PricingStrategyClient bean) {
bean.setPricingStrategy(this.pricingStrategy);
}

public void setPricingStrategy(PricingStrategy pricingStrategy) {
this.pricingStrategy = pricingStrategy;
}
}

Most important change is no need to write a pointcut.