[Jboss-cvs] JBossAS SVN: r55987 - trunk/testsuite/src/main/org/jboss/test/aop/scopedextender

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Aug 16 10:29:27 EDT 2006


Author: kabir.khan at jboss.com
Date: 2006-08-16 10:29:26 -0400 (Wed, 16 Aug 2006)
New Revision: 55987

Modified:
   trunk/testsuite/src/main/org/jboss/test/aop/scopedextender/ScopedExtenderTester.java
Log:
Cleanup

Modified: trunk/testsuite/src/main/org/jboss/test/aop/scopedextender/ScopedExtenderTester.java
===================================================================
--- trunk/testsuite/src/main/org/jboss/test/aop/scopedextender/ScopedExtenderTester.java	2006-08-16 14:21:26 UTC (rev 55986)
+++ trunk/testsuite/src/main/org/jboss/test/aop/scopedextender/ScopedExtenderTester.java	2006-08-16 14:29:26 UTC (rev 55987)
@@ -21,6 +21,8 @@
  */ 
 package org.jboss.test.aop.scopedextender;
 
+import org.jboss.logging.Logger;
+
 /**
  * 
  * @author <a href="stalep at conduct.no">Stale W. Pedersen</a>
@@ -28,39 +30,45 @@
  */
 public class ScopedExtenderTester implements ScopedExtenderTesterMBean
 {
+   Logger log = Logger.getLogger(this.getClass());
    
    public void testMethod() throws Exception
    {
       
-      System.out.println("--------------------------- TESTING SCOPED EXTENDER ------------------");
-      System.out.println("MY CLASSLOADER " + getClass().getClassLoader());
-      System.out.println("SCOPEDEXTENDER INTERCEPTOR CLASSLOADER " + ScopedExtenderInterceptor.class.getClassLoader());
-      
-      
-      ChildBase childB = new ChildBase();
-      childB.updateBase();
-      if(!ScopedExtenderInterceptor.method)
-         throw new RuntimeException("Expected ScopedExtenderInterceptor.method to be true, it was: "+ScopedExtenderInterceptor.method);
-      
-//      ScopedExtenderInterceptor.method = false;      
-//      Base base = new SubBase();
-//      base.setBase(1);
-//      if(!ScopedExtenderInterceptor.method)
-//         throw new RuntimeException("Expected ScopedExtenderInterceptor.method to be true, it was: "+ScopedExtenderInterceptor.method);
-      
-      ScopedExtenderInterceptor.method = false;
-      ChildExtender ext = new ChildExtender();
-      ext.updateExtender();
-      if(!ScopedExtenderInterceptor.method)
-         throw new RuntimeException("Expected ScopedExtenderInterceptor.method to be true, it was: "+ScopedExtenderInterceptor.method);
-      
-      ScopedExtenderInterceptor.method = false;
-      InfantBase infant = new InfantBase();
-      infant.infantize(3);
-      if(!ScopedExtenderInterceptor.method)
-         throw new RuntimeException("Expected ScopedExtenderInterceptor.method to be true, it was: "+ScopedExtenderInterceptor.method);
-      
-      
+      try
+      {
+         log.debug("--------------------------- TESTING SCOPED EXTENDER ------------------");
+         log.debug("MY CLASSLOADER " + getClass().getClassLoader());
+         log.debug("SCOPEDEXTENDER INTERCEPTOR CLASSLOADER " + ScopedExtenderInterceptor.class.getClassLoader());
+         
+         
+         ChildBase childB = new ChildBase();
+         childB.updateBase();
+         if(!ScopedExtenderInterceptor.method)
+            throw new RuntimeException("Expected ScopedExtenderInterceptor.method to be true, it was: "+ScopedExtenderInterceptor.method);
+         
+         ScopedExtenderInterceptor.method = false;      
+         Base base = new SubBase();
+         base.setBase(1);
+         if(!ScopedExtenderInterceptor.method)
+            throw new RuntimeException("Expected ScopedExtenderInterceptor.method to be true, it was: "+ScopedExtenderInterceptor.method);
+         
+         ScopedExtenderInterceptor.method = false;
+         ChildExtender ext = new ChildExtender();
+         ext.updateExtender();
+         if(!ScopedExtenderInterceptor.method)
+            throw new RuntimeException("Expected ScopedExtenderInterceptor.method to be true, it was: "+ScopedExtenderInterceptor.method);
+         
+         ScopedExtenderInterceptor.method = false;
+         InfantBase infant = new InfantBase();
+         infant.infantize(3);
+         if(!ScopedExtenderInterceptor.method)
+            throw new RuntimeException("Expected ScopedExtenderInterceptor.method to be true, it was: "+ScopedExtenderInterceptor.method);
+      }
+      catch (Exception e)
+      {
+         log.error("Error running scoped extender", e);
+         throw e;
+      }
    }
-   
 }




More information about the jboss-cvs-commits mailing list