Package org.jboss.system.metadata

Examples of org.jboss.system.metadata.ServiceDependencyMetaData


     
   }
  
   public ServiceDependencyMetaData buildDependency(String dependencyName)
   {
      ServiceDependencyMetaData dependency = new ServiceDependencyMetaData();
      dependency.setIDependOn(dependencyName);
      return dependency;     
      
   }
View Full Code Here


      List<String> dependsNames = md.getDependsNames();
      List<ServiceDependencyMetaData> dependencies = new ArrayList<ServiceDependencyMetaData>();
     
      for (String string : dependsNames)
      {
         ServiceDependencyMetaData depends = buildDependency(string);
         dependencies.add(depends);        
      }
   
      return dependencies;
 
View Full Code Here

             Iterator<DependsMetaData> iter = depends.iterator();
             while(iter.hasNext())
             {
               DependsMetaData dmd = iter.next();
               String dependsObjectName = dmd.getDependsName();
               ServiceDependencyMetaData dependency = new ServiceDependencyMetaData();
                   dependency.setIDependOn(dependsObjectName);
                   System.out.println(unit.getSimpleName()+ "  have got the dependency on ---->>>>> "+dependsObjectName);
                   dependencies.add(dependency);
             }                
           }          
           rarDeployment.setDependencies(dependencies);
View Full Code Here

            if (log.isTraceEnabled())
               log.trace(name + " has dependencies: " + depends);

            for (String iDependOn : depends)
            {
               ServiceDependencyMetaData sdmd = new ServiceDependencyMetaData();
               sdmd.setIDependOn(iDependOn);
               dependencies.add(sdmd);
            }
         }
         webModule.setDependencies(dependencies);
View Full Code Here

         // Add a dependence into the parent JaccPolicy
         ServiceMetaData parentServiceMetaData = this.getParentJaccPolicyBean(unit);
         if (parentServiceMetaData != null)
         {
            ServiceDependencyMetaData serviceDependencyMetaData = new ServiceDependencyMetaData();
            serviceDependencyMetaData.setIDependOnObjectName(subjaccPolicy.getObjectName());
            parentServiceMetaData.addDependency(serviceDependencyMetaData);

            // Add an attribute in the parent service
            ServiceAttributeMetaData serviceAttributeMetaData = new ServiceAttributeMetaData();
            serviceAttributeMetaData.setName("PolicyConfigurationFacadeMBean");
View Full Code Here

      List<ServiceDependencyMetaData> dependencies = new ArrayList<ServiceDependencyMetaData>();
      // CCM for CachedConnectionInterceptor dependency
      // TODO: this should be injected directly to the interceptor
      if( ccmServiceName != null && ccmServiceName.length() > 0 )
      {
         ServiceDependencyMetaData ccm = new ServiceDependencyMetaData();
         ccm.setIDependOn(ccmServiceName);
         dependencies.add(ccm);
      }
      // Add dependencies on the invoker services in use
      JBossEnterpriseBeansMetaData beans = deployment.getEnterpriseBeans();
      Iterator<JBossEnterpriseBeanMetaData> beansIter = beans.iterator();
      HashSet<String> invokerNames = new HashSet<String>();
      HashSet<String> beanDepends = new HashSet<String>();
      // Process ContainerDependencyMetaData
      VFSDeploymentUnit topUnit = unit.getTopLevel();
      Map<String, ContainerDependencyMetaData> endpoints = (Map<String, ContainerDependencyMetaData>) topUnit.getAttachment(MappedReferenceMetaDataResolverDeployer.ENDPOINT_MAP_KEY);
      if(endpoints == null)
         log.warn(unit+" has no ContainerDependencyMetaData attachment");
      String vfsPath = unit.getRelativePath();
      ArrayList<BeanMetaData> mcBeanMD = new ArrayList<BeanMetaData>();
      while( beansIter.hasNext() )
      {
         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)
               throw new DeploymentException("Failed to locate invoker: "+iname);
            String invokerName = imd.getInvokerMBean();
            if( invokerName.equalsIgnoreCase("default") )
            {
               // TODO: JBAS-4306 hack to ingore the invalid default invoker-mbean
               continue;
            }
            if( invokerNames.contains(invokerName) == false )
            {
               invokerNames.add(invokerName);
               ServiceDependencyMetaData invoker = new ServiceDependencyMetaData();
               invoker.setIDependOn(invokerName);
               dependencies.add(invoker);
            }
         }

         // Create mc beans that declare the container ejb jndi name supplies
         if(endpoints != null)
         {
            String ejbKey = "ejb/" + vfsPath + "#" + bmd.getEjbName();
            ContainerDependencyMetaData cdmd = endpoints.get(ejbKey);
            if(cdmd != null)
            {
               // Create the metadata for the bean to install
               String mcname = ejbKey + ",uid"+System.identityHashCode(bmd);
               BeanMetaDataBuilder builder = BeanMetaDataBuilderFactory.createBuilder(mcname, Ejb2xMCContainer.class.getName());
               for(String jndiName : cdmd.getJndiNames())
               {
                  String supplyName = "jndi:" + jndiName;
                  builder.addSupply(supplyName);
               }

               BeanMetaData mcbmd = builder.getBeanMetaData();
               log.info("installing bean: " + mcname);
               log.info("  with dependencies:");
               log.info("  and supplies:");
               for(SupplyMetaData smd : mcbmd.getSupplies())
               {
                  log.info("\t" + smd.getSupply());
               }
               mcBeanMD.add(mcbmd);
            }
         }
      }

      // Add any declared dependencies
      /* TODO: this is too coarse as bean to bean depends are being pulled up to the module level
         and an ejb module cannot depend on the beans it creates. The ejb deployer needs to
         be refactored into a component based deployer.
      */
      try
      {
         for(String depend : beanDepends)
         {
            ObjectName n = new ObjectName(depend);
            ServiceDependencyMetaData sdmd = new ServiceDependencyMetaData();
            sdmd.setIDependOn(n.toString());
            dependencies.add(sdmd);        
         }
      }
      catch(MalformedObjectNameException e)
      {
View Full Code Here

/* 652 */       List dependencies = new ArrayList();
/* 653 */       if (depends != null)
/*     */       {
/* 655 */         for (String iDependOn : depends)
/*     */         {
/* 657 */           ServiceDependencyMetaData sdmd = new ServiceDependencyMetaData();
/* 658 */           sdmd.setIDependOn(iDependOn);
/*     */         }
/*     */       }
/* 661 */       webModule.setDependencies(dependencies);
/*     */
/* 665 */       unit.addAttachment(ServiceMetaData.class, webModule);
View Full Code Here

/*     */
/* 237 */     Collection depends = ds.getDepends();
/* 238 */     List dependencies = new ArrayList();
/* 239 */     for (String iDependOn : depends)
/*     */     {
/* 241 */       ServiceDependencyMetaData sdmd = new ServiceDependencyMetaData();
/* 242 */       sdmd.setIDependOn(iDependOn);
/*     */     }
/* 244 */     dsMbean.setDependencies(dependencies);
/* 245 */     return dsMbean;
/*     */   }
View Full Code Here

/*  92 */     List dependsNames = md.getDependsNames();
/*  93 */     List dependencies = new ArrayList();
/*     */
/*  95 */     for (String string : dependsNames)
/*     */     {
/*  97 */       ServiceDependencyMetaData depends = buildDependency(string);
/*  98 */       dependencies.add(depends);
/*     */     }
/*     */
/* 101 */     return dependencies;
/*     */   }
View Full Code Here

/*  93 */     return att;
/*     */   }
/*     */
/*     */   public ServiceDependencyMetaData buildDependency(String dependencyName)
/*     */   {
/*  99 */     ServiceDependencyMetaData dependency = new ServiceDependencyMetaData();
/* 100 */     dependency.setIDependOn(dependencyName);
/* 101 */     return dependency;
/*     */   }
View Full Code Here

TOP

Related Classes of org.jboss.system.metadata.ServiceDependencyMetaData

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.