You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hivemind.apache.org by Stephane Decleire <sd...@cariboo-networks.com> on 2007/07/05 15:26:54 UTC
Use of configuration-point to inject a service-point
Are those configurations equivalent ?
1.
<service-point id="RubricHierarchyFactory"
interface="org.apache.tapestry.engine.state.StateObjectFactory">
<invoke-factory>
<construct
class="com.cariboonetworks.ads.services.impl.RubricHierarchyFactory">
<set-object property="root" value="service:RubricAd"/>
</construct>
</invoke-factory>
</service-point>
2.
<service-point id="RubricHierarchyFactory"
interface="org.apache.tapestry.engine.state.StateObjectFactory">
<invoke-factory>
<construct
class="com.cariboonetworks.ads.services.impl.RubricHierarchyFactory">
<set-configuration property="root"
configuration-id="RubricRoot"/>
</construct>
</invoke-factory>
</service-point>
<configuration-point id="RubricRoot">
<schema>
<element name="rubric">
<attribute name="service-id" translator="service-point"
required="true" unique="true"/>
</element>
</schema>
</configuration-point>
<contribution configuration-id="RubricRoot">
<rubric service-id="RubricAd"/>
</contribution>
In the second one, it returns :
"Unable to update property root of
com.cariboonetworks.ads.services.impl.RubricHierarchyFactory@1052a203:
argument type mismatch"
and i don't understand why ...
Thanks in advance for any clue.
Stephane
Re: Use of configuration-point to inject a service-point
Posted by James Carman <ja...@carmanconsulting.com>.
Oops. Hit send too quickly. Remember...
"A configuration can be injected into a writable property (or also a
constructor parameter) of type List or Map."
http://hivemind.apache.org/hivemind1/configurations.html#Accessing+Configuration+Points
On 7/5/07, James Carman <ja...@carmanconsulting.com> wrote:
> What is the type of the "root" property on the RubricHierarchyFactory class?
>
>
>
> On 7/5/07, Stephane Decleire <sd...@cariboo-networks.com> wrote:
> > Are those configurations equivalent ?
> >
> > 1.
> > <service-point id="RubricHierarchyFactory"
> > interface="org.apache.tapestry.engine.state.StateObjectFactory">
> > <invoke-factory>
> > <construct
> > class="com.cariboonetworks.ads.services.impl.RubricHierarchyFactory">
> > <set-object property="root" value="service:RubricAd"/>
> > </construct>
> > </invoke-factory>
> > </service-point>
> >
> > 2.
> > <service-point id="RubricHierarchyFactory"
> > interface="org.apache.tapestry.engine.state.StateObjectFactory">
> > <invoke-factory>
> > <construct
> > class="com.cariboonetworks.ads.services.impl.RubricHierarchyFactory">
> > <set-configuration property="root"
> > configuration-id="RubricRoot"/>
> > </construct>
> > </invoke-factory>
> > </service-point>
> >
> > <configuration-point id="RubricRoot">
> > <schema>
> > <element name="rubric">
> > <attribute name="service-id" translator="service-point"
> > required="true" unique="true"/>
> > </element>
> > </schema>
> > </configuration-point>
> >
> > <contribution configuration-id="RubricRoot">
> > <rubric service-id="RubricAd"/>
> > </contribution>
> >
> > In the second one, it returns :
> > "Unable to update property root of
> > com.cariboonetworks.ads.services.impl.RubricHierarchyFactory@1052a203:
> > argument type mismatch"
> > and i don't understand why ...
> >
> > Thanks in advance for any clue.
> >
> > Stephane
> >
>
Re: Use of configuration-point to inject a service-point
Posted by James Carman <ja...@carmanconsulting.com>.
What is the type of the "root" property on the RubricHierarchyFactory class?
On 7/5/07, Stephane Decleire <sd...@cariboo-networks.com> wrote:
> Are those configurations equivalent ?
>
> 1.
> <service-point id="RubricHierarchyFactory"
> interface="org.apache.tapestry.engine.state.StateObjectFactory">
> <invoke-factory>
> <construct
> class="com.cariboonetworks.ads.services.impl.RubricHierarchyFactory">
> <set-object property="root" value="service:RubricAd"/>
> </construct>
> </invoke-factory>
> </service-point>
>
> 2.
> <service-point id="RubricHierarchyFactory"
> interface="org.apache.tapestry.engine.state.StateObjectFactory">
> <invoke-factory>
> <construct
> class="com.cariboonetworks.ads.services.impl.RubricHierarchyFactory">
> <set-configuration property="root"
> configuration-id="RubricRoot"/>
> </construct>
> </invoke-factory>
> </service-point>
>
> <configuration-point id="RubricRoot">
> <schema>
> <element name="rubric">
> <attribute name="service-id" translator="service-point"
> required="true" unique="true"/>
> </element>
> </schema>
> </configuration-point>
>
> <contribution configuration-id="RubricRoot">
> <rubric service-id="RubricAd"/>
> </contribution>
>
> In the second one, it returns :
> "Unable to update property root of
> com.cariboonetworks.ads.services.impl.RubricHierarchyFactory@1052a203:
> argument type mismatch"
> and i don't understand why ...
>
> Thanks in advance for any clue.
>
> Stephane
>