}
}
for (EjbLocalRefType xmlbeansRef : ejbLocalRefs) {
// create the ejb-ref
EjbLocalRef ref = new EjbLocalRef();
jndiConsumer.getEjbLocalRef().add(ref);
// ejb-ref-name
ref.setEjbRefName(getStringValue(xmlbeansRef.getEjbRefName()));
// ejb-ref-type
String refType = getStringValue(xmlbeansRef.getEjbRefType());
if ("SESSION".equalsIgnoreCase(refType)) {
ref.setEjbRefType(org.apache.openejb.jee.EjbRefType.SESSION);
} else if ("ENTITY".equalsIgnoreCase(refType)) {
ref.setEjbRefType(org.apache.openejb.jee.EjbRefType.ENTITY);
}
// home
ref.setLocalHome(getStringValue(xmlbeansRef.getLocalHome()));
// remote
ref.setLocal(getStringValue(xmlbeansRef.getLocal()));
// ejb-link
ref.setEjbLink(getStringValue(xmlbeansRef.getEjbLink()));
// mapped-name
ref.setMappedName(getStringValue(xmlbeansRef.getMappedName()));
// injection-targets
if (xmlbeansRef.getInjectionTargetArray() != null) {
for (InjectionTargetType injectionTargetType : xmlbeansRef.getInjectionTargetArray()) {
InjectionTarget injectionTarget = new InjectionTarget();
injectionTarget.setInjectionTargetClass(getStringValue(injectionTargetType.getInjectionTargetClass()));
injectionTarget.setInjectionTargetName(getStringValue(injectionTargetType.getInjectionTargetName()));
ref.getInjectionTarget().add(injectionTarget);
}
}
}
return jndiConsumer;
}