Package org.jboss.classloader.spi

Examples of org.jboss.classloader.spi.Loader


         if (trace)
            log.trace(this + " not loading " + name + " from imports it has no delegates");
         return null;
      }

      Loader loader = info.getCachedLoader(name);
      if (loader != null)
      {
         if (trace)
            log.trace(this + " found in import cache " + name);
         return loader;
View Full Code Here


         name = unit.getName();

      ParentPolicyMetaData ppmd = deployment.getParentPolicy();
      ParentPolicy pp = (ppmd != null) ? ppmd.createParentPolicy() : ParentPolicy.BEFORE;

      Loader parent = null;
      String parentDomain = deployment.getParentDomain();
      LoaderMetaData lmd = deployment.getParent();
      if (parentDomain != null && lmd != null)
         throw new DeploymentException("Cannot define both: parent-domain and parent loader: " + deployment);
View Full Code Here

      {
         return false;
      }
     
      ClassLoaderDomain domain = domainRef.get();
      Loader parent = domain.getParent();
      URL parentURL = parent.getResource(resourceName);
     
      if (parentURL == null)
      {
         return true;
      }
View Full Code Here

         name = unit.getName();

      ParentPolicyMetaData ppmd = deployment.getParentPolicy();
      ParentPolicy pp = (ppmd != null) ? ppmd.createParentPolicy() : ParentPolicy.BEFORE;

      Loader parent = null;
      String parentDomain = deployment.getParentDomain();
      LoaderMetaData lmd = deployment.getParent();
      if (parentDomain != null && lmd != null)
         throw new DeploymentException("Cannot define both: parent-domain and parent loader: " + deployment);
View Full Code Here

         Class<?> clazz = loadClassBefore(name);
         if (clazz != null)
            return clazz;
      }
     
      Loader loader = findLoader(classLoader, path, allExports, findInParent);
      if (loader != null)
      {
         Thread thread = Thread.currentThread();
         ClassLoadingTask task = new ClassLoadingTask(name, classLoader, thread);
         ClassLoaderManager.scheduleTask(task, loader, false);
View Full Code Here

     
      if (getClassLoaderSystem() == null)
         throw new IllegalStateException("Domain is not registered with a classloader system: " + toLongString());
     
      // Try the before attempt (e.g. from the parent)
      Loader loader = null;
      if (findInParent)
         loader = findBeforeLoader(name);
      if (loader != null)
         return loader;
View Full Code Here

   private Loader findLoaderInExports(BaseClassLoader classLoader, String name, boolean trace)
   {
      ClassCacheItem item = globalClassCache.get(name);
      if (item != null)
      {
         Loader loader = item.loader;
         if (loader != null)
         {
            if (trace)
               log.trace(this + " found loader " + loader + " in global class cache " + name);
            return loader;
View Full Code Here

         if (trace)
            log.trace(this + " not loading " + name + " from imports it has no delegates");
         return null;
      }

      Loader loader = info.getCachedLoader(name);
      if (loader != null)
      {
         if (trace)
            log.trace(this + " found in import cache " + name);
         return loader;
View Full Code Here

         throw new IllegalArgumentException("Null parent");

      if (isValid() == false)
         throw new IllegalStateException("Module " + this + " is not registered, see previous error messages");

      Loader loader = new ClassLoaderToLoaderAdapter(parent);
      ClassLoader result = registerClassLoaderPolicy(system, loader);
      this.classLoader = result;
      registerModuleClassLoader(this, result);
      return result;
   }
View Full Code Here

         throw new IllegalStateException(this + " classLoader is not connected to a domain (probably undeployed?) for class " + getName());

      ClassLoaderUtils.checkClassName(className);
      String path = ClassLoaderUtils.classNameToPath(className);
     
      Loader loader = domain.findLoader(this, path, basePolicy.isImportAll(), true);
      if (loader == null)
         throw new ClassNotFoundException("Class " + className + " not found from " + this);
     
      // This is a bit ugly but we can't abstract this behind an interface because
      // that would make the methods public
View Full Code Here

TOP

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

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.