Package org.jboss.ejb

Examples of org.jboss.ejb.ActivationConfigPropertyImpl


      if (consumer != null && !isAnnotatedBean())
      {
         if (consumer.getMessageDestination() != null)
         {
            ActivationConfigPropertyImpl property = new ActivationConfigPropertyImpl(
                  "destination", consumer.getMessageDestination());
            annotation.addActivationConfig(property);
         }

         if (consumer.getMessageDestinationType() != null)
         {
            ActivationConfigPropertyImpl property = new ActivationConfigPropertyImpl(
                  "destinationType", consumer.getMessageDestinationType());
            annotation.addActivationConfig(property);
         }

         addClassAnnotation(container, Consumer.class, annotation);
View Full Code Here


         ArrayList<ActivationConfigProperty> properties = new ArrayList<ActivationConfigProperty>();

         if (mdb.isJMS())
         {
            if (mdb.getAcknowledgeMode() != null)
               properties.add(new ActivationConfigPropertyImpl("acknowledgeMode", mdb.getAcknowledgeMode()));

            if(mdb.getMessageDestinationType() != null)
            {
               properties.add(new ActivationConfigPropertyImpl("destinationType", mdb.getMessageDestinationType()));
            }
            SubscriptionDurability subscriptionDurability = mdb.getSubscriptionDurability();
            if(subscriptionDurability != null)
            {
               String durable = "false";
               if (subscriptionDurability.equals(SubscriptionDurability.Durable))
                  durable = "true";
               properties.add(new ActivationConfigPropertyImpl("subscriptionDurability", durable));
               if (subscriptionDurability.equals(SubscriptionDurability.Durable))
                  properties.add(new ActivationConfigPropertyImpl("subscriptionName", "subscriptionName"));
            }

            // prefer jndi name over message destination link
            if (mdb.getDestinationJndiName() != null)
            {
               properties.add(new ActivationConfigPropertyImpl("destination", mdb
                     .getDestinationJndiName()));
            }
            else if(mdb.getMessageDestinationLink() != null)
            {
               log.warn("Message destination link on a MDB is not yet implemented, specify a jndi name in jboss.xml");
               /*
               // TODO: I can't resolve here, because we're still scanning, maybe this will work:
               // This will be picked up by MessagingContainer and then resolved to a jndi name
               properties.add(new ActivationConfigPropertyImpl("destinationLink", mdb.getMessageDestinationLink()));
               */
            }
           
            if (mdb.getMdbSubscriptionId() != null)
            {
               properties.add(new ActivationConfigPropertyImpl("subscriptionName", mdb
                     .getMdbSubscriptionId()));

            }

            // FIXME These properties are only for our jmsra.rar
           
            if (mdb.getMdbUser() != null)
            {
               properties.add(new ActivationConfigPropertyImpl("user", mdb
                     .getMdbUser()));
            }

            if (mdb.getMdbPassword() != null)
            {
               properties.add(new ActivationConfigPropertyImpl("password", mdb
                     .getMdbPassword()));

            }
         }

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

         ActivationConfigPropertyImpl[] propsArray = new ActivationConfigPropertyImpl[properties
View Full Code Here

      if (defaultActivationConfig != null)
      {
         DefaultActivationSpecsImpl activationAnnotation = new DefaultActivationSpecsImpl();
         for (ActivationConfigPropertyMetaData property : defaultActivationConfig.getActivationConfigProperties())
         {
            activationAnnotation.addActivationConfigProperty(new ActivationConfigPropertyImpl(property
                  .getName(), property.getValue()));
         }

         DefaultActivationSpecs existingAnnotation = ejbClass.getAnnotation(DefaultActivationSpecs.class);
         if (existingAnnotation != null)
View Full Code Here

/*      */
/*  559 */     if ((consumer != null) && (!isAnnotatedBean()))
/*      */     {
/*  561 */       if (consumer.getMessageDestination() != null)
/*      */       {
/*  563 */         ActivationConfigPropertyImpl property = new ActivationConfigPropertyImpl("destination", consumer.getMessageDestination());
/*      */
/*  565 */         annotation.addActivationConfig(property);
/*      */       }
/*      */
/*  568 */       if (consumer.getMessageDestinationType() != null)
/*      */       {
/*  570 */         ActivationConfigPropertyImpl property = new ActivationConfigPropertyImpl("destinationType", consumer.getMessageDestinationType());
/*      */
/*  572 */         annotation.addActivationConfig(property);
/*      */       }
/*      */
/*  575 */       addClassAnnotation(container, Consumer.class, annotation);
View Full Code Here

/*  655 */       ArrayList properties = new ArrayList();
/*      */
/*  657 */       if (mdb.isJMS())
/*      */       {
/*  659 */         if (mdb.getAcknowledgeMode() != null) {
/*  660 */           properties.add(new ActivationConfigPropertyImpl("acknowledgeMode", mdb.getAcknowledgeMode()));
/*      */         }
/*  662 */         if (mdb.getMessageDestinationType() != null)
/*      */         {
/*  664 */           properties.add(new ActivationConfigPropertyImpl("destinationType", mdb.getMessageDestinationType()));
/*      */         }
/*  666 */         SubscriptionDurability subscriptionDurability = mdb.getSubscriptionDurability();
/*  667 */         if (subscriptionDurability != null)
/*      */         {
/*  669 */           String durable = "false";
/*  670 */           if (subscriptionDurability.equals(SubscriptionDurability.Durable))
/*  671 */             durable = "true";
/*  672 */           properties.add(new ActivationConfigPropertyImpl("subscriptionDurability", durable));
/*  673 */           if (subscriptionDurability.equals(SubscriptionDurability.Durable)) {
/*  674 */             properties.add(new ActivationConfigPropertyImpl("subscriptionName", "subscriptionName"));
/*      */           }
/*      */         }
/*      */
/*  678 */         if (mdb.getDestinationJndiName() != null)
/*      */         {
/*  680 */           properties.add(new ActivationConfigPropertyImpl("destination", mdb.getDestinationJndiName()));
/*      */         }
/*  683 */         else if (mdb.getMessageDestinationLink() != null)
/*      */         {
/*  685 */           log.warn("Message destination link on a MDB is not yet implemented, specify a jndi name in jboss.xml");
/*      */         }
/*      */
/*  693 */         if (mdb.getMdbSubscriptionId() != null)
/*      */         {
/*  695 */           properties.add(new ActivationConfigPropertyImpl("subscriptionName", mdb.getMdbSubscriptionId()));
/*      */         }
/*      */
/*  702 */         if (mdb.getMdbUser() != null)
/*      */         {
/*  704 */           properties.add(new ActivationConfigPropertyImpl("user", mdb.getMdbUser()));
/*      */         }
/*      */
/*  708 */         if (mdb.getMdbPassword() != null)
/*      */         {
/*  710 */           properties.add(new ActivationConfigPropertyImpl("password", mdb.getMdbPassword()));
/*      */         }
/*      */
/*      */       }
/*      */
/*  716 */       ActivationConfigMetaData activationConfig = mdb.getActivationConfig();
/*  717 */       if ((activationConfig != null) && (activationConfig.getActivationConfigProperties() != null))
/*      */       {
/*  719 */         for (ActivationConfigPropertyMetaData property : activationConfig.getActivationConfigProperties())
/*      */         {
/*  721 */           properties.add(new ActivationConfigPropertyImpl(property.getName(), property.getValue()));
/*      */         }
/*      */
/*      */       }
/*      */
/*  726 */       ActivationConfigPropertyImpl[] propsArray = new ActivationConfigPropertyImpl[properties.size()];
View Full Code Here

/*  757 */     if (defaultActivationConfig != null)
/*      */     {
/*  759 */       DefaultActivationSpecsImpl activationAnnotation = new DefaultActivationSpecsImpl();
/*  760 */       for (ActivationConfigPropertyMetaData property : defaultActivationConfig.getActivationConfigProperties())
/*      */       {
/*  762 */         activationAnnotation.addActivationConfigProperty(new ActivationConfigPropertyImpl(property.getName(), property.getValue()));
/*      */       }
/*      */
/*  766 */       DefaultActivationSpecs existingAnnotation = (DefaultActivationSpecs)this.ejbClass.getAnnotation(DefaultActivationSpecs.class);
/*  767 */       if (existingAnnotation != null) {
/*  768 */         activationAnnotation.merge(existingAnnotation);
View Full Code Here

TOP

Related Classes of org.jboss.ejb.ActivationConfigPropertyImpl

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.