} else if (referenceInfo.ejbDeploymentId == null) {
reference = new LazyEjbReference(new Ref(referenceInfo), moduleUri, useCrossClassLoaderRef);
} else {
String jndiName = "openejb/Deployment/" + JndiBuilder.format(referenceInfo.ejbDeploymentId, referenceInfo.interfaceClassName, referenceInfo.localbean ? InterfaceType.LOCALBEAN : InterfaceType.BUSINESS_REMOTE);
if (useCrossClassLoaderRef && referenceInfo.externalReference) {
reference = new CrossClassLoaderJndiReference(jndiName);
} else {
reference = new IntraVmJndiReference(jndiName);
}
}
bindings.put(normalize(referenceInfo.referenceName), reference);