[jboss-user] [JBoss Seam] - Re: Deployment Scanner framework
colintoal
do-not-reply at jboss.com
Fri Jun 29 23:12:40 EDT 2007
Cool - I'm glad its on the plan for the future - as the Scanner facility is nice.
One thought I had is to use a meta-annotation to represent "scan discoverable".
One could annotate the annotation that indicates why the class is being discovered with it.
I'm imagining something like:
| public @interface @ScanDiscoverable
| {
| String value() default ""; // resource token ? like seam.properties ? necessary ?
| }
|
| ...
| // Seam example
| @ScanDiscoverable
| public @interface Name
| ...
|
This provides the ability to extend the Scanner's discoverable classes with new annotations (like my @JCRContentItem annotation).
Then the Scanner could be extended with Pre and Post Scan hooks (also discovered during scanning):
public @interface ExecutePostScan
| {
| Annotation discoverable();
| }
Methods (or Classes ? I'm not quite sure yet) bearing this annotation would have to implement a contract like
| @ExecutePostScan(discoverable=JCRContentItem)
| public void executePostInitializeScan ( ServletContext ctx, Set<Class<Object>> )
This would give the new @ScanDiscoverable annotation implementor a clean post Scan hook.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059360#4059360
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059360
More information about the jboss-user
mailing list