List<Class> appExceptions;
appExceptions = finder.findInheritedAnnotatedClasses(ApplicationException.class);
for (Class<?> exceptionClass : appExceptions) {
startupLogger.debug("...handling " + exceptionClass);
if (assemblyDescriptor.getApplicationException(exceptionClass) == null) {
ApplicationException annotation = exceptionClass.getAnnotation(ApplicationException.class);
// OPENEJB-980
if (annotation == null) {
Class<?> parentExceptionClass = exceptionClass;
while (annotation == null) {
parentExceptionClass = parentExceptionClass.getSuperclass();
annotation = parentExceptionClass.getAnnotation(ApplicationException.class);
}
}
startupLogger.debug("...adding " + exceptionClass + " with rollback=" + annotation.rollback());
assemblyDescriptor.addApplicationException(exceptionClass, annotation.rollback());
}
}
ejbModule.getFinderReference().set(finder);