Hi,
I 'm currently discovering ipojo and I like it very much.
One thing I am trying doesn't seem to work though: setting up a
service with properties that should also be passed to the instance -
preferably not through field injection.
I tried some metadata that looks like this:
<component name="MyServiceImpl" classname="MyServiceImpl">
<provides specifications="MyService">
<property name="fooEnabled"
constructor-parameter="0"
type="java.lang.Boolean"
mandatory="true"/>
</provides>
</component>
<instance component="MyServiceImpl">
<property name="fooEnabled" value="true"/>
</instance>
<instance component="MyServiceImpl">
<property name="fooEnabled" value="false"/>
</instance>
I also tried replacing the constructor-parameter line with
method="setFooEnabled" (having a corresponding method, of course)
but only field injection (field="fooEnabled") seems to work.
In the other cases a service is registered but the property is never
injected (through constructor or setter).
Am I overlooking some mistake I made, is there another way to achieve
this or is this a missing feature?
Thanks,
Paul
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]