Return-Path: Delivered-To: apmail-jakarta-hivemind-user-archive@www.apache.org Received: (qmail 13752 invoked from network); 11 Nov 2004 08:37:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 11 Nov 2004 08:37:57 -0000 Received: (qmail 23072 invoked by uid 500); 11 Nov 2004 08:37:57 -0000 Delivered-To: apmail-jakarta-hivemind-user-archive@jakarta.apache.org Received: (qmail 23055 invoked by uid 500); 11 Nov 2004 08:37:57 -0000 Mailing-List: contact hivemind-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: hivemind-user@jakarta.apache.org Delivered-To: mailing list hivemind-user@jakarta.apache.org Received: (qmail 23041 invoked by uid 99); 11 Nov 2004 08:37:57 -0000 Received-SPF: pass (hermes.apache.org: domain of knut.wannheden@gmail.com designates 64.233.170.205 as permitted sender) Received: from [64.233.170.205] (HELO rproxy.gmail.com) (64.233.170.205) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 11 Nov 2004 00:37:57 -0800 Received: by rproxy.gmail.com with SMTP id a36so290275rnf for ; Thu, 11 Nov 2004 00:37:54 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=DuRCWAzgnAj+oKvNHrdy1T8kVTFCQz6huvyYg52kuE0/Kr1j1BxdB1ZeoFwsL6BoC3loi7e0cMJDg7dDfJbmN0xajqpk4FrdVUR0YFewLtZfFJObDSghxWGfbIM/nR757U7NMxVnDTKvAfg0vrEbOzDXyJ9FfA8mj3r801fAdPA= Received: by 10.38.163.18 with SMTP id l18mr157872rne; Thu, 11 Nov 2004 00:37:54 -0800 (PST) Received: by 10.38.65.55 with HTTP; Thu, 11 Nov 2004 00:37:54 -0800 (PST) Message-ID: <360173eb041111003768954953@mail.gmail.com> Date: Thu, 11 Nov 2004 09:37:54 +0100 From: Knut Wannheden Reply-To: Knut Wannheden To: hivemind-user@jakarta.apache.org Subject: Re: Registry.getService VS ServiceManager.lookup In-Reply-To: <200411111155.05125.ingvarrr@hotbox.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <200411111155.05125.ingvarrr@hotbox.ru> X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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 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