Hi, On 23.05.11 09:16, "jie yan" <[email protected]> wrote:
>On Mon, May 23, 2011 at 1:14 PM, Clement Escoffier < >[email protected]> wrote: > >> >> >> On 23.05.11 04:48, "jie yan" <[email protected]> wrote: >> >> >Thank Clement. >> >Cilia is quite close to what I want. >> > >> >Another question about iPOJO is, how to specify the @Requires service >>when >> >there are multi-implementation? >> >That may be another subject. >> >> If the injected field is an array or a collection, iPOJO automatically >> inject all providers. >> On @Bind method, you can specify aggregate="true". >> >> Sorry, I didn't express clearly. > >What I wondered is, for example: >Component-A requires service MyService; >While there are two implementations in the framework, MyServiceImpl-1 and >MyServiceImpl-2; >Is it possible to specify which implementation to be used in Component-A? > >The triggering scene is: >I have two web bundle, WB-1 serving /w1,and WB-2 serving /w2; >WB-1 and WB-2 have their own HttpContext implementations, that dispatch >the >requests into different directory; >These two HttpContext implementation have similar logic, but different >mapping directory; >So, I try to create two HttpContext service instance with different >property, and specify the required instance in WB-1 and WB-2; >Is it reasonable? You have the 'from' attribute allowing to select the instance providing the service you want: @Requires(from="instance-name") You just need to specify the instance name when creating your instance: @Instance(name="instance-name") Regards, Clement > >Regards, >drhades > > >> Regards, >> >> Clement >> >> > >> >Regards, >> >drhades >> > >> >On Thu, May 19, 2011 at 3:13 PM, Clement Escoffier < >> >[email protected]> wrote: >> > >> >> Hi, >> >> >> >> On 18.05.11 13:47, "jie yan" <[email protected]> wrote: >> >> >> >> >I enjoyed iPOJO very much, although just using it for 2 weeks. >> >> > >> >> >iPOJO provides a charming component runtime. >> >> >Is it convenient to extend iPOJO to support >> >>component-flow-composition? >> >> > >> >> >The imaginary flow-composition is data-driven, without loop >> >>flow-control. >> >> >Just think SPSS clementine, or Weka knowledge-flow. >> >> >> >> So, iPOJO provides an event-admin handler for asynchronous >> >>communications, >> >> but it's not really what you're looking for. You should have a look >>at >> >> Cilia (http://wikiadele.imag.fr/index.php/Cilia) which provides, on >>the >> >> top of iPOJO, something close to what you want. >> >> >> >> Regards, >> >> >> >> Clement >> >> >> >> >> >> > >> >> >Looking forward to some guidance. >> >> > >> >> >Best regards, >> >> >drhades >> >> >> >> >> >> >> >> >>
