interfaces.add(interfce);
}
}
List<Class> remotes = new ArrayList<Class>();
Remote remote = clazz.getAnnotation(Remote.class);
if (remote != null) {
if (remote.value().length == 0) {
if (interfaces.size() != 1) {
validation.fail(ejbName, "ann.remote.noAttributes", join(", ", interfaces));
} else if (clazz.getAnnotation(Local.class) != null) {
validation.fail(ejbName, "ann.remoteLocal.ambiguous", join(", ", interfaces));
} else if (interfaces.get(0).getAnnotation(Local.class) != null) {
validation.fail(ejbName, "ann.remoteLocal.conflict", join(", ", interfaces));
} else {
validateRemoteInterface(interfaces.get(0), validation, ejbName);
remotes.add(interfaces.get(0));
interfaces.remove(0);
}
} else for (Class interfce : remote.value()) {
validateRemoteInterface(interfce, validation, ejbName);
remotes.add(interfce);
interfaces.remove(interfce);
}
}