Package org.jboss.classloader.spi

Examples of org.jboss.classloader.spi.ClassLoaderSystem


    */
   public Classpath create(ClassLoader classLoader)
   {
      Module module = SecurityActions.getModuleForClassLoader(classLoader);
      ClassLoaderDomain domain = null;
      ClassLoaderSystem cls = getSystem(); // intialize system
      // TODO -- why this check for a parent domain name?
      if (module != null && module.getDeterminedParentDomainName() != null)
      {
         domain = cls.getDomain(module.getDeterminedDomainName());
      }
      return getClasspath(domain);
   }
View Full Code Here


    * @return the classloader
    * @throws Exception for any error
    */
   private ClassLoader initBootLibraries() throws Exception
   {
      ClassLoaderSystem system = ClassLoaderSystem.getInstance();
      mbeanServer.registerMBean(system, new ObjectName("jboss.classloader:service=ClassLoaderSystem"));
     
      List<URL> list = getBootURLs();

      VirtualFile[] files = new VirtualFile[list.size()];
      for (int i = 0; i < list.size(); ++i)
      {
         URL url = list.get(i);
         files[i] = VFS.getChild(url);
      }
     
      VFSClassLoaderPolicy policy = new VFSClassLoaderPolicy(files);
      policy.setExportAll(ExportAll.NON_EMPTY);
      policy.setImportAll(true);
      ClassLoader classLoader = system.registerClassLoaderPolicy(policy);
      if (classLoader instanceof RealClassLoader)
         bootstrapUCLName = ((RealClassLoader) classLoader).getObjectName();
      return classLoader;
   }
View Full Code Here

  
   private static ScopedVFSClassLoaderDomain createDomain(DomainRegistry registry, ClassLoader loader, Module module, DeploymentUnit unit)
   {
      if (!module.getDeterminedDomainName().equals(ClassLoaderSystem.DEFAULT_DOMAIN_NAME))
      {
         ClassLoaderSystem system = ClassLoaderSystem.getInstance();
         String domainName = module.getDeterminedDomainName();
         ClassLoaderDomain domain = system.getDomain(domainName);
  
         boolean parentDelegation = module.isJ2seClassLoadingCompliance();
         String name = String.valueOf(System.identityHashCode(loader));
        
         ScopedVFSClassLoaderDomain parentDomain = unit.isTopLevel() ? null : getDomain(registry, unit.getParent());
View Full Code Here

      {
         Module module = registry.getModule(cl);
         if (module != null && module.getDeterminedParentDomainName() != null)
         {
            //It is scoped
            ClassLoaderSystem sys = ClassLoaderSystem.getInstance();
            ClassLoaderDomain domain = sys.getDomain(module.getDeterminedDomainName());
            boolean parentFirst = module.isJ2seClassLoadingCompliance();
            ClassPool parentDomainPool = getParentUnitClassPool(cl);
            pool = new ScopedJBoss5ClassPool(cl, parent, parentDomainPool, repository, getTempURL(module), parentFirst, domain);
         }
         else
View Full Code Here

   {
      if (loader == parentUnitLoader)
      {
         throw new IllegalArgumentException("initMapsForLoader() should only be called if parentUnitLoader is different from loader");
      }
      ClassLoaderSystem system = ClassLoaderSystem.getInstance();
     
      String domainName = module.getDeterminedDomainName();
      ClassLoaderDomain clDomain = system.getDomain(domainName);
      boolean ret = false;
      if (!classLoaderDomainsByLoader.containsKey(loader))
      {
         Integer count = classLoaderDomainReferenceCounts.get(clDomain);
         int cnt = count == null ? 0 : count.intValue();
View Full Code Here

   {
      if (loader == parentUnitLoader)
      {
         throw new IllegalArgumentException("initMapsForLoader() should only be called if parentUnitLoader is different from loader");
      }
      ClassLoaderSystem system = ClassLoaderSystem.getInstance();
     
      String domainName = module.getDeterminedDomainName();
      ClassLoaderDomain clDomain = system.getDomain(domainName);
      boolean ret = false;
      if (!classLoaderDomainsByLoader.containsKey(loader))
      {
         Integer count = classLoaderDomainReferenceCounts.get(clDomain);
         int cnt = count == null ? 0 : count.intValue();
View Full Code Here

   }

   private synchronized ClassPoolDomain getDomain(Module module, ClassLoader cl)
   {
      ClassLoaderDomain domain = null;
      ClassLoaderSystem sys = registry.getSystem();
      if (module != null && module.getDeterminedParentDomainName() != null)
      {
         //It is scoped
         domain = sys.getDomain(module.getDeterminedDomainName());
      }
     
      if (domain == null)
      {
         domain = registry.getDefaultDomain();
      }
     
      ClassPoolDomain poolDomain = ClassPoolDomainRegistry.getInstance().getDomain(domain);
      if (poolDomain == null)
      {
         String parentDomainName = domain.getParentDomainName();
         ClassPoolDomain parentPoolDomain = null;
         if (parentDomainName != null)
         {
            ClassLoaderDomain parentDomain = sys.getDomain(parentDomainName);
            if (parentDomain == null)
            {
               throw new RuntimeException("No domain found called: " + parentDomainName);
            }
            parentPoolDomain = ClassPoolDomainRegistry.getInstance().getDomain(parentDomain);
View Full Code Here

  
   private static ScopedVFSClassLoaderDomain createDomain(DomainRegistry registry, ClassLoader loader, Module module, DeploymentUnit unit)
   {
      if (!module.getDeterminedDomainName().equals(ClassLoaderSystem.DEFAULT_DOMAIN_NAME))
      {
         ClassLoaderSystem system = registry.getSystem();
         String domainName = module.getDeterminedDomainName();
         ClassLoaderDomain domain = system.getDomain(domainName);
  
         boolean parentDelegation = module.isJ2seClassLoadingCompliance();
         String name = String.valueOf(System.identityHashCode(loader));
        
         ScopedVFSClassLoaderDomain parentDomain = unit.isTopLevel() ? null : getDomain(registry, unit.getParent());
View Full Code Here

      {
         Module module = registry.getModule(cl);
         if (module != null && module.getDeterminedParentDomainName() != null)
         {
            //It is scoped
            ClassLoaderSystem sys = registry.getSystem();
            ClassLoaderDomain domain = sys.getDomain(module.getDeterminedDomainName());
            boolean parentFirst = module.isJ2seClassLoadingCompliance();
            ClassPool parentDomainPool = getParentUnitClassPool(cl);
            pool = new ScopedJBoss5ClassPool(cl, parent, parentDomainPool, repository, getTempURL(module), parentFirst, domain);
         }
         else
View Full Code Here

   {
      if (loader == parentUnitLoader)
      {
         throw new IllegalArgumentException("initMapsForLoader() should only be called if parentUnitLoader is different from loader");
      }
      ClassLoaderSystem system = getSystem();
     
      String domainName = module.getDeterminedDomainName();
      ClassLoaderDomain clDomain = system.getDomain(domainName);
      boolean ret = false;
      if (!classLoaderDomainsByLoader.containsKey(loader))
      {
         Integer count = classLoaderDomainReferenceCounts.get(clDomain);
         int cnt = count == null ? 0 : count.intValue();
View Full Code Here

TOP

Related Classes of org.jboss.classloader.spi.ClassLoaderSystem

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.