|
From: Alef A. <al...@jt...> - 2004-06-19 14:34:03
|
Rod, While setting up a configuration at work, I made a slight mistake and added a TransactionManager as an interceptor to the ProxyFactoryBean instead of the TransactionInterceptor itself. I finally found it out after an hour or so but was wondering why it's possible to mention a targetsource as an interceptor in the first place. Secondly, it's now possible to have a PFB mentioning two target sources, where only the one added to the interceptor (or list of advices, like you refactored it to last week) will be used and the one references using the targetSource property is completely ignored. =20 I've added a corresponding testcase to ProxyFactoryBeanTests (testDoubleTargetSource) to show this behavior. Would it be wise to add a check preventing users from mentioning both properties? Also, I'm still wondering why one would add a target source to the list of interceptors instead of just mentioning it separately using the targetSource property. It might be better (just for clarity) to not even allow it, or are there any clear use cases? Alef |