private void addEjbAnnotations(EJBContainer container, JBossEnterpriseBeanMetaData enterpriseBean) throws Exception { if (enterpriseBean != null) { if (enterpriseBean instanceof JBossSessionBeanMetaData) { addHomeAnnotations(container, (JBossSessionBeanMetaData) enterpriseBean); addJndiAnnotations(container, (JBossSessionBeanMetaData) enterpriseBean); } addInterceptorMethodAnnotations(container, enterpriseBean); handleResourceRefs(container, enterpriseBean.getResourceReferences()); addMessageDestinationAnnotations(container, enterpriseBean.getMessageDestinationReferences()); addSecurityIdentityAnnotation(container, enterpriseBean.getSecurityIdentity()); addDependencies(container, enterpriseBean); addPoolAnnotations(container, enterpriseBean); addXmlAnnotations(container, enterpriseBean); if (enterpriseBean instanceof JBossSessionBeanMetaData) { addConcurrentAnnotations(container, (JBossSessionBeanMetaData)enterpriseBean); addClusterAnnotations(container, (JBossSessionBeanMetaData)enterpriseBean); addCacheAnnotations(container, (JBossSessionBeanMetaData)enterpriseBean); } } }