|
From: Colin S. <col...@ex...> - 2004-01-14 18:10:05
|
Actually, now that I think about it, it's not just about validation. If you are in an IDE plugin, the new element would allow the plugin to offer code completion on the id name... Otherwise (with the present setup), it would have to know something about the actual object using those properties, to know they are in fact bean ids... Rod Johnson wrote: >Mmm, I'd need to think about that. I guess the validation potential would be >good. Thoughts? > >Btw the switch from interceptors to interceptorNames was necessary as the >old way was conceptually wrong. It couldn't handle common interceptors or >advisors that were prototypes. This is important to support mixin usage, >which should now always work correctly. > >Rod > >----- Original Message ----- >From: "Colin Sampaleanu" <col...@ex...> >To: <spr...@li...> >Sent: Wednesday, January 14, 2004 5:32 PM >Subject: [Springframework-developer] xml dtd addition for bean id reference > > > > >>The recent switch in AbstractAutoProxyCreate which forced me to switch >>some BeanNameAutoProxyCreator configs from something like >>... >> <property name="interceptorNames"> >> <list> >> <ref bean="hibInterceptor"/> >> <ref bean="matchAllTxInterceptor</ref> >> </list> >> </property> >>... >> >>to >>... >> <property name="interceptorNames"> >> <list> >> <value>hibInterceptor</value> >> <value>matchAllTxInterceptor</value> >> </list> >> </property> >>... >> >>got me thinking that the former did have the advantage of being much >>easier to validate without getting the actual user of the properties >>(the postprocessor in this case) involved. That is, in the case of a >> <ref local="xxx" /> >>the xml processor can do it, while >> <ref bean="xxx" /> >>can be validate by the loader or something like an Eclipse plugin. But >> >> <property name="interceptorNames"> >> <list> >> <value>something</value> >> </list> >> </property> >> >>can only be validate by the user of that property. So how about we add >>another element which is used to produce a text value which is a bean >>id. That is: >> <property name="interceptorNames"> >> <list> >> <beanid bean="a-local-or-external-bean"/> >> <beanid local="a-local-bean"/> >> </list> >> </property> >> >>The latter beanid element would be checked by the xml processor. The >>former would be checkable only by the loader or by something like an IDE >>plugin. >> >>What does everybody think? >> >>Regards, >>Colin >> >> >> >> >> >> >> >> >> >> >>------------------------------------------------------- >>This SF.net email is sponsored by: Perforce Software. >>Perforce is the Fast Software Configuration Management System offering >>advanced branching capabilities and atomic changes on 50+ platforms. >>Free Eval! http://www.perforce.com/perforce/loadprog.html >>_______________________________________________ >>Springframework-developer mailing list >>Spr...@li... >>https://lists.sourceforge.net/lists/listinfo/springframework-developer >> >> |