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
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to