for (EnterpriseBean enterpriseBean : enterpriseBeans) {
if (!(enterpriseBean instanceof SessionBean)) {
continue;
}
SessionBean sessionBean = (SessionBean) enterpriseBean;
String ejbClass = sessionBean.getEjbClass();
if (ejbClass == null || ejbClass.length() == 0) continue;
facade.removeInterface(ejbClass, "javax.ejb.SessionBean"); //$NON-NLS-1$
if (! useHome) {
String remoteInterface = sessionBean.getRemote();
if (remoteInterface != null && remoteInterface.length() > 0) {
facade.addInterface(ejbClass, remoteInterface);
facade.removeInterface(remoteInterface, "javax.ejb.EJBObject"); //$NON-NLS-1$
}
String localInterface = sessionBean.getLocal();
if (localInterface != null && localInterface.length() > 0) {
facade.addInterface(ejbClass, localInterface);
facade.removeInterface(localInterface, "javax.ejb.EJBLocalObject"); //$NON-NLS-1$
}
}