Package org.jboss.aop.classpool

Examples of org.jboss.aop.classpool.ClassPoolDomain$ClassPoolDomainStrategy


   {
      ClassPool parent = getCreateParentClassPools(cl, src, repository);

      if (cl instanceof RepositoryClassLoader)
      {
         ClassPoolDomain domain = getDomain((RepositoryClassLoader)cl)
        
         File tempdir = getTempDirectory(cl);
         URL tmpCP = createURLAndAddToLoader(cl, tempdir);
        
         return new JBossUclDelegatingClassPool(domain, cl, parent, repository, tempdir, tmpCP);
View Full Code Here


   private ClassPoolDomain getDomain(RepositoryClassLoader cl)
   {
      LoaderRepository loaderRepository = cl.getLoaderRepository();
      ClassPoolDomainRegistry registry = ClassPoolDomainRegistry.getInstance();
      ClassPoolDomain domain = registry.getDomain(loaderRepository);
      if (domain == null)
      {
         if (loaderRepository instanceof HeirarchicalLoaderRepository3)
         {
           
View Full Code Here

         {
            module = getModuleForClassLoader(cl);
         }
         registerModuleCallback.registerModule(module);
         registerBootstrapLoaders();
         ClassPoolDomain domain = getDomain(module, cl)
         return new JBossClDelegatingClassPool(domain, cl, parent, repository, module, registerModuleCallback);
      }
     
      return new NonDelegatingClassPool(cl, parent, repository, true);
   }
View Full Code Here

      if (domain == null)
      {
         domain = registry.getDefaultDomain();
      }
     
      ClassPoolDomain poolDomain = ClassPoolDomainRegistry.getInstance().getDomain(domain);
      if (poolDomain == null)
      {
         String parentDomainName = domain.getParentDomainName();
         ClassPoolDomain parentPoolDomain = null;
         if (parentDomainName != null)
         {
            ClassLoaderDomain parentDomain = sys.getDomain(parentDomainName);
            if (parentDomain == null)
            {
View Full Code Here

      super(name);
   }

   public void testChildInParent() throws Exception
   {
      ClassPoolDomain parent = createClassPoolDomain("PARENT", null, false);
      ClassPool parentPool = createDelegatingClassPool(parent, JAR_A);
      ClassPoolDomain child = createClassPoolDomain("CHILD", parent, false);
      ClassPool childPool = createDelegatingClassPool(child, JAR_A);
     
      //The first time we access the pool it will create the classes, second time will use the cache
      accessChildInParent(parentPool, childPool);
      accessChildInParent(parentPool, childPool);
View Full Code Here

      assertEquals(parentPool, a2.getClassPool());
   }

   public void testChildInGrandParent() throws Exception
   {
      ClassPoolDomain grandParent = createClassPoolDomain("GRANDPARENT", null, false);
      ClassPool grandParentPool = createDelegatingClassPool(grandParent, JAR_A);
      ClassPoolDomain parent = createClassPoolDomain("PARENT", grandParent, false);
      ClassPool parentPool = createDelegatingClassPool(parent, JAR_B);
      ClassPoolDomain child = createClassPoolDomain("CHILD", parent, false);
      ClassPool childPool = createDelegatingClassPool(child, JAR_A);
     
      //The first time we access the pool it will create the classes, second time will use the cache
      accessChildInGrandParent(grandParentPool, parentPool, childPool);
      accessChildInGrandParent(grandParentPool, parentPool, childPool);
View Full Code Here

      assertEquals(grandParentPool, a3.getClassPool());
   }
  
   public void testChildInGrandParentFromTop() throws Exception
   {
      ClassPoolDomain grandParent = createClassPoolDomain("GRANDPARENT", null, false);
      ClassPool grandParentPool = createDelegatingClassPool(grandParent, JAR_A);
      ClassPoolDomain parent = createClassPoolDomain("PARENT", grandParent, false);
      ClassPool parentPool = createDelegatingClassPool(parent, JAR_B);
      ClassPoolDomain child = createClassPoolDomain("CHILD", parent, false);
      ClassPool childPool = createDelegatingClassPool(child, JAR_A);
     
      //The first time we access the pool it will create the classes, second time will use the cache
      accessChildInGrandParentFromTop(grandParentPool, parentPool, childPool);
      accessChildInGrandParentFromTop(grandParentPool, parentPool, childPool);
View Full Code Here

      assertEquals(childPool, a3.getClassPool());     
   }
  
   public void testChildInSibling() throws Exception
   {
      ClassPoolDomain parent = createClassPoolDomain("PARENT", null, false);
      ClassPool parentPool = createDelegatingClassPool(parent, JAR_A);
      ClassPoolDomain childA = createClassPoolDomain("CHILDA", parent, false);
      ClassPool childPoolA = createDelegatingClassPool(childA, JAR_A);
      ClassPoolDomain childB = createClassPoolDomain("CHILDB", parent, false);
      ClassPool childPoolB = createDelegatingClassPool(childB, JAR_A);
     
      //The first time we access the pool it will create the classes, second time will use the cache
      accessChildInSibling(parentPool, childPoolA, childPoolB);
      accessChildInSibling(parentPool, childPoolA, childPoolB);
View Full Code Here

      assertEquals(childPoolB, a3.getClassPool());
   }

   public void testClassInParentOnly() throws Exception
   {
      ClassPoolDomain parent = createClassPoolDomain("PARENT", null, false);
      ClassPool parentPool = createDelegatingClassPool(parent, JAR_A);
      ClassPoolDomain child = createClassPoolDomain("CHILD", parent, false);
      ClassPool childPool = createDelegatingClassPool(child, JAR_B);
     
      //The first time we access the pool it will create the classes, second time will use the cache
      accessClassInParentOnly(parentPool, childPool);
      accessClassInParentOnly(parentPool, childPool);
View Full Code Here

      assertEquals(parentPool, a2.getClassPool());
   }

   public void testClassInGrandParentOnly() throws Exception
   {
      ClassPoolDomain grandParent = createClassPoolDomain("GRANDPARENT", null, false);
      ClassPool grandParentPool = createDelegatingClassPool(grandParent, JAR_A);
      ClassPoolDomain parent = createClassPoolDomain("PARENT", grandParent, false);
      ClassPool parentPool = createDelegatingClassPool(parent, JAR_B);
      ClassPoolDomain child = createClassPoolDomain("CHILD", parent, false);
      ClassPool childPool = createDelegatingClassPool(child, JAR_B);
     
      //The first time we access the pool it will create the classes, second time will use the cache
      accessChildInGrandParentOnly(grandParentPool, parentPool, childPool);
      accessChildInGrandParentOnly(grandParentPool, parentPool, childPool);
View Full Code Here

TOP

Related Classes of org.jboss.aop.classpool.ClassPoolDomain$ClassPoolDomainStrategy

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.