|
From: Colin S. <col...@ex...> - 2004-01-14 17:32:42
|
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
|