Package org.jboss.classloading.spi.metadata

Examples of org.jboss.classloading.spi.metadata.ClassLoadingMetaData


      addOutput(ClassLoadingMetaData.class);
   }

   protected void internalDeploy(VFSDeploymentUnit unit, T deployment, Collection<VirtualFile> wbXml) throws DeploymentException
   {
      ClassLoadingMetaData classLoadingMetaData = unit.getAttachment(ClassLoadingMetaData.class);
      if (classLoadingMetaData != null)
         return;

      if (isClassLoadingMetadataPresent(deployment))
         return;

      if (isIsolated(unit, wbXml) == false)
         return;

      String domain = getJMXName(deployment, unit) + ",extension=LoaderRepository";
      classLoadingMetaData = new ClassLoadingMetaData();
      classLoadingMetaData.setName(unit.getName());
      classLoadingMetaData.setDomain(domain);
      classLoadingMetaData.setExportAll(ExportAll.NON_EMPTY);
      classLoadingMetaData.setImportAll(true);
      classLoadingMetaData.setVersion(Version.DEFAULT_VERSION);
      classLoadingMetaData.setJ2seClassLoadingCompliance(false);

      unit.addAttachment(ClassLoadingMetaData.class, classLoadingMetaData);
   }
View Full Code Here


      }

      // Create a classloading metadata
      // NOTE: Don't explicitly set the parentDomain otherwise it will create a top level classloader
      //       for subdeployments rather than a classloader hanging off the main deployment's classloader
      ClassLoadingMetaData classLoadingMetaData = new ClassLoadingMetaData();
      classLoadingMetaData.setName(unit.getName());
      classLoadingMetaData.setDomain(domainName);
      classLoadingMetaData.setExportAll(ExportAll.NON_EMPTY);
      classLoadingMetaData.setImportAll(true);
      classLoadingMetaData.setVersion(Version.DEFAULT_VERSION);
      classLoadingMetaData.setJ2seClassLoadingCompliance(j2seClassLoadingCompliance);
      if (filteredPackages != null)
      {
         ClassFilter filter = RecursivePackageClassFilter.createRecursivePackageClassFilterFromString(filteredPackages);
         classLoadingMetaData.setExcluded(filter);
      }
      unit.addAttachment(ClassLoadingMetaData.class, classLoadingMetaData);
   }
View Full Code Here

      setOutput(ClassLoadingMetaData.class);
   }

   public void deploy(DeploymentUnit unit, ManagedConnectionFactoryDeploymentGroup deployment) throws DeploymentException
   {
      ClassLoadingMetaData classLoadingMetaData = unit.getAttachment(ClassLoadingMetaData.class);
      if (classLoadingMetaData != null)
         return;
     
      LoaderRepositoryConfig loaderConfig = deployment.getLoaderRepositoryConfig();
      if (loaderConfig == null)
View Full Code Here

   }

   @Override
   public void deploy(DeploymentUnit unit, JBossAppMetaData metaData) throws DeploymentException
   {
      ClassLoadingMetaData classLoadingMetaData = unit.getAttachment(ClassLoadingMetaData.class);
      if (classLoadingMetaData != null)
         return;

      LoaderRepositoryMetaData lrmd = metaData.getLoaderRepository();
      if (lrmd != null && LoaderRepositoryMetaDataHelper.create(unit, lrmd) != null)
         return;

      // For isolated automatically create the classloader in a new domain
      if (isolated)
      {
         String domain = EARDeployment.getJMXName(metaData, unit) + ",extension=LoaderRepository";
         try
         {
            ObjectName canonical = ObjectName.getInstance(domain);
            domain = canonical.getCanonicalName();
         }
         catch (MalformedObjectNameException ignored)
         {
            // Not a JMX ObjectName???
         }
         classLoadingMetaData = new ClassLoadingMetaData();
         classLoadingMetaData.setName(unit.getName());
         classLoadingMetaData.setDomain(domain);
         classLoadingMetaData.setExportAll(ExportAll.NON_EMPTY);
         classLoadingMetaData.setImportAll(true);
         classLoadingMetaData.setVersion(Version.DEFAULT_VERSION);
         classLoadingMetaData.setJ2seClassLoadingCompliance(false);
         unit.addAttachment(ClassLoadingMetaData.class, classLoadingMetaData);
      }
   }
View Full Code Here

   }

   @Override
   public void deploy(DeploymentUnit unit, JBossMetaData metaData) throws DeploymentException
   {
      ClassLoadingMetaData classLoadingMetaData = unit.getAttachment(ClassLoadingMetaData.class);
      if (classLoadingMetaData != null)
         return;

      LoaderRepositoryMetaData lrmd = metaData.getLoaderRepository();
      if (lrmd != null)
View Full Code Here

      }

      // Create a classloading metadata
      // NOTE: Don't explicitly set the parentDomain otherwise it will create a top level classloader
      //       for subdeployments rather than a classloader hanging off the main deployment's classloader
      ClassLoadingMetaData classLoadingMetaData = new ClassLoadingMetaData();
      classLoadingMetaData.setName(unit.getName());
      classLoadingMetaData.setDomain(domainName);
      classLoadingMetaData.setExportAll(ExportAll.NON_EMPTY);
      classLoadingMetaData.setImportAll(true);
      classLoadingMetaData.setVersion(Version.DEFAULT_VERSION);
      classLoadingMetaData.setJ2seClassLoadingCompliance(j2seClassLoadingCompliance);
      ClassFilter filter = null;
      if (filteredPackages != null)
      {
         filter = RecursivePackageClassFilter.createRecursivePackageClassFilterFromString(filteredPackages);
         classLoadingMetaData.setExcluded(filter);
      }
      unit.addAttachment(ClassLoadingMetaData.class, classLoadingMetaData);
   }
View Full Code Here

   public static ClassLoadingMetaData create(DeploymentUnit unit, LoaderRepositoryMetaData loaderMetaData, boolean parentDelegation) throws DeploymentException
   {
      if (unit == null)
         throw new IllegalArgumentException("Null unit");
     
      ClassLoadingMetaData clmd = unit.getAttachment(ClassLoadingMetaData.class);
      if (clmd != null)
         return clmd;
     
      clmd = create(unit.getName(), loaderMetaData, parentDelegation);
      if (clmd != null)
View Full Code Here

      }
   }

   protected void assertClassLoading(boolean equals, DeploymentUnit unit)
   {
      ClassLoadingMetaData clmd = unit.getAttachment(ClassLoadingMetaData.class);
      assertNotNull(clmd);

      ClassLoadingMetaData classLoadingMetaData = new ClassLoadingMetaData();
      classLoadingMetaData.setName(unit.getName());
      classLoadingMetaData.setDomain(clmd.getDomain()); // hack, get domain from clmd
      classLoadingMetaData.setExportAll(ExportAll.NON_EMPTY);
      classLoadingMetaData.setImportAll(true);
      classLoadingMetaData.setVersion(Version.DEFAULT_VERSION);
      classLoadingMetaData.setJ2seClassLoadingCompliance(false);

      assertEquals(equals, clmd.equals(classLoadingMetaData));
   }
View Full Code Here

      }

      // Create a classloading metadata
      // NOTE: Don't explicitly set the parentDomain otherwise it will create a top level classloader
      //       for subdeployments rather than a classloader hanging off the main deployment's classloader
      ClassLoadingMetaData classLoadingMetaData = new ClassLoadingMetaData();
      classLoadingMetaData.setName(unit.getName());
      classLoadingMetaData.setDomain(domainName);
      classLoadingMetaData.setExportAll(ExportAll.NON_EMPTY);
      classLoadingMetaData.setImportAll(true);
      classLoadingMetaData.setVersion(Version.DEFAULT_VERSION);
      classLoadingMetaData.setJ2seClassLoadingCompliance(j2seClassLoadingCompliance);
      classLoadingMetaData.setExcludedPackages(filteredPackages);
      unit.addAttachment(ClassLoadingMetaData.class, classLoadingMetaData);
   }
View Full Code Here

      if (module instanceof ClassLoaderPolicyModule == false)
         throw new IllegalStateException("Module is not an instance of " + ClassLoaderPolicyModule.class.getName() + " actual=" + module.getClass().getName());
      ClassLoaderPolicyModule classLoaderPolicyModule = (ClassLoaderPolicyModule) module;

      boolean explicitTopLevel = false;
      ClassLoadingMetaData clmd = unit.getAttachment(ClassLoadingMetaData.class);
      if (clmd != null && clmd.isTopLevelClassLoader())
         explicitTopLevel = true;
     
      if (unit.isTopLevel() || module.getParentDomainName() != null || explicitTopLevel)
      {
         // Top level, just create the classloader
View Full Code Here

TOP

Related Classes of org.jboss.classloading.spi.metadata.ClassLoadingMetaData

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.