hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Wannheden <>
Subject Re: Defining symbols...
Date Wed, 25 May 2005 10:34:09 GMT

On 5/24/05, Glen Stampoultzis <> wrote:
>  I've been trying to figure out how I asd symbols to my application but I
> haven't been getting very far.
>  I'm wondering if my problem might not call for symbols at all.  My issue is
> this...
>  I have a bunch of services that have various dependencies between each
> other.  One of the objects these services require can't be known until a
> particular point into the execution of the program.  I was thinking symbols
> sounded like the right idea but after reading the documentation I'm not sure
> how to use them.  None of the examples seem to feature symbols.
>  Can anyone show me a nice small example of how to achieve this?

Based on this description of what you're trying to achieve it is not
very clear what the best approach to take is. It basically depends a
lot on *when precisely* this "particular point into the execution of
the program" is. Let me explain what I mean.

I assume that your required object is also a HiveMind service and that
you by "can't be known" mean that this services *implementation* is
not known.

If you want to use HiveMind constructs (e.g. symbols as you say) to
solve this problem, then the implementation of the required service
must be known at the time HiveMind constructs it. And this is the
first time one of the service methods is invoked. If the
implementation isn't known until later you have to address this
problem in the application code.

That being said, symbols are indeed a way to solve this problem. You
can for instance use a symbol for the service's implementation class:

<service-point id="RequiredService" interface="SomeInterface">
 <construct class="${required.service.impl.class}"/>

Another solution you might want look into is conditional



To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message