[jboss-dev] Improving scanning performance

Scott Marlow scott.marlow.opensource at gmail.com
Fri Jun 12 10:22:01 EDT 2009


Ales Justin wrote:
> All of this already exists. ;-)
>
>> * You should have a AnnotationScanner deployer that scans jars for 
>> annotations and puts an annotation database somewhere in memory that 
>> other deployers can reference.  (This might already exist, I don't 
>> know).
>
> It is called AnnotationEnvironment, and it's part of the deployment's 
> attachments.
>
> It's already used to help Metadata get annotation info.
> But how it's done in Metadata is bad/wrong.
>
>> * If a file META-INF/no.scan exists in a jar, then don't scan the 
>> file.  This allows libraries to exclude themselves from scanning.
>>
>> * If a file META-INF/scan.only exists it will contain a newline 
>> delimited list of class names to scan.  Only scan those class names.
>
> This is called jboss-scanning.xml.
>  - http://www.jboss.org/community/wiki/JBoss5custommetadatafiles
>
> We already exclude all of our boot.
> See metadata-deployer-jboss-beans.xml:
>  - 
> http://anonsvn.jboss.org/repos/jbossas/branches/Branch_5_x/server/src/etc/deployers/metadata-deployer-jboss-beans.xml 
>
> _______________________________________________
> jboss-development mailing list
> jboss-development at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-development
>
I have a few questions, please help me out.  If AnnotationEnvironment, 
is a database of annotations, would it be possible to persist the 
AnnotationEnvironment (so we don't have to rebuild it after every 
boot)?  If yes, is there a way we could handle invalidating entries in 
the persisted AnnotationEnvironment database (either manually or 
automatically when classes change)?





More information about the jboss-development mailing list