[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Annotation scanning
adrian@jboss.org
do-not-reply at jboss.com
Wed Apr 23 07:07:37 EDT 2008
"scott.stark at jboss.org" wrote : "kabir.khan at jboss.com" wrote : One point: For the purposes of AOP, the classes must NOT be loaded when scanning for annotations. If they are loaded, then we can not do loadtime weaving. The annotation scanning should use javassist instead to look for annotations.
| If that's the case then to be general the metadata project/AnnotationMetaDataDeployer need to make this change. Currently they do load classes in the context of the deployment class loader during the POST_CLASSLOADER phase. We may be providing pass through support for other layers annotations though (webservices, rest, jpa) that need a view of the annotation. Are we going to have to pass the javassist view for these?
There's no problem with passing the annotations as long as we don't load
the classes that have those annotations until AOP has had the chance to enhance them.
i.e.
* parse the class file using javassist
* read the annotation and create metadata
* aop enhances the classes
* services load the enhanced class from the classloader
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4146119#4146119
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4146119
More information about the jboss-dev-forums
mailing list