Back Forum Reply New

Single namespace for beans

All beans I configure for one factory use the same namespace for their names/ids. This is a serious limitation. Like in any other complex environment the things grow and at one point one looses the overview over all the beans in the configuration. Splitting the configuration in different files, which is a good way to organize, makes it even more worse. Any person that is managing parts of the configuration has know about all other used names/ids to avoid naming conflicts.

Why there are no sections that can be used to bundle beans with a similar meaning and that at the same time define a seperate namespace for the contained beans?

Of course this would have consequences to references but not much. Look at this example:

Code:
lt;beansgt; lt;section name=quot;section-onequot;gt; lt;bean name=quot;bean-onequot; class=quot;foo.bar.FixAndFoxyquot;/gt;  lt;bean name=quot;bean-twoquot; class=quot;foo.bar.FixAndFoxyquot;gt; lt;property name=quot;someProp1quot;gt; lt;!-- section local reference --gt; lt;ref bean=quot;bean-onequot;/gt; lt;/propertygt;  lt;property name=quot;someProp2quot;gt; lt;!-- global reference --gt; lt;ref section=quot;section-twoquot; bean=quot;bean-onequot;/gt; lt;/propertygt; lt;/beangt; lt;/sectiongt;  lt;section name=quot;section-twoquot;gt; lt;bean name=quot;bean-onequot; class=quot;foo.bar.FixAndFoxyquot;/gt; lt;bean name=quot;bean-twoquot; class=quot;foo.bar.FixAndFoxyquot;/gt; lt;/sectiongt;
lt;/beansgt;
The alternative to use grouped names like quot;section-one.bean-onequot; to simulate namespaces produces redundancy and is not good readable.

It seems to be a good candidate to feature request. Would you like to file it in JIRA?

Sounds kind of like the namespace stuff that iBatis has.


Originally Posted by al0It seems to be a good candidate to feature request. Would you like to file it in JIRA?

Done.

SPR-3913
¥
Back Forum Reply New