AnnotatedElement ae = ainfo.getAnnotatedElement();
Annotation annotation = ainfo.getAnnotation();
AnnotatedElementHandler aeHandler =
ainfo.getProcessingContext().getHandler();
if (aeHandler instanceof EjbBundleContext) {
EjbBundleContext ejbBundleContext = (EjbBundleContext)aeHandler;
EjbBundleDescriptor ejbBundle = ejbBundleContext.getDescriptor();
ApplicationException appExcAnn = (ApplicationException) annotation;
EjbApplicationExceptionInfo appExcInfo = new
EjbApplicationExceptionInfo();
Class annotatedClass = (Class) ae;
appExcInfo.setExceptionClassName(annotatedClass.getName());
appExcInfo.setRollback(appExcAnn.rollback());
ejbBundle.addApplicationException(appExcInfo);
}
return getDefaultProcessedResult();