[jboss-dev-forums] [JBoss Microcontainer Development POJO Server] - Re: integration with the Papaki annotation indexer/repositor
alesj
do-not-reply at jboss.com
Thu Oct 29 08:26:58 EDT 2009
"emuckenhuber" wrote :
| * jboss-metadata - for example jboss-metadata is just asking the AE to get a list of classes which have a given top-level annotation (e.g. @Stateful). Then loading the class and do a separate annotation processing with java reflect. This is also because AE does not have enough information about inheritance, which is needed for all the EE annotation processing.
|
But then you should not use java reflect, but JBoss Reflect. ;-)
Why?
Because this info is already present if we use McAnn, as McAnn already uses JBoss Reflect, and Reflect caches this info.
And this also shows that things go hand in hand, and that this inheritance check should not be part of annotation scanning.
Not to mention another very good example why re-using existing libs is good. ;-)
"emuckenhuber" wrote :
| Beside jboss-metadata there are not many users of AnnotationEnvironment, but we really should avoid having things like getClassloader().loadClass(metaData.getClassName()).getAnnotation(X) if possible.
|
Sure, leave it to JBoss Reflect. It's already there.
And with Reflect running on top of Javassist it's gonna be lazy as possible.
"emuckenhuber" wrote :
| * jboss-mdr integration - this index should be reused in the MDR as well, as mentioned earlier in this thread.
|
Yes.
But his is just a matter of properly populating MDR's MetaDataLoaders.
e.g. sort of an MetaDataLoaderToAEAdapter
"emuckenhuber" wrote :
| * inclusion/exclusion of deployments, .jars, classes - we need a way to exclude stuff from annotation scanning, as we are mostly just doing too much scanning. Basically we already have jboss-scanning.xml - which makes sense for our own deployments. Still we need a programmatic way of excluding stuff like:
| - if the deployment is not an EE5/EE6 deployment we can just skip any annotation scanning,
| - if isMetaDataComplete()
| - afaik the new servlet spec requires to exclude .jars (web-fragments), where we should be able to skip scanning as well.
This is all already there, in Deployers.
Either as part of ScanningMetaData or AnnotationScanner's DeploymentUnit filters.
* e.g. http://anonsvn.jboss.org/repos/jbossas/branches/Branch_5_x/server/src/main/org/jboss/deployment/JBossMetaDataDeploymentUnitFilter.java
Web deployers should just properly push required info about fragments to this mechanisms.
e.g. using ScanningMetaDataBuilder (which you promised to write ;-)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4262933#4262933
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4262933
More information about the jboss-dev-forums
mailing list