}
protected HandlerProcessingResult processAnnotation(AnnotationInfo ainfo,
EjbContext[] ejbContexts) throws AnnotationProcessorException {
Remove remove = (Remove) ainfo.getAnnotation();
for(EjbContext next : ejbContexts) {
EjbSessionDescriptor sessionDescriptor =
(EjbSessionDescriptor) next.getDescriptor();
Method m = (Method) ainfo.getAnnotatedElement();
MethodDescriptor removeMethod =
new MethodDescriptor(m, MethodDescriptor.EJB_BEAN);
EjbRemovalInfo removalInfo =
sessionDescriptor.getRemovalInfo(removeMethod);
if (removalInfo == null) {
// if this element is not defined in xml
// use all information from annotation
removalInfo = new EjbRemovalInfo();
removalInfo.setRemoveMethod(removeMethod);
removalInfo.setRetainIfException(remove.retainIfException());
sessionDescriptor.addRemoveMethod(removalInfo);
} else {
// if this element is already defined in xml
// set the retainIfException only if this subelement
// is not defined in xml
if (! removalInfo.isRetainIfExceptionSet()) {
removalInfo.setRetainIfException(
remove.retainIfException());
}
}
}
return getDefaultProcessedResult();