Colin, thank you for all your help with this. It is far more likely you are correct, but here is the process as I understand it (with Spring 1.1). Within createAdvisorChain the following code is executed (pasted verbatim)
Code:
// add a named interceptor
Object advice = null;
// avoid unnecessary creation of prototype bean just for advisor chain initialization
if (isSingleton() || this.beanFactory.isSingleton(this.interceptorNames[i])) {
advice = this.beanFactory.getBean(this.interceptorNames[i]);
}
addAdvisorOnChainCreation(advice, this.interceptorNames[i]);
Then within addAdvisorOnChainCreation namedBeanToAdvisorOrTargetSource(next) is called. The next variable is the advice parameter which is null since the ProxyFactoryBean property "singleton" is set to false and the interceptor is the xwork action with the singleton attribute set to false. Within namedBeanToAdvisorOrTargetSource null is again passed in. The following code is executed
Code:
try {
Advisor adv = this.advisorAdapterRegistry.wrap(next);
return adv;
}
catch (UnknownAdviceTypeException ex) {
// Treat it as a TargetSource
if (next instanceof TargetSource) {
return (TargetSource) next;
}
else {
// It's not a pointcut or interceptor.
// It's a bean that needs a TargetSource around it.
return new SingletonTargetSource(next);
}
}
Since null cannot be wrapped and is not an instance of TargetSource a SingletonTargetSource is created with null as the target. Also, I have confirmed within the debugger that this is what is happening. I am going to create a standalone configuration file that I can post in it's entirety. Thanks again. Mike.