Package org.jboss.mx.loading

Examples of org.jboss.mx.loading.HeirarchicalLoaderRepository3$NoParentClassLoader


    */
   public void testSystemClasses() throws Exception
   {
      log.info("+++ Begin testSystemClasses");
      UnifiedLoaderRepository3 parent = new UnifiedLoaderRepository3();
      HeirarchicalLoaderRepository3 repository0 = new HeirarchicalLoaderRepository3(parent);
      URL j0URL = getDeployURL("tests-dummy.jar");
      RepositoryClassLoader ucl0 = repository0.newClassLoader(j0URL, true);

      Class c0 = ucl0.loadClass("java.sql.SQLException");
      StringBuffer info = new StringBuffer();
      ClassLoaderUtils.displayClassInfo(c0, info);
      log.info("Loaded c0: "+info);

      HeirarchicalLoaderRepository3 repository1 = new HeirarchicalLoaderRepository3(parent);
      repository1.setUseParentFirst(false);
      RepositoryClassLoader ucl1 = repository1.newClassLoader(j0URL, true);     
      Class c1 = ucl1.loadClass("java.sql.SQLException");
      info.setLength(0);
      ClassLoaderUtils.displayClassInfo(c1, info);
      log.info("Loaded c1: "+info);

View Full Code Here


    */
   public void testSystemClasses2() throws Exception
   {
      log.info("+++ Begin testSystemClasses2");
      UnifiedLoaderRepository3 parent = new UnifiedLoaderRepository3();
      HeirarchicalLoaderRepository3 repository0 = new HeirarchicalLoaderRepository3(parent);
      URL j0URL = getDeployURL("java-sql.jar");
      RepositoryClassLoader ucl0 = repository0.newClassLoader(j0URL, true);

      Class c0 = ucl0.loadClass("java.sql.SQLException");
      StringBuffer info = new StringBuffer();
      ClassLoaderUtils.displayClassInfo(c0, info);
      log.info("Loaded c0: "+info);

      HeirarchicalLoaderRepository3 repository1 = new HeirarchicalLoaderRepository3(parent);
      repository1.setUseParentFirst(false);
      RepositoryClassLoader ucl1 = repository1.newClassLoader(j0URL, true);     
      Class c1 = ucl1.loadClass("java.sql.SQLException");
      info.setLength(0);
      ClassLoaderUtils.displayClassInfo(c1, info);
      log.info("Loaded c1: "+info);

View Full Code Here

   private Domain getScopedClassLoaderDomain(ClassLoader cl, AspectManager parent)
   {
      boolean parentDelegation = true;
      if (cl instanceof RepositoryClassLoader)
      {
         HeirarchicalLoaderRepository3 repository = (HeirarchicalLoaderRepository3)((RepositoryClassLoader)cl).getLoaderRepository();
         parentDelegation = repository.getUseParentFirst();
      }
      String name = String.valueOf(System.identityHashCode(cl));
      return new ScopedRepositoryClassLoaderDomain(cl, name, parentDelegation, parent, false);
   }
View Full Code Here

      return null;
   }

   private URL getResourceUrlForClass(String resourcename)
   {
      HeirarchicalLoaderRepository3 repo = getRepository();
      return repo.getResource(resourcename, super.getClassLoader());
   }
View Full Code Here

      return repo.getResource(resourcename, super.getClassLoader());
   }
  
   private boolean isMine(URL url)
   {
      HeirarchicalLoaderRepository3 repo = getRepository();
      if (repo != null)
      {
         //The URL of the class loaded with my scoped classloader
         if (url != null)
         {
View Full Code Here

    */
   public void testSystemClasses() throws Exception
   {
      log.info("+++ Begin testSystemClasses");
      UnifiedLoaderRepository3 parent = new UnifiedLoaderRepository3();
      HeirarchicalLoaderRepository3 repository0 = new HeirarchicalLoaderRepository3(parent);
      URL j0URL = getDeployURL("tests-dummy.jar");
      RepositoryClassLoader ucl0 = repository0.newClassLoader(j0URL, true);

      Class c0 = ucl0.loadClass("java.sql.SQLException");
      StringBuffer info = new StringBuffer();
      ClassLoaderUtils.displayClassInfo(c0, info);
      log.info("Loaded c0: "+info);

      HeirarchicalLoaderRepository3 repository1 = new HeirarchicalLoaderRepository3(parent);
      repository1.setUseParentFirst(false);
      RepositoryClassLoader ucl1 = repository1.newClassLoader(j0URL, true);     
      Class c1 = ucl1.loadClass("java.sql.SQLException");
      info.setLength(0);
      ClassLoaderUtils.displayClassInfo(c1, info);
      log.info("Loaded c1: "+info);

View Full Code Here

    */
   public void testSystemClasses2() throws Exception
   {
      log.info("+++ Begin testSystemClasses2");
      UnifiedLoaderRepository3 parent = new UnifiedLoaderRepository3();
      HeirarchicalLoaderRepository3 repository0 = new HeirarchicalLoaderRepository3(parent);
      URL j0URL = getDeployURL("java-sql.jar");
      RepositoryClassLoader ucl0 = repository0.newClassLoader(j0URL, true);

      Class c0 = ucl0.loadClass("java.sql.SQLException");
      StringBuffer info = new StringBuffer();
      ClassLoaderUtils.displayClassInfo(c0, info);
      log.info("Loaded c0: "+info);

      HeirarchicalLoaderRepository3 repository1 = new HeirarchicalLoaderRepository3(parent);
      repository1.setUseParentFirst(false);
      RepositoryClassLoader ucl1 = repository1.newClassLoader(j0URL, true);     
      Class c1 = ucl1.loadClass("java.sql.SQLException");
      info.setLength(0);
      ClassLoaderUtils.displayClassInfo(c1, info);
      log.info("Loaded c1: "+info);

View Full Code Here

      }
   }
  
   protected ClassLoader createChildClassLoader(URL url, boolean parentFirst) throws Exception
   {
      HeirarchicalLoaderRepository3 repository = new HeirarchicalLoaderRepository3(getServer(), MAIN_LOADER_REPOSITORY_OBJECT_NAME);
      repository.setUseParentFirst(parentFirst);
      ClassLoader cl = repository.newClassLoader(url, true);
      registeredClassLoaders.add(cl);
      return cl;
   }
View Full Code Here

   private Domain getScopedClassLoaderDomain(ClassLoader cl, AspectManager parent)
   {
      boolean parentDelegation = true;
      if (cl instanceof RepositoryClassLoader)
      {
         HeirarchicalLoaderRepository3 repository = (HeirarchicalLoaderRepository3)((RepositoryClassLoader)cl).getLoaderRepository();
         parentDelegation = repository.getUseParentFirst();
      }
      String name = String.valueOf(System.identityHashCode(cl));
      return new ScopedRepositoryClassLoaderDomain(cl, name, parentDelegation, parent, false);
   }
View Full Code Here

      }
   }
  
   protected ClassLoader createChildClassLoader(URL url, boolean parentFirst) throws Exception
   {
      HeirarchicalLoaderRepository3 repository = new HeirarchicalLoaderRepository3(getServer(), MAIN_LOADER_REPOSITORY_OBJECT_NAME);
      repository.setUseParentFirst(parentFirst);
      ClassLoader cl = repository.newClassLoader(url, true);
      registeredClassLoaders.add(cl);
      return cl;
   }
View Full Code Here

TOP

Related Classes of org.jboss.mx.loading.HeirarchicalLoaderRepository3$NoParentClassLoader

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.