Examples of BaseClassLoader


Examples of org.eclipse.osgi.baseadaptor.loader.BaseClassLoader

   * @see BundleData#createClassLoader(ClassLoaderDelegate, BundleProtectionDomain, String[])
   */
  public BundleClassLoader createClassLoader(ClassLoaderDelegate delegate, BundleProtectionDomain domain, String[] bundleclasspath) {
    ClassLoadingHook[] hooks = adaptor.getHookRegistry().getClassLoadingHooks();
    ClassLoader parent = adaptor.getBundleClassLoaderParent();
    BaseClassLoader cl = null;
    for (int i = 0; i < hooks.length && cl == null; i++)
      cl = hooks[i].createClassLoader(parent, delegate, domain, this, bundleclasspath);
    if (cl == null)
      cl = new DefaultClassLoader(parent, delegate, domain, this, bundleclasspath);
    return cl;
View Full Code Here

Examples of org.eclipse.osgi.baseadaptor.loader.BaseClassLoader

  public Handler(BundleEntry bundleEntry, BaseAdaptor adaptor) {
    super(bundleEntry, adaptor);
  }

  protected BundleEntry findBundleEntry(URL url, AbstractBundle bundle) throws IOException {
    BaseClassLoader classloader = getBundleClassLoader(bundle);
    if (classloader == null)
      throw new FileNotFoundException(url.getPath());
    ClasspathManager cpManager = classloader.getClasspathManager();
    BundleEntry entry = cpManager.findLocalEntry(url.getPath(), url.getPort());
    if (entry == null)
      // this isn't strictly needed but is kept to maintain compatibility
      entry = cpManager.findLocalEntry(url.getPath());
    if (entry == null)
View Full Code Here

Examples of org.eclipse.osgi.baseadaptor.loader.BaseClassLoader

             */
            PermissionCollection emptyPermissionCollection = (new AllPermission()).newPermissionCollection();
            protectionDomain = new ProtectionDomain(null, emptyPermissionCollection);
        }

        BaseClassLoader classLoader;
        if (useURLClassLoader) {
            classLoader = new GeronimoClassLoader(this, parent, delegate, protectionDomain, data, classpath, bundle);
        } else {
            classLoader = new DefaultClassLoader(parent, delegate, protectionDomain, data, classpath);
        }
View Full Code Here

Examples of org.eclipse.osgi.baseadaptor.loader.BaseClassLoader

   * @see BundleData#createClassLoader(ClassLoaderDelegate, BundleProtectionDomain, String[])
   */
  public BundleClassLoader createClassLoader(ClassLoaderDelegate delegate, BundleProtectionDomain domain, String[] bundleclasspath) {
    ClassLoadingHook[] hooks = adaptor.getHookRegistry().getClassLoadingHooks();
    ClassLoader parent = adaptor.getBundleClassLoaderParent();
    BaseClassLoader cl = null;
    for (int i = 0; i < hooks.length && cl == null; i++)
      cl = hooks[i].createClassLoader(parent, delegate, domain, this, bundleclasspath);
    if (cl == null)
      cl = new DefaultClassLoader(parent, delegate, domain, this, bundleclasspath);
    return cl;
View Full Code Here

Examples of org.eclipse.osgi.baseadaptor.loader.BaseClassLoader

  public Handler(BundleEntry bundleEntry) {
    super(bundleEntry);
  }

  protected BundleEntry findBundleEntry(URL url, AbstractBundle bundle) throws IOException {
    BaseClassLoader classloader = getBundleClassLoader(bundle);
    if (classloader == null)
      throw new FileNotFoundException(url.getPath());
    ClasspathManager cpManager = classloader.getClasspathManager();
    int index = url.getPort();
    BundleEntry entry = null;
    if (index == 0) {
      entry = cpManager.findLocalEntry(url.getPath());
    } else {
View Full Code Here

Examples of org.eclipse.osgi.baseadaptor.loader.BaseClassLoader

   * @see BundleData#createClassLoader(ClassLoaderDelegate, BundleProtectionDomain, String[])
   */
  public BundleClassLoader createClassLoader(ClassLoaderDelegate delegate, BundleProtectionDomain domain, String[] bundleclasspath) {
    ClassLoadingHook[] hooks = adaptor.getHookRegistry().getClassLoadingHooks();
    ClassLoader parent = adaptor.getBundleClassLoaderParent();
    BaseClassLoader cl = null;
    for (int i = 0; i < hooks.length && cl == null; i++)
      cl = hooks[i].createClassLoader(parent, delegate, domain, this, bundleclasspath);
    if (cl == null)
      cl = new DefaultClassLoader(parent, delegate, domain, this, bundleclasspath);
    return cl;
View Full Code Here

Examples of org.eclipse.osgi.baseadaptor.loader.BaseClassLoader

             */
            PermissionCollection emptyPermissionCollection = (new AllPermission()).newPermissionCollection();
            protectionDomain = new ProtectionDomain(null, emptyPermissionCollection);
        }

        BaseClassLoader classLoader;
        if (useURLClassLoader) {
            classLoader = new GeronimoClassLoader(this, parent, delegate, protectionDomain, data, classpath, bundle);
        } else {
            classLoader = new DefaultClassLoader(parent, delegate, protectionDomain, data, classpath);
        }
View Full Code Here

Examples of org.jboss.classloader.spi.base.BaseClassLoader

         throw new IllegalStateException("No classloader for module " + this);
     
      if (classLoader instanceof BaseClassLoader == false)
         return super.getClassLoaderForClass(className);
     
      final BaseClassLoader bcl = (BaseClassLoader) classLoader;
      SecurityManager sm = System.getSecurityManager();
      if (sm != null)
      {
         try
         {
            return AccessController.doPrivileged(new PrivilegedExceptionAction<ClassLoader>()
            {
               public ClassLoader run() throws Exception
               {
                  return bcl.findClassLoader(className);
               }
            });
         }
         catch (PrivilegedActionException e)
         {
            Throwable t = e.getCause();
            if (t instanceof ClassNotFoundException)
               throw (ClassNotFoundException) t;
            if (t instanceof Error)
               throw (Error) t;
            if (t instanceof RuntimeException)
               throw (RuntimeException) t;
            throw new RuntimeException("Error during findClassLoader for " + className, e);
         }
      }
      return bcl.findClassLoader(className);
   }
View Full Code Here

Examples of org.jboss.classloader.spi.base.BaseClassLoader

         throw new IllegalStateException("No classloader for module " + this);

      if (classLoader instanceof BaseClassLoader == false)
         return super.getClassLoaderForClass(className);

      final BaseClassLoader bcl = (BaseClassLoader)classLoader;
      SecurityManager sm = System.getSecurityManager();
      if (sm != null)
      {
         try
         {
            return AccessController.doPrivileged(new PrivilegedExceptionAction<ClassLoader>()
            {
               public ClassLoader run() throws Exception
               {
                  return bcl.findClassLoader(className);
               }
            });
         }
         catch (PrivilegedActionException e)
         {
            Throwable t = e.getCause();
            if (t instanceof ClassNotFoundException)
               throw (ClassNotFoundException)t;
            if (t instanceof Error)
               throw (Error)t;
            if (t instanceof RuntimeException)
               throw (RuntimeException)t;
            throw new RuntimeException("Error during findClassLoader for " + className, e);
         }
      }
      return bcl.findClassLoader(className);
   }
View Full Code Here

Examples of org.jboss.classloader.spi.base.BaseClassLoader

         throw new IllegalStateException("No classloader for module " + this);
     
      if (classLoader instanceof BaseClassLoader == false)
         return super.getClassLoaderForClass(className);
     
      final BaseClassLoader bcl = (BaseClassLoader) classLoader;
      SecurityManager sm = System.getSecurityManager();
      if (sm != null)
      {
         try
         {
            return AccessController.doPrivileged(new PrivilegedExceptionAction<ClassLoader>()
            {
               public ClassLoader run() throws Exception
               {
                  return bcl.findClassLoader(className);
               }
            });
         }
         catch (PrivilegedActionException e)
         {
            Throwable t = e.getCause();
            if (t instanceof ClassNotFoundException)
               throw (ClassNotFoundException) t;
            if (t instanceof Error)
               throw (Error) t;
            if (t instanceof RuntimeException)
               throw (RuntimeException) t;
            throw new RuntimeException("Error during findClassLoader for " + className, e);
         }
      }
      return bcl.findClassLoader(className);
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.