private void addDescriptorAnnotations(EJBContainer container, JBossEnterpriseBeanMetaData enterpriseBean, String ejbName, boolean isStateful) throws Exception { // EJBTHREE-936: TODO: another wicked patch: jndi-name might mean local-jndi-name // TODO: Make sure this is done after addInterfaces! if(enterpriseBean instanceof JBossGenericBeanMetaData) { Class<?>[] remoteAndBusinessRemoteInterfaces = ProxyFactoryHelper.getRemoteAndBusinessRemoteInterfaces(container); if(remoteAndBusinessRemoteInterfaces.length == 0) { enterpriseBean.setLocalJndiName(enterpriseBean.getMappedName()); enterpriseBean.setMappedName(null); } } addTransactionAnnotations(container, enterpriseBean, ejbName); addAssemblyAnnotations(container, enterpriseBean, ejbName); addSecurityAnnotations(container, enterpriseBean, ejbName); addEjbAnnotations(container, enterpriseBean); addEjb21Annotations(container, isStateful); addWebServiceAnnotations(container, enterpriseBean); }