AnnotatedElementHandler aeHandler = ainfo.getProcessingContext().getHandler();
PreDestroy preDestroyAn =
(PreDestroy)ainfo.getAnnotation();
Method annMethod = (Method)ainfo.getAnnotatedElement();
String pdMethodName = annMethod.getName();
String pdClassName = annMethod.getDeclaringClass().getName();
for (ResourceContainerContext rcContext : rcContexts) {
LifecycleCallbackDescriptor preDestroyDesc =
new LifecycleCallbackDescriptor();
preDestroyDesc.setLifecycleCallbackClass(pdClassName);
preDestroyDesc.setLifecycleCallbackMethod(pdMethodName);
// override by xml is handled in addPreDestroyDescriptor
rcContext.addPreDestroyDescriptor(preDestroyDesc);
}
return getDefaultProcessedResult();