I have some questions about components.xml, too.
In terms of managed beans and faces-config.xml, I would like to do something similar in components.xml in terms of reusing Seam components. I understand that Seam offers annotations to do this: @Role and @Roles. However, I'd like to set different properties for each role. Do I do this in the components.xml file? What if I wanted to initialize properties with Lists and Maps? TIA.
Gahh, the last thing I want is for Seam to turn into Spring. Still, the option of naming externally would be a plus. Maybe it could even take over managing JSF components in faces-config.xml, though I suppose it might demand more or different metadata.
I'm not sure what you'd gain by moving scope annotations and initializations out to XML though. My opinion is that semantics belong in code and only code. Spring has us all coding Java in XML, and has given us the worst of the conjunction of Java and XML's inexpressveness with a dynamic interpretation that blows up only (and often) at runtime.
The CVS version of Seam offers a much more flexible components.xml file (roughly equivalent to the functionality available for normal JSF managed beans).
I too have a bit of an issue with putting @Name, @Scope and @Roles in entity beans. That said, I wouldn't want Spring-style external XML declarations either.
Would it be possible to have a configurable naming strategy? The default would be the conventional "same as ClassName but lowercase first char", since most people seem to go with that.
Another way around this would be to always reference entity beans via property accessors on the JSF action classes. (I don't have an issue using @Name/@Scope in the action class.) So instead of:
One would use:
Then you can just use bijection within the managed beans to get entity beans in and out of context.