Package org.jboss.test.aop.classpool.jbosscl.support

Examples of org.jboss.test.aop.classpool.jbosscl.support.Result


   }
  
   public void testParentLastNotInChild() throws Exception
   {
      ClassLoader clParentA = null;
      Result resultParentA = new Result();
      try
      {
         clParentA = createClassLoader(resultParentA, "aParent", true, JAR_A_1);
         assertLoadClass(CLASS_A, clParentA);
         assertCannotLoadClass(CLASS_B, clParentA);
        
         ClassLoader clB = null;
         Result resultB = new Result();
         final String childDomainName = "ChildDomain";
         try
         {
            BundleInfoBuilder builderB = BundleInfoBuilder.getBuilder().
               createRequirePackage(PACKAGE_A);
View Full Code Here


   }
  
   public void testParentFirstWrongWayAround() throws Exception
   {
      ClassLoader clB = null;
      Result resultB = new Result();
      final String childDomainName = "ChildDomain";
      try
      {
         BundleInfoBuilder builderB = BundleInfoBuilder.getBuilder().
            createRequirePackage(PACKAGE_A);
         try
         {
            clB = createChildDomainParentFirstClassLoader(resultB, "b", childDomainName, builderB, JAR_B_1);
            fail("Should be no loader");
         }
         catch(NoSuchClassLoaderException e)
         {
         }
         assertNoClassLoader(resultB);
        
         ClassLoader clParentA = null;
         Result resultParentA = new Result();
         try
         {
            clParentA = createClassLoader(resultParentA, "aParent", true, JAR_A_1);
            assertLoadClass(CLASS_A, clParentA);
            assertCannotLoadClass(CLASS_B, clParentA);
View Full Code Here

   }
  
   public void testParentLastWrongWayAround() throws Exception
   {
      ClassLoader clB = null;
      Result resultB = new Result();
      final String childDomainName = "ChildDomain";
      try
      {
         BundleInfoBuilder builderB = BundleInfoBuilder.getBuilder().
            createRequirePackage(PACKAGE_A);
         try
         {
            clB = createChildDomainParentLastClassLoader(resultB, "b", childDomainName, builderB, JAR_B_1);
            fail("Should be no loader");
         }
         catch(NoSuchClassLoaderException e)
         {
         }
         assertNoClassLoader(resultB);
        
         ClassLoader clParentA = null;
         Result resultParentA = new Result();
         try
         {
            clParentA = createClassLoader(resultParentA, "aParent", true, JAR_A_1);
            assertLoadClass(CLASS_A, clParentA);
            assertCannotLoadClass(CLASS_B, clParentA);
View Full Code Here

   }
  
   public void testParentRedeploy() throws Exception
   {
      ClassLoader clB = null;
      Result resultB = new Result();
      final String childDomainName = "ChildDomain";
      try
      {
         BundleInfoBuilder builderB = BundleInfoBuilder.getBuilder().
            createRequirePackage(PACKAGE_A);
         try
         {
            clB = createChildDomainParentFirstClassLoader(resultB, "b", childDomainName, builderB, JAR_B_1);
            fail("Should be no loader");
         }
         catch(NoSuchClassLoaderException e)
         {
         }
         assertNoClassLoader(resultB);

         ClassLoader clParentA = null;
         Result resultParentA = new Result();
         try
         {
            clParentA = createClassLoader(resultParentA, "aParent", true, JAR_A_1);
            assertLoadClass(CLASS_A, clParentA);
            assertCannotLoadClass(CLASS_B, clParentA);
View Full Code Here

   }
  
   public void testParentOtherDomain() throws Exception
   {
      ClassLoader clParentA = null;
      Result resultParentA = new Result();
      final String parentDomainName = "ParentDomain";
      try
      {
         clParentA = createChildDomainParentFirstClassLoader(resultParentA, "aParent", parentDomainName, true, JAR_A_1);
         assertLoadClass(CLASS_A, clParentA);
         assertCannotLoadClass(CLASS_B, clParentA);
        
         ClassLoader clB = null;
         Result resultB = new Result();
         final String childDomainName = "ChildDomain";
         try
         {
            BundleInfoBuilder builderB = BundleInfoBuilder.getBuilder().
               createRequirePackage(PACKAGE_A);
View Full Code Here

   }
  
   public void testParentOtherDomainLazy() throws Exception
   {
      ClassLoader clB = null;
      Result resultB = new Result();
      final String parentDomainName = "ParentDomain";
      final String childDomainName = "ChildDomain";
      try
      {
         BundleInfoBuilder builderB = BundleInfoBuilder.getBuilder().
            createRequirePackage(PACKAGE_A);
         try
         {
            clB = createChildDomainParentFirstClassLoader(resultB, "b", childDomainName, parentDomainName, builderB, JAR_B_1);
            fail("Should be no loader");
         }
         catch(NoSuchClassLoaderException e)
         {
         }
         assertNoClassLoader(resultB);
        
         ClassLoader clParentA = null;
         Result resultParentA = new Result();
         try
         {
            clParentA = createChildDomainParentFirstClassLoader(resultParentA, "aParent", parentDomainName, true, JAR_A_1);
            assertLoadClass(CLASS_A, clParentA);
            assertCannotLoadClass(CLASS_B, clParentA);
View Full Code Here

   }

   public void testParentRedeployOtherDomain() throws Exception
   {
      ClassLoader clB = null;
      Result resultB = new Result();
      final String parentDomainName = "ParentDomain";
      final String childDomainName = "ChildDomain";
      try
      {
         BundleInfoBuilder builderB = BundleInfoBuilder.getBuilder().
            createRequirePackage(PACKAGE_A);
         try
         {
            clB = createChildDomainParentFirstClassLoader(resultB, "b", childDomainName, parentDomainName, builderB, JAR_B_1);
            fail("Should be no loader");
         }
         catch(NoSuchClassLoaderException e)
         {
         }
         assertNoClassLoader(resultB);
        
         ClassLoader clParentA = null;
         Result resultParentA = new Result();
         try
         {
            clParentA = createChildDomainParentFirstClassLoader(resultParentA, "aParent", parentDomainName, true, JAR_A_1);
            assertLoadClass(CLASS_A, clParentA);
            assertCannotLoadClass(CLASS_B, clParentA);
View Full Code Here

   }

   public void testReExport() throws Exception
   {
      ClassPool clA = null;
      Result rA = new Result();
      try
      {
         BundleInfoBuilder builderA = BundleInfoBuilder.getBuilder().
            createModule("a").
            createPackage(PACKAGE_A);
         clA = createClassPool(rA, "A", builderA, JAR_A_1);
         CtClass classA = assertLoadCtClass(CLASS_A, clA);
         assertCannotLoadCtClass(clA, CLASS_B);
         assertCannotLoadCtClass(clA, CLASS_C);
        
         ClassPool clB = null;
         Result rB = new Result();
         try
         {
            BundleInfoBuilder builderB = BundleInfoBuilder.getBuilder().
               createModule("b").
               createPackage(PACKAGE_B).
               createReExportModule("a");
            clB = createClassPool(rB, "B", builderB, JAR_B_1);
            CtClass classA1 = assertLoadCtClass(CLASS_A, clA);
            assertSame(classA, classA1);
            assertCannotLoadCtClass(clA, CLASS_B);
            assertCannotLoadCtClass(clA, CLASS_C);
            classA1 = assertLoadCtClass(CLASS_A, clB, clA);
            assertSame(classA, classA1);
            CtClass classB = assertLoadCtClass(CLASS_B, clB);
            assertCannotLoadCtClass(clB, CLASS_C);
           
            ClassPool clC = null;
            Result rC = new Result();
            try
            {
               BundleInfoBuilder builderC = BundleInfoBuilder.getBuilder().
                  createRequireModule("b");
               clC = createClassPool(rC, "C", builderC, JAR_C_1);
View Full Code Here

   }
  
   public void testNoReExport() throws Exception
   {
      ClassPool clA = null;
      Result rA = new Result();
      try
      {
         BundleInfoBuilder builderA = BundleInfoBuilder.getBuilder().
            createModule("a").
            createPackage(PACKAGE_A);
         clA = createClassPool(rA, "A", builderA, JAR_A_1);
         CtClass classA = assertLoadCtClass(CLASS_A, clA);
         assertCannotLoadCtClass(clA, CLASS_B);
         assertCannotLoadCtClass(clA, CLASS_C);
        
         ClassPool clB = null;
         Result rB = new Result();
         try
         {
            BundleInfoBuilder builderB = BundleInfoBuilder.getBuilder().
               createModule("b").
               createPackage(PACKAGE_B).
               createReExportModule("a");
            clB = createClassPool(rB, "B", builderB, JAR_B_1);
            CtClass classA1 = assertLoadCtClass(CLASS_A, clA);
            assertSame(classA, classA1);
            assertCannotLoadCtClass(clA, CLASS_B);
            assertCannotLoadCtClass(clA, CLASS_C);
            classA1 = assertLoadCtClass(CLASS_A, clB, clA);
            assertSame(classA, classA1);
            CtClass classB = assertLoadCtClass(CLASS_B, clB);
            assertCannotLoadCtClass(clB, CLASS_C);
           
            ClassPool clC = null;
            Result rC = new Result();
            try
            {
               BundleInfoBuilder builderC = BundleInfoBuilder.getBuilder().
                  createRequirePackage(PACKAGE_B);
               clC = createClassPool(rC, "C", builderC, JAR_C_1);
View Full Code Here

   }

   public void testParentFirst() throws Exception
   {
      ClassPool poolParentA = null;
      Result resultParentA = new Result();
      try
      {
         poolParentA = createClassPool(resultParentA, "aParent", true, JAR_A_1);
         assertLoadCtClass(CLASS_A, poolParentA);
         assertCannotLoadCtClass(CLASS_B, poolParentA);
        
         ClassPool poolChildA = null;
         Result resultChildA = new Result();
         final String childDomainName = "ChildDomain";
         try
         {
            poolChildA = createChildDomainParentFirstClassPool(resultChildA, "aChild", childDomainName, true, JAR_A_2);
            assertLoadCtClass(CLASS_A, poolParentA);
            assertLoadCtClass(CLASS_A, poolChildA, poolParentA);
            assertCannotLoadCtClass(CLASS_B, poolChildA);
           
            ClassPool poolB = null;
            Result resultB = new Result();
            try
            {
               BundleInfoBuilder builderB = BundleInfoBuilder.getBuilder().
                  createRequirePackage(PACKAGE_A);
               poolB = createChildDomainParentFirstClassPool(resultB, "b", childDomainName, builderB, JAR_B_1);
View Full Code Here

TOP

Related Classes of org.jboss.test.aop.classpool.jbosscl.support.Result

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.