[jboss-dev-forums] [Design of POJO Server] - Re: @JMX on a bootstrap service
adrian@jboss.org
do-not-reply at jboss.com
Thu Aug 14 09:23:45 EDT 2008
I've fixed this and also removed the potential memory leak
by adding a CachingAnnotationMetaData interface.
It's not as optimal as I would like because of the property annotations.
In that case the annotation gets added to both the getter and setter,
so when we remove the annoation for the getter we loose track of the
annotation when we want to remove the setter, so we have to reconstruct it.
If this was a way to optimize that case, the code in KernelScopeInfo could be
| Annotation annotationInstance = null;
| if (annotation instanceof CachingAnnotationMetaData)
| annotationInstance = ((CachingAnnotationMetaData) annotation).removeAnnotation();
| - if (annotationInstance == null)
| + else
| annotationInstance = annotation.getAnnotationInstance(classloader);
| // Null means we never constructed it in the first place
| if (annotationInstance != null)
| mutable.removeAnnotation(annotationInstance.annotationType());
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4170555#4170555
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4170555
More information about the jboss-dev-forums
mailing list