hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From belaran <bela...@gmail.com>
Subject Re: parameters-schema and contributions
Date Tue, 14 Jun 2005 14:44:40 GMT
Thanks, I completly missed that <contruct> attribute... Once again, I may 
have posted a silly question, but you response helped me.

Thanks again...

2005/6/14, Knut Wannheden <knut.wannheden@gmail.com>:
> 
> Belaran,
> 
> I think you've gotten a few things backwards here ;-)
> 
> You only specify a <parameters-schema> inside a <service-point> if the
> service is a service implementation factory. In your case the schema
> you define is a configuration contributions schema, so you should
> define it as a <schema> element inside the <configuration-point>. You
> can then also drop the "id" attribute on <schema> and the "schema-id"
> attribute on <configuration-point>.
> 
> Now, if your "serviceAService" needs access to the "conf"
> configuration, then you must inject it inside the <construct> element
> using a <set-configuration> element. This will inject a java.util.List
> (of OtherComponentImpl objects) into a property of your service.
> 
> Hope that helps,
> 
> --knut
> 
> On 6/8/05, belaran <belaran@gmail.com> wrote:
> > Hi again !
> >
> > I've a little question about parameters schema and actual object.
> >
> > So there is my xml :
> > ...
> > <service-point id="serviceAService" interface="IAService">
> > <parameters-schema id="object">
> > <element name="OtherComponent">
> > <attribute name="arg"
> > required="true">
> > <conversion
> > class="OtherComponentImpl">
> > </element>
> > </parameters-schema>
> > <invoke-factory>
> > <construct class="AService">
> > </invoke-factory>
> > </service-point>
> > <configuration-point schema-id="object" id="conf">
> > </configuration-point>
> >
> > <contribution configuration-id="conf">
> > <OtherComponent arg="myArg"'/>
> > </contribution>
> >
> > <contribution configuration-id="conf">
> > <OtherComponent arg="OtherPossibleArg"'/>
> > </contribution>
> > ...
> >
> >
> > When invoke, how the factory will construct my object "OtherComponent"
> > that is required by my IAService ? Where is it going to find the
> > proper value for "arg" ?
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> >
> >
> 
> --
> knut
> 



-- 
Belaran,
"What'do'ya mean ?"
"As a moto, I just avoid meaning anything..."

Mime
View raw message