Package org.jboss.metadata.ejb.spec

Examples of org.jboss.metadata.ejb.spec.EnterpriseBeansMetaData


    */
   public void testEjbthree936() throws Exception
   {
      // normally from the annotation scanner
      EjbJar30MetaData ejbJar = new EjbJar30MetaData();
      ejbJar.setEnterpriseBeans(new EnterpriseBeansMetaData());
      SessionBeanMetaData sessionBean = new SessionBeanMetaData();
      sessionBean.setEjbName("MyStatelessBean");
      ejbJar.getEnterpriseBeans().add(sessionBean);
     
      JBossMetaData jboss = unmarshal();
View Full Code Here


   }

   public void testMDBActivationConfigMerge()
   {
      EjbJar30MetaData ejbJar = new EjbJar30MetaData();
      ejbJar.setEnterpriseBeans(new EnterpriseBeansMetaData());
      MessageDrivenBeanMetaData messageBean = new MessageDrivenBeanMetaData();
      messageBean.setEjbName("MyMDB");
      // Do not add an activationConfig
//      ActivationConfigMetaData activationConfig = new ActivationConfigMetaData();
//      ActivationConfigPropertiesMetaData activationConfigProperties = new ActivationConfigPropertiesMetaData();
View Full Code Here

      //Merge the EJB30 metadata first
      merged.merge(ejb3MetaData, specResult);
      //Merge the JBoss metadata
      merged.merge(jbossxmlMetaData, specResult);

      EnterpriseBeansMetaData ebsmd = specResult.getEnterpriseBeans();
      assertNotNull(ebsmd)
      assertNotNull(specResult.getEnterpriseBean("BusinessBean"));
   }
View Full Code Here

   }

   public void testHomeJndiNameForEJB3() throws Exception
   {
      EjbJar30MetaData spec = new EjbJar30MetaData();
      EnterpriseBeansMetaData specBeans = new EnterpriseBeansMetaData();
      spec.setEnterpriseBeans(specBeans);
      SessionBeanMetaData specBean = new SessionBeanMetaData();
      specBean.setEjbName("ejb3session");
      specBeans.add(specBean);
     
      JBossMetaData jboss = new JBossMetaData();
      JBossEnterpriseBeansMetaData jbossBeans = new JBossEnterpriseBeansMetaData();
      jboss.setEnterpriseBeans(jbossBeans);
      JBossSessionBeanMetaData jbossBean = new JBossSessionBeanMetaData();
View Full Code Here

      EjbJar30MetaData metaData = creator.create(classes);
      EjbJar3xMetaData specMetaData = new EjbJar30MetaData();
      EjbJar3xMetaData merged = new EjbJar30MetaData();
      AnnotationMergedView.merge(merged, specMetaData, metaData);

      EnterpriseBeansMetaData beans = merged.getEnterpriseBeans();
      assertNotNull(beans);
      assertEquals(1, beans.size());
      EnterpriseBeanMetaData bean = beans.get("MyStatelessBean");
      assertNotNull(bean);
      assertMyStatelessBean(bean);
   }
View Full Code Here

        final EjbJarMetaData ejbJarMetaData = deploymentUnit.getAttachment(EjbDeploymentAttachmentKeys.EJB_JAR_METADATA);
        if (ejbJarMetaData == null) {
            return;
        }
        // process EJBs
        final EnterpriseBeansMetaData ejbs = ejbJarMetaData.getEnterpriseBeans();
        if (ejbs != null && !ejbs.isEmpty()) {
            for (final EnterpriseBeanMetaData ejb : ejbs) {
                processBeanMetaData(deploymentUnit, ejb);
            }
        }
        EjbDeploymentMarker.mark(deploymentUnit);
View Full Code Here

            return null;
        return jarMetaData.getEnterpriseBeans();
    }

    static EnterpriseBeanMetaData getEnterpriseBeanMetaData(final DeploymentUnit deploymentUnit, final String name) {
        final EnterpriseBeansMetaData enterpriseBeansMetaData = getEnterpriseBeansMetaData(deploymentUnit);
        if (enterpriseBeansMetaData == null)
            return null;
        return enterpriseBeansMetaData.get(name);
    }
View Full Code Here

        return enterpriseBeansMetaData.get(name);
    }

    @Deprecated
    static <B extends EnterpriseBeanMetaData> B getEnterpriseBeanMetaData(final DeploymentUnit deploymentUnit, final String name, final Class<B> expectedType) {
        final EnterpriseBeansMetaData enterpriseBeansMetaData = getEnterpriseBeansMetaData(deploymentUnit);
        if (enterpriseBeansMetaData == null)
            return null;
        return expectedType.cast(enterpriseBeansMetaData.get(name));
    }
View Full Code Here

   }

   public void testEnterpriseBeans() throws Exception
   {
      EjbJar3xMetaData result = unmarshal();
      EnterpriseBeansMetaData beans = result.getEnterpriseBeans();
      assertNotNull(beans);

      assertEquals(1, beans.size());
      IEnterpriseBeanMetaData bean = beans.iterator().next();
      assertEquals("TestBean", bean.getEjbName());

      ApplicationMetaData old = new ApplicationMetaData(result);
      Iterator<BeanMetaData> iterator = old.getEnterpriseBeans();
      assertTrue(iterator.hasNext());
View Full Code Here

                    return ejbJarDescription.hasComponent((String) o);
                }
            };
        }
        // process EJBs
        final EnterpriseBeansMetaData ejbs = ejbJarMetaData.getEnterpriseBeans();
        if (ejbs != null && !ejbs.isEmpty()) {
            for (final EnterpriseBeanMetaData ejb : ejbs) {
                final String beanName = ejb.getName();
                // the important bit is to skip already processed EJBs via annotations
                if (annotatedEJBs.contains(beanName)) {
                    continue;
View Full Code Here

TOP

Related Classes of org.jboss.metadata.ejb.spec.EnterpriseBeansMetaData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.