Package org.jboss.metadata.javaee.spec

Examples of org.jboss.metadata.javaee.spec.MessageDestinationMetaData


/* 1853 */       if ((ref.getMappedName() == null) || (ref.getMappedName().equals("")))
/*      */       {
/* 1855 */         JBossAssemblyDescriptorMetaData descriptor = this.dd.getAssemblyDescriptor();
/* 1856 */         if (descriptor != null)
/*      */         {
/* 1858 */           MessageDestinationMetaData destination = descriptor.getMessageDestination(ref.getLink());
/* 1859 */           if (destination != null)
/*      */           {
/* 1861 */             ref.setMappedName(destination.getJndiName());
/*      */           }
/*      */         }
/*      */       }
/*      */     }
/*      */   }
View Full Code Here


/* 410 */         if (this.properties.containsKey("destination")) {
/* 411 */           this.log.warn("Ignoring message-destination-link '" + link + "' when the destination " + "is already in the activation-config.");
/*     */         }
/*     */         else
/*     */         {
/* 415 */           MessageDestinationMetaData destinationMetaData = this.container.getMessageDestination(link);
/* 416 */           if (destinationMetaData == null)
/* 417 */             throw new DeploymentException("Unresolved message-destination-link '" + link + "' no message-destination in ejb-jar.xml");
/* 418 */           String jndiName = destinationMetaData.getJndiName();
/* 419 */           if (jndiName == null)
/* 420 */             throw new DeploymentException("The message-destination '" + link + "' has no jndi-name in jboss.xml");
/* 421 */           org.jboss.metadata.ejb.spec.ActivationConfigPropertyMetaData acpmd = new org.jboss.metadata.ejb.spec.ActivationConfigPropertyMetaData();
/*     */
/* 423 */           acpmd.setActivationConfigPropertyName("destination");
View Full Code Here

/* 1403 */       String link = ref.getLink();
/* 1404 */       if (link != null)
/*      */       {
/* 1406 */         if (jndiName == null)
/*      */         {
/* 1408 */           MessageDestinationMetaData messageDestination = getMessageDestination(link);
/* 1409 */           if (messageDestination == null) {
/* 1410 */             throw new DeploymentException("message-destination-ref '" + refName + "' message-destination-link '" + link + "' not found and no jndi-name in jboss.xml");
/*      */           }
/*      */
/* 1414 */           String linkJNDIName = messageDestination.getJndiName();
/* 1415 */           if (linkJNDIName == null)
/* 1416 */             this.log.warn("message-destination '" + link + "' has no jndi-name in jboss.xml");
/*      */           else
/* 1418 */             jndiName = linkJNDIName;
/*      */         }
View Full Code Here

/*     */     }
/*     */   }
/*     */
/*     */   private String getMessageDestinationJNDIName(String name)
/*     */   {
/*  62 */     MessageDestinationMetaData dest = (MessageDestinationMetaData)this.messageDestinations.get(name);
/*  63 */     if (dest != null)
/*  64 */       return dest.getJndiName();
/*  65 */     return null;
/*     */   }
View Full Code Here

/*     */     }
/*     */
/* 526 */     if (unit.getAttachment(JBossMetaData.class) != null)
/*     */     {
/* 528 */       JBossMetaData appMD = (JBossMetaData)unit.getAttachment(JBossMetaData.class);
/* 529 */       MessageDestinationMetaData mdMD = appMD.getAssemblyDescriptor().getMessageDestination(link);
/* 530 */       if (mdMD != null)
/* 531 */         return mdMD;
/*     */     }
/* 533 */     if (unit.getAttachment(JBossWebMetaData.class) != null)
/*     */     {
/* 535 */       JBossWebMetaData webMD = (JBossWebMetaData)unit.getAttachment(JBossWebMetaData.class);
/* 536 */       return webMD.getMessageDestination(link);
/*     */     }
/*     */
/* 540 */     Iterator it = unit.getChildren().iterator();
/* 541 */     while (it.hasNext())
/*     */     {
/* 543 */       DeploymentUnit child = (DeploymentUnit)it.next();
/* 544 */       MessageDestinationMetaData mdMD = resolveAbsoluteMessageDestination(child, link);
/* 545 */       if (mdMD != null) {
/* 546 */         return mdMD;
/*     */       }
/*     */     }
/*     */
View Full Code Here

/*     */     }
/*     */
/* 406 */     if (unit.getAttachment(JBossMetaData.class) != null)
/*     */     {
/* 408 */       JBossMetaData appMD = (JBossMetaData)unit.getAttachment(JBossMetaData.class);
/* 409 */       MessageDestinationMetaData mdMD = appMD.getAssemblyDescriptor().getMessageDestination(link);
/* 410 */       if (mdMD != null)
/* 411 */         return mdMD;
/*     */     }
/* 413 */     if (unit.getAttachment(JBossWebMetaData.class) != null)
/*     */     {
/* 415 */       JBossWebMetaData webMD = (JBossWebMetaData)unit.getAttachment(JBossWebMetaData.class);
/* 416 */       return webMD.getMessageDestination(link);
/*     */     }
/*     */
/* 420 */     Iterator it = unit.getChildren().iterator();
/* 421 */     while (it.hasNext())
/*     */     {
/* 423 */       DeploymentUnit child = (DeploymentUnit)it.next();
/* 424 */       MessageDestinationMetaData mdMD = resolveAbsoluteMessageDestination(child, link);
/* 425 */       if (mdMD != null) {
/* 426 */         return mdMD;
/*     */       }
/*     */     }
/*     */
View Full Code Here

         if (ref.getMappedName() == null || ref.getMappedName().equals(""))
         {
            JBossAssemblyDescriptorMetaData descriptor = dd.getAssemblyDescriptor();
            if (descriptor != null)
            {
               MessageDestinationMetaData destination = descriptor.getMessageDestination(ref.getLink());
               if (destination != null)
               {
                  ref.setMappedName(destination.getJndiName());
               }
            }
         }
      }
   }
View Full Code Here

         if (ref.getMappedName() == null || ref.getMappedName().equals(""))
         {
            JBossAssemblyDescriptorMetaData descriptor = dd.getAssemblyDescriptor();
            if (descriptor != null)
            {
               MessageDestinationMetaData destination = descriptor.getMessageDestination(ref.getLink());
               if (destination != null)
               {
                  ref.setMappedName(destination.getJndiName());
               }
            }
         }
      }
   }
View Full Code Here

         if (ref.getMappedName() == null || ref.getMappedName().equals(""))
         {
            JBossAssemblyDescriptorMetaData descriptor = dd.getAssemblyDescriptor();
            if (descriptor != null)
            {
               MessageDestinationMetaData destination = descriptor.getMessageDestination(ref.getLink());
               if (destination != null)
               {
                  ref.setMappedName(destination.getJndiName());
               }
            }
         }
      }
   }
View Full Code Here

* @author Remy Maucherat
*/
public class MessageDestinationMetaDataParser extends MetaDataElementParser {

    public static MessageDestinationMetaData parse(XMLStreamReader reader) throws XMLStreamException {
        MessageDestinationMetaData messageDestination = new MessageDestinationMetaData();

        // Handle attributes
        final int count = reader.getAttributeCount();
        for (int i = 0; i < count; i ++) {
            final String value = reader.getAttributeValue(i);
            if (reader.getAttributeNamespace(i) != null) {
                continue;
            }
            final Attribute attribute = Attribute.forName(reader.getAttributeLocalName(i));
            switch (attribute) {
                case ID: {
                    messageDestination.setId(value);
                    break;
                }
                default: throw unexpectedAttribute(reader, i);
            }
        }

        DescriptionGroupMetaData descriptionGroup = new DescriptionGroupMetaData();
        // Handle elements
        while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
            if (DescriptionGroupMetaDataParser.parse(reader, descriptionGroup)) {
                if (messageDestination.getDescriptionGroup() == null) {
                    messageDestination.setDescriptionGroup(descriptionGroup);
                }
                continue;
            }
            final Element element = Element.forName(reader.getLocalName());
            switch (element) {
                case MESSAGE_DESTINATION_NAME:
                    messageDestination.setMessageDestinationName(reader.getElementText());
                    break;
                case JNDI_NAME:
                    messageDestination.setJndiName(reader.getElementText());
                    break;
                case MAPPED_NAME:
                    messageDestination.setMappedName(reader.getElementText());
                    break;
                case LOOKUP_NAME:
                    messageDestination.setLookupName(reader.getElementText());
                    break;
                default: throw unexpectedElement(reader);
            }
        }

View Full Code Here

TOP

Related Classes of org.jboss.metadata.javaee.spec.MessageDestinationMetaData

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.