Package org.jboss.metadata.ejb.jboss

Examples of org.jboss.metadata.ejb.jboss.ContainerConfigurationMetaData


         JBossEnterpriseBeanMetaData bmd = beansIter.next();
         Set<String> depends = bmd.getDepends();
         if (depends != null)
            beanDepends.addAll(depends);
         String configName = bmd.getConfigurationName();
         ContainerConfigurationMetaData cmd = bmd.determineContainerConfiguration();
         Set<String> invokers = cmd.getInvokerProxyBindingNames();
         if(invokers != null)
         for(String iname : invokers)
         {
            InvokerProxyBindingMetaData imd = deployment.getInvokerProxyBinding(iname);
            if (imd == null)
View Full Code Here


    * @return the configuration
    * @throws IllegalStateException when the configuration could not be determined
    */
   public ConfigurationMetaData getContainerConfiguration()
   {
      ContainerConfigurationMetaData containerConfigurationMetaData = getDelegate().determineContainerConfiguration();
      return new ConfigurationMetaData(containerConfigurationMetaData);
   }
View Full Code Here

    * @return the configuration or null if not found
    * @throws IllegalArgumentException for a null name
    */
   public ConfigurationMetaData getConfigurationMetaDataByName(String name)
   {
      ContainerConfigurationMetaData delegate = getDelegate().getContainerConfiguration(name);
      if (delegate == null)
         return null;
      return new ConfigurationMetaData(delegate);
   }
View Full Code Here

      if(defaults == null)
         throw new IllegalStateException("defaults cannot be null");

      for(String key : defaults.keySet())
      {
         ContainerConfigurationMetaData md = defaults.get(key);

         // Allow the configuration to inherit from a standard
         // configuration. This is determined by looking for a
         // configuration matching the name given by the extends
         // attribute, or if extends was not specified, an
         // existing configuration with the same.
         ContainerConfigurationMetaData parent = null;
         String extendsName = md.getExtendsName();        
         if (extendsName != null)
         {
            // Look first for another non-default parent
            parent = merged.get(extendsName);
            if (parent == null)
               parent = defaults.get(extendsName);
            if (parent == null)
               throw new IllegalStateException("Failed to find parent configuration: "+extendsName+" among: "+defaults.keySet());
         }
         /* this probably doesn't make sense for defaults
            since it would mean that the defaults contained
            containers with the same names
         else
         {
            parent = merged.get(key);
         }
         */

         md = new ContainerConfigurationMetaDataWrapper(md, parent);
         merged.put(key, md);
      }

      if(primary != null)
      {
         for (String key : primary.keySet())
         {
            ContainerConfigurationMetaData md = primary.get(key);

            // Allow the configuration to inherit from a standard
            // configuration. This is determined by looking for a
            // configuration matching the name given by the extends
            // attribute, or if extends was not specified, an
            // existing configuration with the same.
            ContainerConfigurationMetaData parent = null;
           
            String extendsName = md.getExtendsName();
            if (extendsName != null)
            {
               parent = primary.get(extendsName);
View Full Code Here

      return merged.containsKey(key);
   }

   public ContainerConfigurationMetaData get(String key)
   {
      ContainerConfigurationMetaData ccmd = merged.get(key);
      return ccmd;
   }
View Full Code Here

    * @return the configuration or null if not found
    * @throws IllegalArgumentException for a null name
    */
   public ConfigurationMetaData getConfigurationMetaDataByName(String name)
   {
      ContainerConfigurationMetaData delegate = getDelegate().getContainerConfiguration(name);
      if (delegate == null)
         return null;
      return new ConfigurationMetaData(delegate);
   }
View Full Code Here

    * @return the configuration
    * @throws IllegalStateException when the configuration could not be determined
    */
   public ConfigurationMetaData getContainerConfiguration()
   {
      ContainerConfigurationMetaData containerConfigurationMetaData = getDelegate().determineContainerConfiguration();
      return new ConfigurationMetaData(containerConfigurationMetaData);
   }
View Full Code Here

         throw new IllegalStateException("defaults cannot be null");

      if(defaults != null)
      for(String key : defaults.keySet())
      {
         ContainerConfigurationMetaData md = defaults.get(key);
         String extendsName = md.getExtendsName();
         if (extendsName != null)
         {
            // Look first for another non-default parent
            ContainerConfigurationMetaData parent = merged.get(extendsName);
            if (parent == null)
               parent = defaults.get(extendsName);
            if (parent == null)
               throw new IllegalStateException("Failed to find parent configuration: "+extendsName+" among: "+defaults.keySet());
            ContainerConfigurationMetaDataWrapper wrapper = new ContainerConfigurationMetaDataWrapper(md, parent);
            md = wrapper;
         }
         else
            md = new ContainerConfigurationMetaDataWrapper(md, null);
         merged.put(key, md);
      }
      if(primary != null)
      for(String key : primary.keySet())
      {
         ContainerConfigurationMetaData md = primary.get(key);
         String extendsName = md.getExtendsName();
         if (extendsName != null)
         {
            ContainerConfigurationMetaData parent = primary.get(extendsName);
            if (parent == null)
               parent = merged.get(extendsName);
            if (parent == null)
               parent = defaults.get(extendsName);
            if (parent == null)
View Full Code Here

      return merged.containsKey(key);
   }

   public ContainerConfigurationMetaData get(String key)
   {
      ContainerConfigurationMetaData ccmd = merged.get(key);
      return ccmd;
   }
View Full Code Here

   public void testContainerConfigurations() throws Exception
   {
      JBoss50MetaData original = new JBoss50MetaData();
      ContainerConfigurationsMetaData ccs = new ContainerConfigurationsMetaData();
      original.setContainerConfigurations(ccs);
      ContainerConfigurationMetaData cc = new ContainerConfigurationMetaData();
      cc.setContainerName("original1");
      cc.setSecurityDomain("originalDomain1");
      ccs.add(cc);
      cc = new ContainerConfigurationMetaData();
      cc.setContainerName("override1");
      cc.setSecurityDomain("originalDomain2");
      ccs.add(cc);
     
      JBoss50MetaData override = new JBoss50MetaData();
      ccs = new ContainerConfigurationsMetaData();
      override.setContainerConfigurations(ccs);
      cc = new ContainerConfigurationMetaData();
      cc.setContainerName("override1");
      cc.setSecurityDomain("overrideDomain1");
      ccs.add(cc);
      cc = new ContainerConfigurationMetaData();
      cc.setContainerName("override2");
      cc.setSecurityDomain("overrideDomain2");
      ccs.add(cc);
     
      JBoss50MetaData merged = new JBoss50MetaData();
      merged.merge(override, original);
      ccs = merged.getContainerConfigurations();
      assertNotNull(ccs);
      assertEquals(3, ccs.size());
      cc = ccs.get("original1");
      assertNotNull(cc);
      assertEquals("originalDomain1", cc.getSecurityDomain());
      cc = ccs.get("override1");
      assertNotNull(cc);
      assertEquals("overrideDomain1", cc.getSecurityDomain());
      cc = ccs.get("override2");
      assertNotNull(cc);
      assertEquals("overrideDomain2", cc.getSecurityDomain());
   }
View Full Code Here

TOP

Related Classes of org.jboss.metadata.ejb.jboss.ContainerConfigurationMetaData

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.