Package org.jboss.metadata.javaee.spec

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


         String link = ref.getLink();
         if (link != null)
         {
            if (jndiName == null)
            {
               MessageDestinationMetaData messageDestination = EjbUtil50.findMessageDestination(mainDeployer, unit, link);
               if (messageDestination == null)
                  throw new NamingException("message-destination-ref '" + refName + "' message-destination-link '" + link
                        + "' not found and no jndi-name in jboss-web.xml");
               else
               {
                  String linkJNDIName = messageDestination.getJndiName();
                  if (linkJNDIName == null)
                     log.warn("message-destination '" + link + "' has no jndi-name in jboss-web.xml");
                  else
                     jndiName = linkJNDIName;
               }
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

      // TODO Auto-generated constructor stub
   }

   private String getMessageDestinationJNDIName(String name)
   {
      MessageDestinationMetaData dest = messageDestinations.get(name);
      if(dest != null)
         return dest.getJndiName();
      return null;
   }
View Full Code Here

      // TODO Auto-generated constructor stub
   }

   private String getMessageDestinationJNDIName(String name)
   {
      MessageDestinationMetaData dest = messageDestinations.get(name);
      if(dest != null)
         return dest.getJndiName();
      return null;
   }
View Full Code Here

{
   private static String findMessageDestination(DeploymentUnit deploymentUnit, MessageDestinationsMetaData destinations, String name)
   {
      if(destinations == null)
         return null;
      MessageDestinationMetaData destination = destinations.get(name);
      if(destination != null)
      {
         String jndiName = destination.getMappedName();
         if(jndiName != null)
            return jndiName;
         else
            throw new IllegalStateException("Message destination " + name + " in " + deploymentUnit + " does not define a mapped name");
      }
View Full Code Here

      // Search current DeploymentUnit
      if (unit.getAttachment(JBossMetaData.class) != null)
      {
         JBossMetaData appMD = unit.getAttachment(JBossMetaData.class);
         MessageDestinationMetaData mdMD = appMD.getAssemblyDescriptor().getMessageDestination(link);
         if (mdMD != null)
            return mdMD;
      }
      if (unit.getAttachment(JBossWebMetaData.class) != null)
      {
         JBossWebMetaData webMD = unit.getAttachment(JBossWebMetaData.class);
         return webMD.getMessageDestination(link);
      }

      // Search each subcontext
      Iterator<DeploymentUnit> it = unit.getChildren().iterator();
      while (it.hasNext())
      {
         DeploymentUnit child = it.next();
         MessageDestinationMetaData mdMD = resolveAbsoluteMessageDestination(child, link);
         if (mdMD != null)
            return mdMD;
      }

      // Not found
View Full Code Here

            if (properties.containsKey("destination"))
               log.warn("Ignoring message-destination-link '" + link + "' when the destination " +
                  "is already in the activation-config.");
            else
            {
               MessageDestinationMetaData destinationMetaData = container.getMessageDestination(link);
               if (destinationMetaData == null)
                  throw new DeploymentException("Unresolved message-destination-link '" + link + "' no message-destination in ejb-jar.xml");
               String jndiName = destinationMetaData.getJndiName();
               if (jndiName == null)
                  throw new DeploymentException("The message-destination '" + link + "' has no jndi-name in jboss.xml");
               org.jboss.metadata.ejb.spec.ActivationConfigPropertyMetaData acpmd = new
               org.jboss.metadata.ejb.spec.ActivationConfigPropertyMetaData();
               acpmd.setActivationConfigPropertyName("destination");
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

/* 608 */       String link = ref.getLink();
/* 609 */       if (link != null)
/*     */       {
/* 611 */         if (jndiName == null)
/*     */         {
/* 613 */           MessageDestinationMetaData messageDestination = EjbUtil50.findMessageDestination(this.mainDeployer, unit, link);
/* 614 */           if (messageDestination == null) {
/* 615 */             throw new NamingException("message-destination-ref '" + refName + "' message-destination-link '" + link + "' not found and no jndi-name in jboss-web.xml");
/*     */           }
/*     */
/* 619 */           String linkJNDIName = messageDestination.getJndiName();
/* 620 */           if (linkJNDIName == null)
/* 621 */             this.log.warn("message-destination '" + link + "' has no jndi-name in jboss-web.xml");
/*     */           else
/* 623 */             jndiName = linkJNDIName;
/*     */         }
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.