-
1. Re: Default namming strategy for components
pmuir Oct 6, 2006 1:13 PM (in response to sebasfiorent)"sebasfiorent" wrote:
Exists a default naming strategy for components?
No.
But it has been suggested before, as you suggest, perhaps with configuration for how many packaging levels you want to take account of (e.g. 0 levels: foo.bar.Class -> @Name("class"), 1 level: foo.bar.Class -> @Name("bar.class")). -
2. Re: Default namming strategy for components
sebasfiorent Oct 6, 2006 1:18 PM (in response to sebasfiorent)Yes it would be helpfull.
In fact, the behavior that I'm trying to achieve is the same that you have when you configure a bean in Spring framework. If you don't set name, the name becomes the same as the package+class name.
I think that the best way to do this is to have the same notion that exists with Hibernate for naming stategies.
What can we do? Raise a JIRA issue?
Regards
Sebastian -
3. Re: Default namming strategy for components
pmuir Oct 6, 2006 7:17 PM (in response to sebasfiorent)That would be a start. You could submit a patch.
The code for auto-naming a component should be straightforward. Tying it into Seam in a plugable fashion might be harder:
1) Seam sometimes looks directly at the Name annotation, sometimes it delegates to Seam.getComponentName()
2) It should probably be configured via components.xml, but by then component configuration/instantiation has started