try {
if (bean.isLocalbean()) {
Class beanClass = bean.getBeanClass();
BeanContext.BusinessLocalBeanHome home = bean.getBusinessLocalBeanHome();
BusinessLocalBeanReference ref = new BusinessLocalBeanReference(home);
optionalBind(bindings, ref, "openejb/Deployment/" + format(id, beanClass.getName(), InterfaceType.LOCALBEAN));
// if the user inject the EJB using a parent class
if (!bean.getBeanClass().isInterface()) {