cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Ziegeler <>
Subject Re: Spring bean names
Date Sat, 15 Dec 2007 20:17:57 GMT
Vadim Gritsenko schrieb:
> On Dec 7, 2007, at 1:08 PM, Carsten Ziegeler wrote:
>> The [Spring Configurator's bean] map uses the interface to search for
>> all beans of this
>> interface. Then the interface name is used as a prefix to find the
>> selector hint (key). So if a bean for interface "foo.Bar" is found and
>> has the bean name "foo.Bar.x" , the bean is registered with "x" in the
>> map. If the name is "foo.Bar/y", it's registered with "y" in the map.
> Ok, good to know.
> But what would happen if bean's name is not prefixed with the interface
> name? So bean is named just 'baz' but it implements 'foo.Bar' interface?
Then "baz" is used as the key. The algorithm first checks if the name starts
with the interface name. If so, it removes this prefix. If not it uses
the name as the key.
In addition the bean itself can define the bean through a property I think.

So, as always: everything is possible :)


Carsten Ziegeler

View raw message