-
1. Re: Custom annotation scanner
matt.drees Aug 26, 2007 9:51 PM (in response to swd847)There's actually a jira feature request for that: http://jira.jboss.com/jira/browse/JBSEAM-1342
I'd like it, too, but it might not come for a little while. -
2. Re: Custom annotation scanner
swd847 Aug 26, 2007 10:07 PM (in response to swd847)I might be prepared to work on it, as I have a use for it, but I would need confirmation on how people would want it to work.
The JIRA issue seems to just be about making the Scanner class public, so it is possible to write custom scanners.
I was thinking of re-using the seam scanner to reduce startup times. I was thinking the configuration would be something like:<scannerconfig> <annotations> <annotation class="com.custom.Annotation" variable="customAnnotationList" /> </annotations> <files> <file pattern="*.customdata.xml" variable="customFileList" /> </files> </scannerconfig>
-
3. Re: Custom annotation scanner
pmuir Aug 27, 2007 12:14 PM (in response to swd847)My design would be something similar to the data binder meta annotations (the JIRA issue probably has a misleading description, its actually about the ability to reuse the scanner).
-
4. Re: Custom annotation scanner
matt.drees Aug 27, 2007 1:25 PM (in response to swd847)Pete, do you know if there are any plans to let the scanner find files, too (as swd847 is suggesting)?
-
5. Re: Custom annotation scanner
pmuir Aug 27, 2007 3:13 PM (in response to swd847)Sorry, I wasn't thinking there at all. Of course, it wouldn't be like the DataBinder stuff at all. Anyway, its an interesting idea to have it scan files as well, can you add a comment to the issue? atm I'm not sure how to best configure which files to scan (we don't want another configuration file).
-
6. Re: Custom annotation scanner
christian.bauer Aug 27, 2007 4:50 PM (in response to swd847)The wiki has several use cases as well and I've been experimenting with different metamodels and ways of scanning/constructing/registering this data so it is conveniently available at runtime. I'm not convinced yet I found the best approach but there is definitely a need for a more generic "registry" feature in Seam.
-
7. Re: Custom annotation scanner
swd847 Aug 27, 2007 7:38 PM (in response to swd847)There does not seam to be a logical place to put it at the moment, other than components.xml, which would not really work.
The wiki has several use cases as well and I've been experimenting with different metamodels and ways of scanning/constructing/registering this data so it is conveniently available at runtime. I'm not convinced yet I found the best approach but there is definitely a need for a more generic "registry" feature in Seam.
What would be the benefit of a generic registry over application scoped components?