[jboss-dev-forums] [Design of POJO Server] - Re: ProfileService equiv to ServiceBindingManager
bstansberry@jboss.com
do-not-reply at jboss.com
Wed Jul 30 14:20:17 EDT 2008
Thanks. With that I should be able to handle parameter matching, figuring out the required types if not specified.
Looking at this, seems what I can do with parameter handling is fairly limited, but enough to get the job done for the port binding use case. Can handle this:
| <mbean ...>
| <attribute name="Foo">
| <value-factory bean="FooProvider" method="getFoo" parameter="A" default="1100"/>
| </attribute>
| </mbean>
|
And this:
| <attribute name="Foo">
| <value-factory bean="FooProvider" method="getFoo" default="1100">
| <parameter>A</parameter>
| <parameter>1</parameter>
| </value-factory>
| </attribute>
|
And, as long as parameter type com.foo.Bar is visible and a PropertyEditor exists, this:
| <attribute name="Foo">
| <value-factory bean="FooProvider" method="getFoo" default="1100">
| <parameter class="com.foo.Bar">A</parameter>
| <parameter class="java.lang.Integer">1</parameter>
| </value-factory>
| </attribute>
|
(I don't see a clear way to get FooProvider's classloader from a KernelControllerContext, so if com.foo.Bar is not visible, above won't work).
This also seems reasonably doable:
| <attribute name="Foo">
| <value-factory bean="FooProvider" method="getFoo" default="1100">
| <parameter class="java.lang.Object">
| <value class="java.lang.Integer">1</value>
| </parameter>
| </value-factory>
| </attribute>
|
The following, while possibly doable are IMHO all a bridge too far:
| <attribute name="Foo">
| <value-factory bean="FooProvider" method="getFoo" default="1100">
| <parameter><inject bean"FooParamProvider"/></parameter>
| </value-factory>
| </attribute>
|
| <attribute name="Foo">
| <value-factory bean="FooProvider" method="getFoo" default="1100">
| <parameter>
| <bean name="FooParam" class="com.foo.FooParam"/>
| </parameter>
| </value-factory>
| </attribute>
|
| <attribute name="Foo">
| <value-factory bean="FooProvider" method="getFoo" default="1100">
| <parameter>
| <map>
| ...
| </map>
| </parameter>
| </value-factory>
| </attribute>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4167709#4167709
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4167709
More information about the jboss-dev-forums
mailing list