hivemind-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Wannheden <knut.wannhe...@gmail.com>
Subject Re: Registry.getService VS ServiceManager.lookup
Date Thu, 11 Nov 2004 08:37:54 GMT
Igor,

If you're not using HiveMind's threaded or pooled service models for
your service you should always get back the same instance.  Provided
that you invoke getService(Class) on the same Registry object, of
course :-)

With the threaded and pooled service models you might get a different
instance depending on what thread is making the call.

Hope this helps,

--knut

On Thu, 11 Nov 2004 11:55:05 +0300, Igor A. Deruga <ingvarrr@hotbox.ru> wrote:
> Good *, dear fellow programmers!
> 
> As far as I know, avalon's ServiceManager.lookup method returns an instance of
> some class. When I invoke it for the second time, it returns me the SAME
> instance. How do I get this result with Registry class implemented in
> HiveMind? Registry.getService(Class cls) returns me the knew instance every
> time. I can write a wrapper with Map, but I think there should be a way...
> Maybe, I'm wrong in some point?
> 
> Sincerely
>         Igor
> 
> ---------------------------------------------------------------------
> 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


Mime
View raw message