if (!ejb.isSession() && !ejb.isService())
protected EJB_TYPE getEjbType(JBossEnterpriseBeanMetaData enterpriseBean) { if (enterpriseBean.isSession()) { if (((JBossSessionBeanMetaData) enterpriseBean).isStateless()) return EJB_TYPE.STATELESS; else if (((JBossSessionBeanMetaData) enterpriseBean).isStateful()) return EJB_TYPE.STATEFUL; } else if (enterpriseBean.isEntity()) return EJB_TYPE.ENTITY; else if (enterpriseBean.isMessageDriven()) return EJB_TYPE.MESSAGE_DRIVEN; else if (enterpriseBean.isService()) return EJB_TYPE.SERVICE; else if (enterpriseBean.isConsumer()) return EJB_TYPE.CONSUMER; return EJB_TYPE.UNKNOWN; }
public EjbDeploymentSummary(JBossEnterpriseBeanMetaData beanMD, DeploymentSummary dsummary) { super(dsummary); // this.setBeanClassName(beanMD.getEjbClass()); this.setEjbName(beanMD.getEjbName()); this.setService(beanMD.isService()); if(beanMD instanceof JBossSessionBeanMetaData) { JBossSessionBeanMetaData sbeanMD = (JBossSessionBeanMetaData) beanMD; this.setStateful(sbeanMD.isStateful()); if(sbeanMD.getHome() != null && sbeanMD.getHome().length() > 0) this.setHome(true); if(sbeanMD.getLocal() != null && sbeanMD.getLocal().length() > 0) this.setLocal(true); // Is a local-home also a home? } this.beanMD = beanMD; }
if (beanMD.isSession() || beanMD.isService())
if (ejbMarMd.isEJB3x()) if (md.isSession() || md.isService())
if (ejbJarMd.isEJB3x()) if (md.isSession() || md.isService())
private static EjbDeploymentSummary getUnitSummary(DeploymentUnit unit, JBossEnterpriseBeanMetaData beanMD) { ClassLoader loader = unit.getClassLoader(); EjbDeploymentSummary summary = new EjbDeploymentSummary(); summary.setBeanMD(beanMD); summary.setBeanClassName(beanMD.getEjbClass()); summary.setDeploymentName(unit.getShortName()); String baseName = unit.getRootFile().getName(); summary.setDeploymentScopeBaseName(baseName); summary.setEjbName(beanMD.getEjbName()); summary.setLoader(loader); summary.setLocal(beanMD.isMessageDriven()); if(beanMD instanceof JBossSessionBeanMetaData) { JBossSessionBeanMetaData sbeanMD = (JBossSessionBeanMetaData) beanMD; summary.setStateful(sbeanMD.isStateful()); } summary.setService(beanMD.isService()); return summary; }