Package org.jboss.deployers.structure.spi.classloading

Examples of org.jboss.deployers.structure.spi.classloading.ClassLoaderMetaData


   public void addDeploymentUnit(DeploymentUnit deploymentUnit)
   {
      if (deploymentUnit == null)
         throw new IllegalArgumentException("Null deployment unit");
     
      ClassLoaderMetaData metadata = deploymentUnit.getAttachment(ClassLoaderMetaData.class);
      if (metadata == null)
      {
         // REVIEW: There should probably be a warning here?
         metadata = new ClassLoaderMetaData();
         metadata.setName(deploymentUnit.getName());
         metadata.setExportAll(ExportAll.NON_EMPTY);
         metadata.setImportAll(true);
         metadata.setVersion(Version.DEFAULT_VERSION);
         deploymentUnit.addAttachment(ClassLoaderMetaData.class, metadata);
      }
     
      String domainName = metadata.getDomain();
      if (domainName == null)
      {
         domainName = ClassLoaderSystem.DEFAULT_DOMAIN_NAME;
         metadata.setDomain(domainName);
      }
     
      Domain domain;
      synchronized (domains)
      {
View Full Code Here


   protected Object resolve(Controller controller, Module module, Requirement requirement)
   {
      // TODO JBMICROCONT-182 - do this properly
      for (Module other : units.values())
      {
         ClassLoaderMetaData metadata = other.getMetadata();
         List<Capability> capabilities = metadata.getCapabilities();
         if (capabilities != null)
         {
            for (Capability capability : capabilities)
            {
               if (capability.resolves(module.getDeploymentUnit(), requirement))
View Full Code Here

/*     */   public void addDeploymentUnit(DeploymentUnit deploymentUnit)
/*     */   {
/*  52 */     if (deploymentUnit == null) {
/*  53 */       throw new IllegalArgumentException("Null deployment unit");
/*     */     }
/*  55 */     ClassLoaderMetaData metadata = (ClassLoaderMetaData)deploymentUnit.getAttachment(ClassLoaderMetaData.class);
/*  56 */     if (metadata == null)
/*     */     {
/*  59 */       metadata = new ClassLoaderMetaData();
/*  60 */       metadata.setName(deploymentUnit.getName());
/*  61 */       metadata.setExportAll(ExportAll.NON_EMPTY);
/*  62 */       metadata.setImportAll(true);
/*  63 */       metadata.setVersion(Version.DEFAULT_VERSION);
/*  64 */       deploymentUnit.addAttachment(ClassLoaderMetaData.class, metadata);
/*     */     }
/*     */
/*  67 */     String domainName = metadata.getDomain();
/*  68 */     if (domainName == null)
/*     */     {
/*  70 */       domainName = "<DEFAULT>";
/*  71 */       metadata.setDomain(domainName);
/*     */     }
/*     */     Domain domain;
/*  75 */     synchronized (this.domains)
/*     */     {
/*  77 */       domain = (Domain)this.domains.get(domainName);
View Full Code Here

/*     */
/*     */   protected Object resolve(Controller controller, Module module, Requirement requirement)
/*     */   {
/* 114 */     for (Iterator i$ = this.units.values().iterator(); i$.hasNext(); ) { other = (Module)i$.next();
/*     */
/* 116 */       ClassLoaderMetaData metadata = other.getMetadata();
/* 117 */       List capabilities = metadata.getCapabilities();
/* 118 */       if (capabilities != null)
/*     */       {
/* 120 */         for (Capability capability : capabilities)
/*     */         {
/* 122 */           if (capability.resolves(module.getDeploymentUnit(), requirement))
View Full Code Here

/*  76 */       if (name != null)
/*     */       {
/*  78 */         String domain = name.getCanonicalName().trim();
/*  79 */         if (domain.length() != 0)
/*     */         {
/*  81 */           ClassLoaderMetaData metaData = new ClassLoaderMetaData();
/*  82 */           metaData.setName(unit.getName());
/*  83 */           metaData.setDomain(domain);
/*  84 */           metaData.setExportAll(ExportAll.NON_EMPTY);
/*  85 */           metaData.setImportAll(true);
/*  86 */           metaData.setVersion(Version.DEFAULT_VERSION);
/*     */
/*  88 */           Properties props = new Properties();
/*  89 */           String config = loaderConfig.repositoryConfig;
/*     */           try
/*     */           {
/*  92 */             if (config != null)
/*     */             {
/*  94 */               ByteArrayInputStream bais = new ByteArrayInputStream(config.getBytes());
/*  95 */               props.load(bais);
/*     */             }
/*     */           }
/*     */           catch (Exception e)
/*     */           {
/* 100 */             throw DeploymentException.rethrowAsDeploymentException("Error parsing repository config " + config, e);
/*     */           }
/* 102 */           String java2ParentDelegation = props.getProperty("java2ParentDelegation");
/* 103 */           if (java2ParentDelegation == null)
/*     */           {
/* 106 */             java2ParentDelegation = props.getProperty("java2ParentDelegaton", "false");
/*     */           }
/* 108 */           boolean useParentFirst = Boolean.valueOf(java2ParentDelegation).booleanValue();
/* 109 */           metaData.setJ2seClassLoadingCompliance(useParentFirst);
/*     */
/* 111 */           unit.addAttachment(ClassLoaderMetaData.class, metaData);
/*     */         }
/*     */       }
/*     */     }
View Full Code Here

TOP

Related Classes of org.jboss.deployers.structure.spi.classloading.ClassLoaderMetaData

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.