You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hivemind.apache.org by Christopher Cheng <my...@chrishome.com> on 2004/11/15 09:37:06 UTC

Explicit wiring of services

In the Calculator example, the "invoke-factory" of service point
"Calculator" autowires Adder, Subtractor, Multiplier, Divider to it because
there is only one service of each implementing the interfaces. How can I
configure it if there is 2 adders?



---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


RE: Explicit wiring of services

Posted by Christopher Cheng <my...@chrishome.com>.
I couldn't find the <set-service> in
http://jakarta.apache.org/hivemind/descriptor.html
What does it belong to?


-----Original Message-----
From: Knut Wannheden [mailto:knut.wannheden@gmail.com] 
Sent: Monday, November 15, 2004 4:43 PM
To: hivemind-user@jakarta.apache.org
Subject: Re: Explicit wiring of services

Christopher,

If there is more than one Adder service visible to the module
contributing the Calculator implementation then you are out of luck
with autowiring.  You have two choices:

- either you completely disable autowiring (see <construct>'s
autowire-services attribute)
- or you leave autowiring enabled but explicitly wire the Adder you
want using a <set-service>.

HTH,

--knut

On Mon, 15 Nov 2004 16:37:06 +0800, Christopher Cheng
<my...@chrishome.com> wrote:
> In the Calculator example, the "invoke-factory" of service point
> "Calculator" autowires Adder, Subtractor, Multiplier, Divider to it
because
> there is only one service of each implementing the interfaces. How can I
> configure it if there is 2 adders?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Re: Explicit wiring of services

Posted by Knut Wannheden <kn...@gmail.com>.
Christopher,

If there is more than one Adder service visible to the module
contributing the Calculator implementation then you are out of luck
with autowiring.  You have two choices:

- either you completely disable autowiring (see <construct>'s
autowire-services attribute)
- or you leave autowiring enabled but explicitly wire the Adder you
want using a <set-service>.

HTH,

--knut

On Mon, 15 Nov 2004 16:37:06 +0800, Christopher Cheng
<my...@chrishome.com> wrote:
> In the Calculator example, the "invoke-factory" of service point
> "Calculator" autowires Adder, Subtractor, Multiplier, Divider to it because
> there is only one service of each implementing the interfaces. How can I
> configure it if there is 2 adders?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org