Package org.jboss.metadata.ejb.spec

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


                continue;
            }
            final String ejbName = beanClassInfo.name().local();
            final AnnotationValue nameValue = messageBeanAnnotation.value("name");
            final String beanName = nameValue == null || nameValue.asString().isEmpty() ? ejbName : nameValue.asString();
            final MessageDrivenBeanMetaData beanMetaData = getEnterpriseBeanMetaData(deploymentUnit, beanName, MessageDrivenBeanMetaData.class);
            final String beanClassName;
            final String messageListenerInterfaceName;
            final Properties activationConfigProperties = getActivationConfigProperties(messageBeanAnnotation);
            final String messagingType;
            if (beanMetaData != null) {
                beanClassName = override(beanClassInfo.name().toString(), beanMetaData.getEjbClass());
                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 (final ActivationConfigPropertyMetaData propertyMetaData : propertiesMetaData) {
                                activationConfigProperties.put(propertyMetaData.getKey(), propertyMetaData.getValue());
                            }
                        }
                    }
                } else if (beanMetaData instanceof JBossGenericBeanMetaData) {
                    //TODO: fix the hierarchy so this is not needed
                    final JBossGenericBeanMetaData mdb = (JBossGenericBeanMetaData) beanMetaData;
                    messagingType = mdb.getMessagingType();
                    final ActivationConfigMetaData activationConfigMetaData = mdb.getActivationConfig();
                    if (activationConfigMetaData != null) {
                        final ActivationConfigPropertiesMetaData propertiesMetaData = activationConfigMetaData.getActivationConfigProperties();
                        if (propertiesMetaData != null) {
                            for (final ActivationConfigPropertyMetaData propertyMetaData : propertiesMetaData) {
                                activationConfigProperties.put(propertyMetaData.getKey(), propertyMetaData.getValue());
View Full Code Here


                continue;
            }
            final String ejbName = beanClassInfo.name().local();
            final AnnotationValue nameValue = messageBeanAnnotation.value("name");
            final String beanName = nameValue == null || nameValue.asString().isEmpty() ? ejbName : nameValue.asString();
            final MessageDrivenBeanMetaData beanMetaData = getEnterpriseBeanMetaData(deploymentUnit, beanName, MessageDrivenBeanMetaData.class);
            final String beanClassName;
            final String messageListenerInterfaceName;
            final Properties activationConfigProperties = getActivationConfigProperties(messageBeanAnnotation);
            if (beanMetaData != null) {
                beanClassName = override(beanClassInfo.name().toString(), beanMetaData.getEjbClass());
                final String messagingType = beanMetaData.getMessagingType();
                messageListenerInterfaceName = messagingType != null ? messagingType : getMessageListenerInterface(messageBeanAnnotation);
                final ActivationConfigMetaData activationConfigMetaData = beanMetaData.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

/*     */
/*     */   public void merge(JBossEnterpriseBeanMetaData override, EnterpriseBeanMetaData original, String overridenFile, String overrideFile, boolean mustOverride)
/*     */   {
/* 569 */     super.merge(override, original, overridenFile, overrideFile, mustOverride);
/* 570 */     JBossMessageDrivenBeanMetaData joverride = (JBossMessageDrivenBeanMetaData)override;
/* 571 */     MessageDrivenBeanMetaData soriginal = (MessageDrivenBeanMetaData)original;
/*     */
/* 573 */     if ((joverride != null) && (joverride.messagingType != null))
/* 574 */       this.messagingType = joverride.messagingType;
/* 575 */     else if ((soriginal != null) && (soriginal.getMessagingType() != null)) {
/* 576 */       this.messagingType = soriginal.getMessagingType();
/*     */     }
/* 578 */     if ((joverride != null) && (joverride.timeoutMethod != null))
/* 579 */       this.timeoutMethod = joverride.timeoutMethod;
/* 580 */     else if ((soriginal != null) && (soriginal.getTimeoutMethod() != null)) {
/* 581 */       this.timeoutMethod = soriginal.getTimeoutMethod();
/*     */     }
/* 583 */     if ((joverride != null) && (joverride.messageDestinationType != null))
/* 584 */       this.messageDestinationType = joverride.messageDestinationType;
/* 585 */     else if ((soriginal != null) && (soriginal.getMessageDestinationType() != null)) {
/* 586 */       this.messageDestinationType = soriginal.getMessageDestinationType();
/*     */     }
/* 588 */     if ((joverride != null) && (joverride.messageDestinationLink != null))
/* 589 */       this.messageDestinationLink = joverride.messageDestinationLink;
/* 590 */     else if ((soriginal != null) && (soriginal.getMessageDestinationLink() != null)) {
/* 591 */       this.messageDestinationLink = soriginal.getMessageDestinationLink();
/*     */     }
/* 593 */     ActivationConfigMetaData jbossActivationConfig = null;
/* 594 */     if ((joverride != null) && (joverride.getActivationConfig() != null))
/* 595 */       jbossActivationConfig = joverride.getActivationConfig();
/* 596 */     ActivationConfigMetaData originalActivationConfig = null;
/* 597 */     if (soriginal != null)
/* 598 */       originalActivationConfig = soriginal.getActivationConfig();
/* 599 */     if ((jbossActivationConfig != null) || (originalActivationConfig != null))
/*     */     {
/* 601 */       if (this.activationConfig == null)
/* 602 */         this.activationConfig = new ActivationConfigMetaData();
/* 603 */       this.activationConfig.merge(jbossActivationConfig, originalActivationConfig);
/*     */     }
/*     */
/* 606 */     if ((joverride != null) && (joverride.aroundInvokes != null))
/* 607 */       this.aroundInvokes = joverride.aroundInvokes;
/* 608 */     else if ((soriginal != null) && (soriginal.getAroundInvokes() != null)) {
/* 609 */       this.aroundInvokes = soriginal.getAroundInvokes();
/*     */     }
/* 611 */     if ((joverride != null) && (joverride.messageSelector != null))
/* 612 */       this.messageSelector = joverride.messageSelector;
/* 613 */     else if ((soriginal != null) && (soriginal.getMessageSelector() != null)) {
/* 614 */       this.messageSelector = soriginal.getMessageSelector();
/*     */     }
/* 616 */     if ((joverride != null) && (joverride.acknowledgeMode != null))
/* 617 */       this.acknowledgeMode = joverride.acknowledgeMode;
/* 618 */     else if ((soriginal != null) && (soriginal.getAcknowledgeMode() != null)) {
/* 619 */       this.acknowledgeMode = soriginal.getAcknowledgeMode();
/*     */     }
/* 621 */     if ((joverride != null) && (joverride.subscriptionDurability != null))
/* 622 */       this.subscriptionDurability = joverride.subscriptionDurability;
/* 623 */     else if ((soriginal != null) && (soriginal.getSubscriptionDurability() != null)) {
/* 624 */       this.subscriptionDurability = soriginal.getSubscriptionDurability();
/*     */     }
/* 626 */     if ((joverride != null) && (joverride.destinationJndiName != null))
/* 627 */       this.destinationJndiName = joverride.destinationJndiName;
/* 628 */     else if ((soriginal != null) && (soriginal.getMappedName() != null)) {
/* 629 */       this.destinationJndiName = soriginal.getMappedName();
/*     */     }
/* 631 */     if ((joverride != null) && (joverride.mdbUser != null)) {
/* 632 */       this.mdbUser = joverride.mdbUser;
/*     */     }
/* 634 */     if ((joverride != null) && (joverride.mdbPassword != null)) {
View Full Code Here

/*    */   {
/* 54 */     MessageDriven annotation = (MessageDriven)this.finder.getAnnotation(beanClass, MessageDriven.class);
/* 55 */     if (annotation == null) {
/* 56 */       return null;
/*    */     }
/* 58 */     MessageDrivenBeanMetaData metaData = new MessageDrivenBeanMetaData();
/* 59 */     metaData.setEjbClass(beanClass.getName());
/* 60 */     if (annotation.name().length() > 0)
/* 61 */       metaData.setEjbName(annotation.name());
/*    */     else
/* 63 */       metaData.setEjbName(beanClass.getSimpleName());
/* 64 */     if (annotation.description().length() > 0)
/*    */     {
/* 66 */       DescriptionGroupMetaData dg = ProcessorUtils.getDescriptionGroup(annotation.description());
/* 67 */       metaData.setDescriptionGroup(dg);
/*    */     }
/* 69 */     if (annotation.mappedName().length() > 0)
/* 70 */       metaData.setMappedName(annotation.mappedName());
/* 71 */     if (annotation.messageListenerInterface() != Object.class)
/* 72 */       metaData.setMessagingType(annotation.messageListenerInterface().getName());
/* 73 */     ActivationConfigProperty[] props = annotation.activationConfig();
/* 74 */     ActivationConfigMetaData config = new ActivationConfigMetaData();
/* 75 */     ActivationConfigPropertiesMetaData configProps = new ActivationConfigPropertiesMetaData();
/* 76 */     config.setActivationConfigProperties(configProps);
/* 77 */     for (ActivationConfigProperty prop : props)
/*    */     {
/* 79 */       ActivationConfigPropertyMetaData acp = new ActivationConfigPropertyMetaData();
/* 80 */       acp.setActivationConfigPropertyName(prop.propertyName());
/* 81 */       acp.setValue(prop.propertyValue());
/* 82 */       configProps.add(acp);
/*    */     }
/* 84 */     metaData.setActivationConfig(config);
/* 85 */     return metaData;
/*    */   }
View Full Code Here

                beanClassName = override(beanClassInfo.name().toString(), beanMetaData.getEjbClass());
                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 (final ActivationConfigPropertyMetaData propertyMetaData : propertiesMetaData) {
                                activationConfigProperties.put(propertyMetaData.getKey(), propertyMetaData.getValue());
                            }
                        }
                    }
                } else if (beanMetaData instanceof JBossGenericBeanMetaData) {
                    //TODO: fix the heirachy so this is not needed
                    final JBossGenericBeanMetaData mdb = (JBossGenericBeanMetaData) beanMetaData;
                    messagingType = mdb.getMessagingType();
                    final ActivationConfigMetaData activationConfigMetaData = mdb.getActivationConfig();
                    if (activationConfigMetaData != null) {
                        final ActivationConfigPropertiesMetaData propertiesMetaData = activationConfigMetaData.getActivationConfigProperties();
                        if (propertiesMetaData != null) {
                            for (final ActivationConfigPropertyMetaData propertyMetaData : propertiesMetaData) {
                                activationConfigProperties.put(propertyMetaData.getKey(), propertyMetaData.getValue());
View Full Code Here

TOP

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

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.