I'm not sure if I understand your question. Yes it is

<!-- Simply call the factory manually on each invocation -->

<bean id=”bindHandler” class=”TestClass” >****

<argument ref="myFactory"/>

</bean>

<reference-list interface=”SomeInterface”/>****

<reference-listener ref=”bindHandler” bind-method=”bind”/>****

</reference-list>
I hope this helps!

Kind regards,
Andreas

On Mon, Jun 3, 2013 at 11:54 AM, CLEMENT Jean-Philippe <
[email protected]> wrote:

> Hi Andreas,****
>
> ** **
>
> Is there a way to inject the factory (prototype bean) itself?****
>
> ** **
>
> Cheers,****
>
> JP****
>
> ** **
>
> [@@ OPEN @@]****
>
> ** **
>
> *De :* Andreas Pieber [mailto:[email protected]]
> *Envoyé :* samedi 1 juin 2013 10:57
> *À :* Apache Karaf
> *Objet :* Re: Blueprint scope and reference-list****
>
> ** **
>
> Hey,****
>
> ** **
>
> I'm sorry, but there isn't any blueprint only method available for this.
> You'll need to create your object manually during the bind call if you like
> such a behavior.****
>
> ** **
>
> Kind regards,****
>
> Andreas****
>
> ** **
>
> On Fri, May 31, 2013 at 11:11 AM, CLEMENT Jean-Philippe <
> [email protected]> wrote:****
>
> Dear Karaf Team,****
>
>  ****
>
> I would like to build a bean each time a reference is matched.****
>
>  ****
>
> I tried this:****
>
> <bean id=”KindOfFactory” class=”TestClass” scope=”prototype”/>****
>
>  ****
>
> <reference-list interface=”SomeInterface”/>****
>
> <reference-listener ref=”KindOfFactory” bind-method=”bind”/>****
>
> </reference-list>****
>
>  ****
>
> But prototype instantiation seems to be linked to the reference-list
> itself rather than the listener call.****
>
>  ****
>
> Anyway, is there a way to instantiate a bean each time a kind of service
> is mapped in Karaf using only blueprint?****
>
>  ****
>
> Kind regards,****
>
> Jean-Philippe****
>
>  ****
>
> [@@ OPEN @@]****
>
> ** **
>

Reply via email to