Package org.jboss.classloading.plugins

Examples of org.jboss.classloading.plugins.DelegatingDomainClassLoader


   public void testClassCache() throws Exception
   {
      AbstractClassLoadingDomain domain = new AbstractClassLoadingDomain();
      SimpleClassLoader scl = new SimpleClassLoader();
      scl.addClass("xyzzy.Hello", String.class);
      domain.addDomainClassLoader(new DelegatingDomainClassLoader(scl));
     
      domain.loadClass("xyzzy.Hello", false, null);
     
      ClassLoaderStats stats = (ClassLoaderStats) scl.requests.get("xyzzy.Hello");
      assertNotNull(stats);
View Full Code Here


   public void testClassCacheFailed() throws Exception
   {
      AbstractClassLoadingDomain domain = new AbstractClassLoadingDomain();
      SimpleClassLoader scl = new SimpleClassLoader();
      scl.addClass("xyzzy.Hello", String.class);
      domain.addDomainClassLoader(new DelegatingDomainClassLoader(scl));
     
      try
      {
         domain.loadClass("xyzzy.rubbish", false, null);
         fail("Should not be here!");
View Full Code Here

   public void testClearClassCache() throws Exception
   {
      AbstractClassLoadingDomain domain = new AbstractClassLoadingDomain();
      SimpleClassLoader scl = new SimpleClassLoader();
      scl.addClass("xyzzy.Hello", String.class);
      DelegatingDomainClassLoader ddcl = new DelegatingDomainClassLoader(scl);
      domain.addDomainClassLoader(ddcl);
     
      domain.loadClass("xyzzy.Hello", false, null);
     
      ClassLoaderStats stats = (ClassLoaderStats) scl.requests.get("xyzzy.Hello");
View Full Code Here

   public void testResourceCache() throws Exception
   {
      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");
View Full Code Here

   public void testResourceCacheFailed() throws Exception
   {
      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");
View Full Code Here

   public void testClearResourceCache() throws Exception
   {
      AbstractClassLoadingDomain domain = new AbstractClassLoadingDomain();
      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);
     
View Full Code Here

TOP

Related Classes of org.jboss.classloading.plugins.DelegatingDomainClassLoader

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.