Return-Path: Delivered-To: apmail-cocoon-dev-archive@www.apache.org Received: (qmail 64546 invoked from network); 30 Oct 2006 13:25:04 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Oct 2006 13:25:04 -0000 Received: (qmail 33802 invoked by uid 500); 30 Oct 2006 13:25:11 -0000 Delivered-To: apmail-cocoon-dev-archive@cocoon.apache.org Received: (qmail 33738 invoked by uid 500); 30 Oct 2006 13:25:11 -0000 Mailing-List: contact dev-help@cocoon.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@cocoon.apache.org List-Id: Delivered-To: mailing list dev@cocoon.apache.org Received: (qmail 33718 invoked by uid 99); 30 Oct 2006 13:25:11 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received: from [140.211.11.9] (HELO [127.0.0.1]) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Oct 2006 05:25:10 -0800 Message-ID: <4545FD01.90500@apache.org> Date: Mon, 30 Oct 2006 14:24:17 +0100 From: Carsten Ziegeler User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: dev@cocoon.apache.org Subject: Re: Using Avalon Components in Spring Components References: <4545DD34.4050402@apache.org> In-Reply-To: X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Alexander Klimetschek wrote: > Carsten Ziegeler schrieb: >>> But roles are a different concept than bean-ids.... >> Why do you think so? > > I am not a Spring expert, but roles have this inheritance concept, and > bean-ids are merely just IDs, aren't they? > Ah, yes, the original idea of Avalon included the possibility that there might be several implementations for the same role and you can choose at runtime, like we today have the Generator role with the different available generator implementations. Now, the old avalon way to handle this was to lookup a component(service) selector for the role, and then the real component from this selector by using a hint(which can be compared to a key). While this approach is very natural, it has some drawbacks like for example you have to know whether you're looking up directly a component or through a component selector etc. In the end with recent Avalon containers this has been simplified by either using the role for the component id or, in the case of several implementations, by using "{role}/{key}" as the component id. And this is actually how it works today in 2.2 with Spring as well, so you could connect to the file generator by "o.a.c.g.Generator/file". HTH Carsten -- Carsten Ziegeler - Open Source Group, S&N AG http://www.s-und-n.de http://www.osoco.org/weblogs/rael/