return;
}
final Map<String, EjbLocalRef> localRefs = consumer.getEjbLocalRefMap();
if (localRefs.containsKey(ejbRef.getName())) {
final EjbLocalRef ejbLocalRef = new EjbLocalRef(ejbRef);
final EjbLocalRef ref = localRefs.get(ejbLocalRef.getName());
if (ref.getLocal() == null) {
ref.setLocal(ejbLocalRef.getLocal());
}
if (ref.getLocalHome() == null) {
ref.setLocalHome(ejbLocalRef.getLocalHome());
}
if (ref.getMappedName() == null) {
ref.setMappedName(ejbLocalRef.getMappedName());
}
ref.getInjectionTarget().addAll(ejbLocalRef.getInjectionTarget());
return;
}
switch (ejbRef.getRefType()) {
case UNKNOWN:
case REMOTE:
consumer.getEjbRef().add(ejbRef);
break;
case LOCAL:
consumer.getEjbLocalRef().add(new EjbLocalRef(ejbRef));
break;
}
}