Package org.jboss.classloading.plugins

Examples of org.jboss.classloading.plugins.AbstractClassLoadingDomain.loadResource()


   }

   public void testLoadResource() throws Exception
   {
      AbstractClassLoadingDomain domain = new AbstractClassLoadingDomain();
      URL resource = domain.loadResource("java/lang/String.class", null);
      assertNotNull(resource);
   }

   public void testLoadResourceFailed() throws Exception
   {
View Full Code Here


   }

   public void testLoadResourceFailed() throws Exception
   {
      AbstractClassLoadingDomain domain = new AbstractClassLoadingDomain();
      URL resource = domain.loadResource("java/lang/rubbish", null);
      assertNull(resource);
   }
  
   public void testClassCache() throws Exception
   {
View Full Code Here

      AbstractClassLoadingDomain domain = new AbstractClassLoadingDomain();
      SimpleClassLoader scl = new SimpleClassLoader();
      scl.addResource("xyzzy/Hello", new URL("file:///"));
      domain.addDomainClassLoader(new DelegatingDomainClassLoader(scl));
     
      URL url = domain.loadResource("xyzzy/Hello", null);
      assertNotNull(url);
     
      ClassLoaderStats stats = (ClassLoaderStats) scl.requests.get("xyzzy/Hello");
      assertNotNull(stats);
      assertEquals(1, stats.getResource);
View Full Code Here

     
      ClassLoaderStats stats = (ClassLoaderStats) scl.requests.get("xyzzy/Hello");
      assertNotNull(stats);
      assertEquals(1, stats.getResource);
     
      url = domain.loadResource("xyzzy/Hello", null);
      assertNotNull(url);
      assertEquals(1, stats.getResource);
   }
  
   public void testResourceCacheFailed() throws Exception
View Full Code Here

      AbstractClassLoadingDomain domain = new AbstractClassLoadingDomain();
      SimpleClassLoader scl = new SimpleClassLoader();
      scl.addResource("xyzzy/Hello", new URL("file:///"));
      domain.addDomainClassLoader(new DelegatingDomainClassLoader(scl));
     
      URL url = domain.loadResource("xyzzy/rubbish", null);
      assertNull(url);
     
      ClassLoaderStats stats = (ClassLoaderStats) scl.requests.get("xyzzy/rubbish");
      assertNotNull(stats);
      assertEquals(1, stats.getResource);
View Full Code Here

      ClassLoaderStats stats = (ClassLoaderStats) scl.requests.get("xyzzy/rubbish");
      assertNotNull(stats);
      assertEquals(1, stats.getResource);
     
     
      url = domain.loadResource("xyzzy/rubbish", null);
      assertNull(url);
      assertEquals(1, stats.getResource);
   }
  
   public void testClearResourceCache() throws Exception
View Full Code Here

      SimpleClassLoader scl = new SimpleClassLoader();
      scl.addResource("xyzzy/Hello", new URL("file:///"));
      DelegatingDomainClassLoader ddcl = new DelegatingDomainClassLoader(scl);
      domain.addDomainClassLoader(ddcl);
     
      URL url = domain.loadResource("xyzzy/Hello", null);
      assertNotNull(url);
     
      ClassLoaderStats stats = (ClassLoaderStats) scl.requests.get("xyzzy/Hello");
      assertNotNull(stats);
      assertEquals(1, stats.getResource);
View Full Code Here

      assertNotNull(stats);
      assertEquals(1, stats.getResource);

      domain.removeDomainClassLoader(ddcl);
     
      url = domain.loadResource("xyzzy/Hello", null);
      assertNull(url);

      domain.addDomainClassLoader(ddcl);
      url = domain.loadResource("xyzzy/Hello", null);
      assertNotNull(url);
View Full Code Here

     
      url = domain.loadResource("xyzzy/Hello", null);
      assertNull(url);

      domain.addDomainClassLoader(ddcl);
      url = domain.loadResource("xyzzy/Hello", null);
      assertNotNull(url);
      assertEquals(2, stats.getResource);
   }
  
   // TestCase overrides --------------------------------------------
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.