[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Property lookup interceptors
adrian@jboss.org
do-not-reply at jboss.com
Fri Jul 20 08:24:08 EDT 2007
"alesj" wrote : "adrian at jboss.org" wrote :
| | Which would probably cover most simple use cases?
|
| What about:
|
| | <property name="x">
| | <value-factory bean="LDAPLookup" method="getValue" />
| | <parameter>foo.bar.prop</parameter>
| | <parameter>mydefault</parameter>
| | </value-factory>
| | </property>
| |
That would remove the need for the interface (what was I thinking? :-)
But I don't think the value factory needs to know the default value,
it just returns "null" when it doesn't have the property.
| <property name="x">
| <value-factory bean="LDAPLookup" method="getValue" default="mydefault">
| <parameter>foo.bar.prop</parameter>
| </value-factory>
| </property>
|
We should probably still have the shorthand mechanism for simple one
parameter methods.
| <property name="x">
| <value-factory bean="LDAPLookup" method="getValue" parameter="foo.bar.prop" default="mydefault"/>
| </property>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066161#4066161
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066161
More information about the jboss-dev-forums
mailing list