Examples of MessageDestinationReferenceMetaData


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

         if(mrefs == null)
         {
            mrefs = new MessageDestinationReferencesMetaData();
            refs.setMessageDestinationReferences(mrefs);
         }
         MessageDestinationReferenceMetaData ref = createMessageRef(annotation, element);
         mrefs.add(ref);
         if(trace)
            log.trace("created message-destination-ref: "+ref);
      }
      else
View Full Code Here

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

      return ref;
   }
  
   protected MessageDestinationReferenceMetaData createMessageRef(Resource annotation, E element)
   {
      MessageDestinationReferenceMetaData ref = new MessageDestinationReferenceMetaData();
      String name = annotation.name();
      if(name.length() == 0)
         name = getName(element);
      ref.setMessageDestinationRefName(name);
      if(annotation.mappedName().length() > 0)
         ref.setMappedName(annotation.mappedName());
      if(annotation.type() != Object.class)
         ref.setType(annotation.type().getName());
      else
         ref.setType(getType(element));
      Descriptions descriptions = ProcessorUtils.getDescription(annotation.description());
      if(descriptions != null)
         ref.setDescriptions(descriptions);
      String injectionName = getInjectionName(element);
      Set<ResourceInjectionTargetMetaData> injectionTargets = ProcessorUtils.getInjectionTargets(injectionName, element);
      if(injectionTargets != null)
         ref.setInjectionTargets(injectionTargets);

      return ref;
   }
View Full Code Here

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

         if(mrefs == null)
         {
            mrefs = new MessageDestinationReferencesMetaData();
            refs.setMessageDestinationReferences(mrefs);
         }
         MessageDestinationReferenceMetaData ref = createMessageRef(annotation, element);
         mrefs.add(ref);
         if(trace)
            log.trace("created message-destination-ref: "+ref);
      }
      else
View Full Code Here

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

      return ref;
   }
  
   protected MessageDestinationReferenceMetaData createMessageRef(Resource annotation, E element)
   {
      MessageDestinationReferenceMetaData ref = new MessageDestinationReferenceMetaData();
      String name = annotation.name();
      if(name.length() == 0)
         name = getName(element);
      ref.setMessageDestinationRefName(name);
      if(annotation.mappedName().length() > 0)
         ref.setMappedName(annotation.mappedName());
      if(annotation.type() != Object.class)
         ref.setType(annotation.type().getName());
      else
         ref.setType(getType(element));
      Descriptions descriptions = ProcessorUtils.getDescription(annotation.description());
      if(descriptions != null)
         ref.setDescriptions(descriptions);
      String injectionName = getInjectionName(element);
      Set<ResourceInjectionTargetMetaData> injectionTargets = ProcessorUtils.getInjectionTargets(injectionName, element);
      if(injectionTargets != null)
         ref.setInjectionTargets(injectionTargets);

      return ref;
   }
View Full Code Here

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

                     mref.setMappedName(ref.getMappedName());
                  }
               }
               else if(msgRefs.containsKey(resRefName))
               {
                  MessageDestinationReferenceMetaData mref = msgRefs.get(resRefName);
                  mref.setMappedName(ref.getMappedName());                 
               }
               else
               {
                  throw new IllegalStateException("resource-env-ref " + resRefName + " found in jboss-client.xml but not in application-client.xml");
               }
View Full Code Here

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

            }
            if(msgRefs.contains(ref) == false)
               msgRefs.add(ref);
            else
            {
               MessageDestinationReferenceMetaData existingRef = msgRefs.get(ref.getMessageDestinationRefName());
               existingRef.merge(null, ref);
            }
         }

         // Merge the spec resource-env-refs
         if(resEnvRefs != null && specEnvRefs != null)
         for(ResourceEnvironmentReferenceMetaData ref : resEnvRefs)
         {
            String resRefName = ref.getResourceEnvRefName();
            ResourceEnvironmentReferenceMetaData specRef = specEnvRefs.get(resRefName);
            if (specRef == null)
            {
               // Try the resourceEnvReferenceLinks
               ArrayList<MessageDestinationReferenceMetaData> linkedRefs = resourceEnvReferenceLinks.get(resRefName);
               if (linkedRefs != null)
               {
                  for(MessageDestinationReferenceMetaData mref : linkedRefs)
                  {
                     // Need to make sure this is the ref in the map
                     MessageDestinationReferenceMetaData existingRef = msgRefs.get(mref.getMessageDestinationRefName());
                     if(existingRef.getIgnoreDependency() != null)
                        ref.setIgnoreDependency(mref.getIgnoreDependency());
                     if(existingRef.getType() != null)
                        ref.setType(mref.getType());
                     existingRef.setMappedName(ref.getMappedName());
                  }
               }
               else if(msgRefs.containsKey(resRefName))
               {
                  MessageDestinationReferenceMetaData mref = msgRefs.get(resRefName);
                  mref.setMappedName(ref.getMappedName());                 
               }
               else
               {
                  throw new IllegalStateException("resource-env-ref " + resRefName + " found in jboss-client.xml but not in application-client.xml");
               }
View Full Code Here

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

         if(mrefs == null)
         {
            mrefs = new MessageDestinationReferencesMetaData();
            refs.setMessageDestinationReferences(mrefs);
         }
         MessageDestinationReferenceMetaData ref = createMessageRef(annotation, element);
         addReference(mrefs, ref);
         if(trace)
            log.trace("created message-destination-ref: "+ref);
      }
      else
View Full Code Here

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

      return ref;
   }
  
   protected MessageDestinationReferenceMetaData createMessageRef(Resource annotation, E element)
   {
      MessageDestinationReferenceMetaData ref = new MessageDestinationReferenceMetaData();
      String name = annotation.name();
      if(name.length() == 0)
         name = getName(element);
      ref.setMessageDestinationRefName(name);
      if(annotation.mappedName().length() > 0)
         ref.setMappedName(annotation.mappedName());
      if(annotation.type() != Object.class)
         ref.setType(annotation.type().getName());
      else
         ref.setType(getType(element));
      Descriptions descriptions = ProcessorUtils.getDescription(annotation.description());
      if(descriptions != null)
         ref.setDescriptions(descriptions);
      String injectionName = getInjectionName(element);
      Set<ResourceInjectionTargetMetaData> injectionTargets = ProcessorUtils.getInjectionTargets(injectionName, element);
      if(injectionTargets != null)
         ref.setInjectionTargets(injectionTargets);

      return ref;
   }
View Full Code Here

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

      assertEquals("UnsecureRunAsServletWithPrincipalNameAndRolesTarget", local8.getLink());
      assertEquals(null, local8.getJndiName());

      // mdr/ConsumesLink
      assertEquals(3, jbossWeb.getMessageDestinationReferences().size());
      MessageDestinationReferenceMetaData mref1 = jbossWeb.getMessageDestinationReferenceByName("mdr/ConsumesLink");
      assertEquals("msgref1", mref1.getId());
      assertEquals("mdr/ConsumesLink", mref1.getMessageDestinationRefName());
      assertEquals("javax.jms.Queue", mref1.getType());
      assertEquals(MessageDestinationUsageType.Consumes, mref1.getMessageDestinationUsage());
      assertEquals("TestQueue", mref1.getLink());
      // mdr/ConsumesProducesJNDIName
      MessageDestinationReferenceMetaData mref3 = jbossWeb.getMessageDestinationReferenceByName("mdr/ConsumesProducesJNDIName");
      assertEquals("msgref3", mref3.getId());
      assertEquals("mdr/ConsumesProducesJNDIName", mref3.getMessageDestinationRefName());
      assertEquals("javax.jms.Queue", mref3.getType());
      assertEquals(MessageDestinationUsageType.ConsumesProduces, mref3.getMessageDestinationUsage());
      assertEquals(null, mref3.getLink());
      assertEquals("queue/A", mref3.getJndiName());
      assertEquals("queue/A", mref3.getMappedName());

      assertEquals(2, jbossWeb.getMessageDestinations().size());
      MessageDestinationMetaData msgdest1 = jbossWeb.getMessageDestination("TestQueue");
      assertEquals("msgdest1", msgdest1.getId());
      assertEquals("A TestQueue destination", msgdest1.getDescriptionGroup().getDescription());
View Full Code Here

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

         assertEquals("queue/mdbtest", resourceEnvRef.getJndiName());
      }
     
      {
         assertEquals(1, bean.getMessageDestinationReferences().size());
         MessageDestinationReferenceMetaData messageDestinationRef = bean.getMessageDestinationReferenceByName("messageDestinationRef");
         assertNotNull(messageDestinationRef);
         assertEquals("mappedName", messageDestinationRef.getMappedName());
      }
     
      SecurityIdentityMetaData securityIdentity = bean.getSecurityIdentity();
      assertNotNull(securityIdentity);
      RunAsMetaData runAs = securityIdentity.getRunAs();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.