Package org.jboss.metadata.ejb.spec

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


    * @param name the name of the property
    * @return the ActivationConfigPropertyMetaData or null if not found
    */
   public ActivationConfigPropertyMetaData getActivationConfigProperty(String name)
   {
      ActivationConfigMetaData config = getDelegate().getActivationConfig();
      if (config != null)
      {
         ActivationConfigPropertiesMetaData properties = config.getActivationConfigProperties();
         if (properties != null)
         {
            org.jboss.metadata.ejb.spec.ActivationConfigPropertyMetaData result = properties.get(name);
            if (result != null)
               return new ActivationConfigPropertyMetaData(result);
View Full Code Here


      if(annotation.mappedName().length() > 0)
         metaData.setMappedName(annotation.mappedName());
      if(annotation.messageListenerInterface() != Object.class)
         metaData.setMessagingType(annotation.messageListenerInterface().getName());
      ActivationConfigProperty[] props = annotation.activationConfig();
      ActivationConfigMetaData config = new ActivationConfigMetaData();
      ActivationConfigPropertiesMetaData configProps = new ActivationConfigPropertiesMetaData();
      config.setActivationConfigProperties(configProps);
      for(ActivationConfigProperty prop : props)
      {
         ActivationConfigPropertyMetaData acp = new ActivationConfigPropertyMetaData();
         acp.setActivationConfigPropertyName(prop.propertyName());
         acp.setValue(prop.propertyValue());
View Full Code Here

                     .getMdbPassword()));

            }
         }

         ActivationConfigMetaData activationConfig = mdb.getActivationConfig();
         if (activationConfig != null && activationConfig.getActivationConfigProperties() != null)
         {
            for (ActivationConfigPropertyMetaData property : activationConfig.getActivationConfigProperties())
            {
               properties.add(new ActivationConfigPropertyImpl(property
                     .getName(), property.getValue()));
            }
         }
View Full Code Here

      }
   }

   private void addDefaultActivationConfig(MDB container, JBossMessageDrivenBeanMetaData mdb)
   {
      ActivationConfigMetaData defaultActivationConfig = mdb.getDefaultActivationConfig();
      if (defaultActivationConfig != null)
      {
         DefaultActivationSpecsImpl activationAnnotation = new DefaultActivationSpecsImpl();
         for (ActivationConfigPropertyMetaData property : defaultActivationConfig.getActivationConfigProperties())
         {
            activationAnnotation.addActivationConfigProperty(new ActivationConfigPropertyImpl(property
                  .getName(), property.getValue()));
         }
View Full Code Here

                deploymentDescriptorEnvironment = new DeploymentDescriptorEnvironment("java:comp/env/",beanMetaData);
                if (beanMetaData instanceof MessageDrivenBeanMetaData) {
                    //It may actually be GenericBeanMetadata instance
                    final MessageDrivenBeanMetaData mdb = (MessageDrivenBeanMetaData) beanMetaData;
                    messagingType = mdb.getMessagingType();
                    final ActivationConfigMetaData activationConfigMetaData = mdb.getActivationConfig();
                    if (activationConfigMetaData != null) {
                        final ActivationConfigPropertiesMetaData propertiesMetaData = activationConfigMetaData.getActivationConfigProperties();
                        if (propertiesMetaData != null) {
                            for (ActivationConfigPropertyMetaData propertyMetaData : propertiesMetaData) {
                                activationConfigProperties.put(propertyMetaData.getKey(), propertyMetaData.getValue());
                            }
                        }
View Full Code Here

   {
      JBossEnterpriseBeanMetaData enterpriseBeanMetaData = jbossMetaData.getEnterpriseBean("testmdb");
      assertNotNull(enterpriseBeanMetaData);
      assertTrue(enterpriseBeanMetaData.isMessageDriven());
      JBossMessageDrivenBeanMetaData messageDrivenBeanMetaData = (JBossMessageDrivenBeanMetaData) enterpriseBeanMetaData;
      ActivationConfigMetaData activationConfigMetaData = messageDrivenBeanMetaData.getActivationConfig();
      assertNotNull(activationConfigMetaData);
      ActivationConfigPropertiesMetaData properties = activationConfigMetaData.getActivationConfigProperties();
      assertNotNull(properties);
      assertEquals(6, properties.size());
      assertProperty(properties, "ejbjar1", "FromEJBJAR1");
      assertProperty(properties, "ejbjar2", "FromEJBJAR2");
      assertProperty(properties, "jboss1", "FromJBoss1");
View Full Code Here

      JBossMessageDrivenBeanMetaData bean = (JBossMessageDrivenBeanMetaData) enterpriseBean;
      assertEquals(MyMDB.class.getName(), bean.getEjbClass());
      assertEquals("MailMDB", bean.getEjbName());
      assertEquals(false, bean.isJMS());
      assertEquals(IMailListener.class.getName(), bean.getMessagingType());
      ActivationConfigMetaData config = bean.getActivationConfig();
      ActivationConfigMetaData expected = new ActivationConfigMetaData();
      ActivationConfigPropertiesMetaData props = new ActivationConfigPropertiesMetaData();
      ActivationConfigPropertyMetaData p1 = new ActivationConfigPropertyMetaData();
      p1.setName("p1");
      p1.setValue("v1");
      props.add(p1);
      ActivationConfigPropertyMetaData p2 = new ActivationConfigPropertyMetaData();
      p2.setName("p2");
      p2.setValue("v2");
      props.add(p2);
      expected.setActivationConfigProperties(props);
      assertEquals(expected, config);
      assertEquals("java:/mdbs/MailMDB", bean.getMappedName());
      // @ResourceAdapter
      assertEquals("MDBResourceAdapter", bean.getResourceAdapterName());
   }
View Full Code Here

      assertNotNull(bean);
      assertEquals(MyConsumer.class.getName(), bean.getEjbClass());
      assertEquals("MyConsumer", bean.getEjbName());
      //assertEquals(false, bean.isJMS());
      //assertEquals(IMailListener.class.getName(), bean.getMessagingType());
      ActivationConfigMetaData config = bean.getActivationConfig();
      ActivationConfigMetaData expected = new ActivationConfigMetaData();
      ActivationConfigPropertiesMetaData props = new ActivationConfigPropertiesMetaData();
      ActivationConfigPropertyMetaData p1 = new ActivationConfigPropertyMetaData();
      p1.setName("p1");
      p1.setValue("v1");
      props.add(p1);
      ActivationConfigPropertyMetaData p2 = new ActivationConfigPropertyMetaData();
      p2.setName("p2");
      p2.setValue("v2");
      props.add(p2);
      expected.setActivationConfigProperties(props);
      assertEquals(expected, config);
      //assertEquals("java:/mdbs/MailMDB", bean.getMappedName());
     
      // @Producer
      assertNotNull(bean.getProducers());
View Full Code Here

      assertEquals("testConsumer", bean.getEjbName());
     
      // @AspectDomain
      assertEquals("testConsumerDomain", bean.getAopDomainName());
     
      ActivationConfigMetaData config = bean.getActivationConfig();
      ActivationConfigMetaData expected = new ActivationConfigMetaData();
      ActivationConfigPropertiesMetaData props = new ActivationConfigPropertiesMetaData();
      ActivationConfigPropertyMetaData p1 = new ActivationConfigPropertyMetaData();
      p1.setName("p1");
      p1.setValue("v1");
      props.add(p1);
      ActivationConfigPropertyMetaData p2 = new ActivationConfigPropertyMetaData();
      p2.setName("p2");
      p2.setValue("v2");
      props.add(p2);
      expected.setActivationConfigProperties(props);
      assertEquals(expected, config);
     
      assertNotNull(bean.getProducers());
      assertEquals(2, bean.getProducers().size());
      ProducerMetaData producer1 = bean.getProducers().get(0);
View Full Code Here

      props.add(prop);
      prop = new ActivationConfigPropertyMetaData();
      prop.setName("prop2");
      prop.setValue(prop.getName() + "Original");
      props.add(prop);
      ActivationConfigMetaData aconfig = new ActivationConfigMetaData();
      aconfig.setActivationConfigProperties(props);
      original.setActivationConfig(aconfig);
     
      JBossMessageDrivenBeanMetaData override = new JBossMessageDrivenBeanMetaData();
      override.setEjbName("mdb");

      props = new ActivationConfigPropertiesMetaData();
      prop = new ActivationConfigPropertyMetaData();
      prop.setName("prop2");
      prop.setValue(prop.getName() + "Override");
      props.add(prop);
      prop = new ActivationConfigPropertyMetaData();
      prop.setName("prop3");
      prop.setValue(prop.getName() + "Override");
      props.add(prop);
      aconfig = new ActivationConfigMetaData();
      aconfig.setActivationConfigProperties(props);
      override.setActivationConfig(aconfig);
     
      JBossMessageDrivenBeanMetaData merged = new JBossMessageDrivenBeanMetaData();
      merged.merge(override, original);
      aconfig = merged.getActivationConfig();
      assertNotNull(aconfig);
      props = aconfig.getActivationConfigProperties();
      assertNotNull(props);
      assertEquals(3, props.size());
      prop = props.get("prop1");
      assertNotNull(prop);
      assertEquals(prop.getName() + "Original", prop.getValue());
View Full Code Here

TOP

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

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.