insert(info, appInfo.globalJndiEnc.ejbReferences, appInfo.appJndiEnc.ejbReferences, moduleJndiEnc.ejbReferences, compJndiEnc.ejbReferences);
}
continue;
}
EjbResolver ejbResolver = getEjbResolver(moduleId);
String deploymentId = ejbResolver.resolve(new Ref(ref), moduleUri);
info.ejbDeploymentId = deploymentId;
if (info.ejbDeploymentId == null) {
if (info.link != null){
logger.warning("config.noBeanFoundEjbLink", ref.getName(), ejbName, ref.getEjbLink());
} else {
logger.warning("config.noBeanFound", ref.getName(), ejbName, ref.getEjbLink());
}
} else {
// info.localbean = isLocalBean(moduleId, deploymentId);
EjbResolver.Scope scope = ejbResolver.getScope(deploymentId);
info.externalReference = (scope != EAR && scope != EJBJAR);
if (ref.getRefType() == EjbReference.Type.UNKNOWN) {
EnterpriseBeanInfo otherBean = ejbResolver.getEnterpriseBeanInfo(deploymentId);
if (otherBean != null) {
if (otherBean.businessLocal.contains(ref.getInterface()) || otherBean.ejbClass.equals(ref.getInterface())) {
ref.setRefType(EjbReference.Type.LOCAL);
jndiConsumer.getEjbRef().remove(ref);
jndiConsumer.getEjbLocalRef().add(new EjbLocalRef(ref));