public String getEJBJNDIUniqueName(final String itf, final String beanName) throws EZBJNDIResolverException {
List<EZBJNDIBeanData> dataList = getEJBJNDINames(itf, beanName);
// Not found
if (dataList == null || dataList.isEmpty()) {
throw new EZBJNDIResolverException("No JNDI Name found for interface '" + itf + "' and bean name '" + beanName
+ "'.");
}
// Too many entries !
if (dataList.size() > 1) {
throw new EZBJNDIResolverException("Found too many entries corresponding to the interface '" + itf
+ "' and the bean name '" + beanName + "'. Found list = '" + dataList + "'.");
}
// Only one item, it's good
return dataList.get(0).getName();