[jboss-cvs] JBossAS SVN: r63534 - in branches/Branch_AOP_1_5: aop/src/resources/test and 17 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Jun 14 20:11:33 EDT 2007


Author: kabir.khan at jboss.com
Date: 2007-06-14 20:11:33 -0400 (Thu, 14 Jun 2007)
New Revision: 63534

Added:
   branches/Branch_AOP_1_5/aop/src/resources/test/stress/
   branches/Branch_AOP_1_5/aop/src/resources/test/stress/batf/
   branches/Branch_AOP_1_5/aop/src/resources/test/stress/batf/jboss-aop.xml
   branches/Branch_AOP_1_5/aop/src/resources/test/stress/config.properties
   branches/Branch_AOP_1_5/aop/src/resources/test/stress/methodinvocation/
   branches/Branch_AOP_1_5/aop/src/resources/test/stress/methodinvocation/jboss-aop.xml
   branches/Branch_AOP_1_5/aop/src/resources/test/stress/perinstancemethodinvocation/
   branches/Branch_AOP_1_5/aop/src/resources/test/stress/perinstancemethodinvocation/jboss-aop.xml
   branches/Branch_AOP_1_5/aop/src/resources/test/stress/perinstancemethodinvocationmanybindings/
   branches/Branch_AOP_1_5/aop/src/resources/test/stress/perinstancemethodinvocationmanybindings/jboss-aop.xml
   branches/Branch_AOP_1_5/aop/src/resources/test/stress/simple/
   branches/Branch_AOP_1_5/aop/src/resources/test/stress/simple/jboss-aop.xml
   branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/
   branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/AbstractScenario.java
   branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/Scenario.java
   branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/ScenarioLoggingDecorator.java
   branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/ScenarioRunner.java
   branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/ScenarioTest.java
   branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/ScenarioTestDelegate.java
   branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/batf/
   branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/batf/BeforeAfterThrowingFinallyVersusAroundTestCase.java
   branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/batf/POJO.java
   branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/batf/SimpleAspect.java
   branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/methodinvocation/
   branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/methodinvocation/MethodInvocationTestCase.java
   branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/methodinvocation/POJO.java
   branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/methodinvocation/PlainAspect.java
   branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/methodinvocation/PlainInterceptor.java
   branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocation/
   branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocation/POJO.java
   branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocation/PerInstanceAspect.java
   branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocation/PerInstanceInterceptor.java
   branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocation/PerInstanceTestCase.java
   branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocationmanybindings/
   branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocationmanybindings/POJO.java
   branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocationmanybindings/PerInstanceInterceptor.java
   branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocationmanybindings/PerInstanceTestCase.java
   branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocationmanybindings/PerVmInterceptor.java
   branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/simple/
   branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/simple/LargePojo.java
   branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/simple/SimpleReflectToJavassistTestCase.java
   branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/simple/Test.java
Modified:
   branches/Branch_AOP_1_5/aop/.classpath
   branches/Branch_AOP_1_5/aop/build.xml
   branches/Branch_AOP_1_5/build/build.xml
   branches/Branch_AOP_1_5/test/.classpath
   branches/Branch_AOP_1_5/test/build.xml
   branches/Branch_AOP_1_5/test/src/main/org/jboss/test/JBossIIOPTestCase.java
   branches/Branch_AOP_1_5/test/src/main/org/jboss/test/JBossTestCase.java
   branches/Branch_AOP_1_5/test/src/main/org/jboss/test/JBossTestServices.java
   branches/Branch_AOP_1_5/test/src/main/org/jboss/test/JBossTestSetup.java
   branches/Branch_AOP_1_5/tools/etc/buildmagic/modules.ent
Log:
Add stress tests

Modified: branches/Branch_AOP_1_5/aop/.classpath
===================================================================
--- branches/Branch_AOP_1_5/aop/.classpath	2007-06-14 20:39:25 UTC (rev 63533)
+++ branches/Branch_AOP_1_5/aop/.classpath	2007-06-15 00:11:33 UTC (rev 63534)
@@ -4,7 +4,7 @@
 	<classpathentry kind="src" path="src/jdk15"/>
 	<classpathentry excluding="org/jboss/test/aop/jdk15/|org/jboss/test/aop/memoryleaks/" kind="src" path="src/test"/>
 	<classpathentry kind="lib" path="/thirdparty/oswego-concurrent/lib/concurrent.jar"/>
-	<classpathentry sourcepath="/javassist" kind="lib" path="/thirdparty/javassist/lib/javassist.jar"/>
+	<classpathentry kind="lib" path="/thirdparty/javassist/lib/javassist.jar" sourcepath="/javassist"/>
 	<classpathentry kind="lib" path="/thirdparty/dom4j/lib/dom4j.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/trove/lib/trove.jar"/>
 	<classpathentry kind="lib" path="/tools/lib/ant.jar"/>
@@ -12,7 +12,8 @@
 	<classpathentry kind="lib" path="/thirdparty/junit/lib/junit.jar"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
 	<classpathentry kind="lib" path="docs"/>
-	<classpathentry kind="lib" path="/thirdparty/jboss/microcontainer/lib/jboss-container.jar"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/common"/>
+	<classpathentry kind="lib" path="/thirdparty/jboss/test14/lib/jboss-test14.jar"/>
+	<classpathentry combineaccessrules="false" kind="src" path="/test"/>
 	<classpathentry kind="output" path="output/eclipse-classes"/>
 </classpath>

Modified: branches/Branch_AOP_1_5/aop/build.xml
===================================================================
--- branches/Branch_AOP_1_5/aop/build.xml	2007-06-14 20:39:25 UTC (rev 63533)
+++ branches/Branch_AOP_1_5/aop/build.xml	2007-06-15 00:11:33 UTC (rev 63534)
@@ -160,6 +160,8 @@
       </path>
 
       <path id="test.classpath">
+      	<path refid="apache.log4j.classpath"/>
+         <path refid="jboss.test.classpath"/>
          <path refid="thirdparty.classpath"/>
          <pathelement path="${build.lib}/jboss-aop.jar"/>
       </path>

Added: branches/Branch_AOP_1_5/aop/src/resources/test/stress/batf/jboss-aop.xml
===================================================================
--- branches/Branch_AOP_1_5/aop/src/resources/test/stress/batf/jboss-aop.xml	                        (rev 0)
+++ branches/Branch_AOP_1_5/aop/src/resources/test/stress/batf/jboss-aop.xml	2007-06-15 00:11:33 UTC (rev 63534)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<aop>
+   <aspect class="org.jboss.test.aop.stress.batf.SimpleAspect"/>
+   
+   <bind pointcut="execution(* org.jboss.test.aop.stress.batf.POJO->methodWithAroundNoExceptions())">
+	   <advice aspect="org.jboss.test.aop.stress.batf.SimpleAspect" name="methodWithAroundNoExceptions"/>
+   </bind>
+   
+   <bind pointcut="execution(* org.jboss.test.aop.stress.batf.POJO->methodWithAroundExceptions())">
+	   <advice aspect="org.jboss.test.aop.stress.batf.SimpleAspect" name="methodWithAroundExceptions"/>
+   </bind>
+</aop>
+

Added: branches/Branch_AOP_1_5/aop/src/resources/test/stress/config.properties
===================================================================
--- branches/Branch_AOP_1_5/aop/src/resources/test/stress/config.properties	                        (rev 0)
+++ branches/Branch_AOP_1_5/aop/src/resources/test/stress/config.properties	2007-06-15 00:11:33 UTC (rev 63534)
@@ -0,0 +1,6 @@
+warmup=1000000
+loops=10000000
+threads=1
+random_sleep_interval=false
+sleeptime_millis=0
+logging=false

Added: branches/Branch_AOP_1_5/aop/src/resources/test/stress/methodinvocation/jboss-aop.xml
===================================================================
--- branches/Branch_AOP_1_5/aop/src/resources/test/stress/methodinvocation/jboss-aop.xml	                        (rev 0)
+++ branches/Branch_AOP_1_5/aop/src/resources/test/stress/methodinvocation/jboss-aop.xml	2007-06-15 00:11:33 UTC (rev 63534)
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<aop>
+   <interceptor name="Int1" class="org.jboss.test.aop.stress.methodinvocation.PlainInterceptor"/>
+   <interceptor name="Int2" class="org.jboss.test.aop.stress.methodinvocation.PlainInterceptor"/>
+   <interceptor name="Int3" class="org.jboss.test.aop.stress.methodinvocation.PlainInterceptor"/>
+   <interceptor name="Int4" class="org.jboss.test.aop.stress.methodinvocation.PlainInterceptor"/>
+   <interceptor name="Int5" class="org.jboss.test.aop.stress.methodinvocation.PlainInterceptor"/>
+   
+   <aspect name="plain" class="org.jboss.test.aop.stress.methodinvocation.PlainAspect"/>
+   
+   <prepare expr="all(org.jboss.test.aop.stress.methodinvocation.POJO)"/>
+   
+   <bind pointcut="execution(* org.jboss.test.aop.stress.methodinvocation.POJO->oneInterceptor())">
+      <interceptor-ref name="Int1"/>
+   </bind>
+   
+   <bind pointcut="execution(* org.jboss.test.aop.stress.methodinvocation.POJO->fiveInterceptors())">
+      <interceptor-ref name="Int1"/>
+      <interceptor-ref name="Int2"/>
+      <interceptor-ref name="Int3"/>
+      <interceptor-ref name="Int4"/>
+      <interceptor-ref name="Int5"/>
+   </bind>
+   
+   <bind pointcut="execution(* org.jboss.test.aop.stress.methodinvocation.POJO->oneAdvice())">
+      <advice aspect="plain" name="one"/>
+   </bind>
+   
+   <bind pointcut="execution(* org.jboss.test.aop.stress.methodinvocation.POJO->fiveAdvices())">
+      <advice aspect="plain" name="one"/>
+      <advice aspect="plain" name="two"/>
+      <advice aspect="plain" name="three"/>
+      <advice aspect="plain" name="four"/>
+      <advice aspect="plain" name="five"/>
+   </bind>
+   
+</aop>

Added: branches/Branch_AOP_1_5/aop/src/resources/test/stress/perinstancemethodinvocation/jboss-aop.xml
===================================================================
--- branches/Branch_AOP_1_5/aop/src/resources/test/stress/perinstancemethodinvocation/jboss-aop.xml	                        (rev 0)
+++ branches/Branch_AOP_1_5/aop/src/resources/test/stress/perinstancemethodinvocation/jboss-aop.xml	2007-06-15 00:11:33 UTC (rev 63534)
@@ -0,0 +1,12 @@
+<aop>
+   <interceptor name="Int1" class="org.jboss.test.aop.stress.perinstancemethodinvocation.PerInstanceInterceptor" scope="PER_INSTANCE"/>
+   <aspect name="Aspect1" class="org.jboss.test.aop.stress.perinstancemethodinvocation.PerInstanceAspect" scope="PER_INSTANCE"/>
+   
+   <bind pointcut="execution(* org.jboss.test.aop.stress.perinstancemethodinvocation.POJO->method1())">
+      <interceptor-ref name="Int1"/>
+   </bind>
+   
+   <bind pointcut="execution(* org.jboss.test.aop.stress.perinstancemethodinvocation.POJO->method2())">
+      <advice aspect="Aspect1" name="invoke"/>
+   </bind>
+</aop>
\ No newline at end of file

Added: branches/Branch_AOP_1_5/aop/src/resources/test/stress/perinstancemethodinvocationmanybindings/jboss-aop.xml
===================================================================
--- branches/Branch_AOP_1_5/aop/src/resources/test/stress/perinstancemethodinvocationmanybindings/jboss-aop.xml	                        (rev 0)
+++ branches/Branch_AOP_1_5/aop/src/resources/test/stress/perinstancemethodinvocationmanybindings/jboss-aop.xml	2007-06-15 00:11:33 UTC (rev 63534)
@@ -0,0 +1,119 @@
+<aop>
+   <interceptor name="perVm" class="org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.PerVmInterceptor" scope="PER_VM"/>
+   <interceptor name="perInstance" class="org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.PerInstanceInterceptor" scope="PER_INSTANCE"/>
+
+   <bind pointcut="execution(org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->new())">
+      <interceptor-ref name="perVm"/>
+   </bind>
+   <bind pointcut="execution(org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->new(int))">
+      <interceptor-ref name="perVm"/>
+   </bind>
+   <bind pointcut="execution(org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->new(int, int))">
+      <interceptor-ref name="perVm"/>
+   </bind>
+   <bind pointcut="execution(org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->new(int, int, int))">
+      <interceptor-ref name="perVm"/>
+   </bind>
+   <bind pointcut="execution(org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->new(int, int, int, int))">
+      <interceptor-ref name="perVm"/>
+   </bind>
+   <bind pointcut="execution(org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->new(int, int, int, int, int))">
+      <interceptor-ref name="perVm"/>
+   </bind>
+   <bind pointcut="execution(org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->new(int, int, int, int, int, int))">
+      <interceptor-ref name="perVm"/>
+   </bind>
+   <bind pointcut="execution(org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->new(int, int, int, int, int, int, int))">
+      <interceptor-ref name="perVm"/>
+   </bind>
+   <bind pointcut="execution(org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->new(int, int, int, int, int, int, int, int))">
+      <interceptor-ref name="perVm"/>
+   </bind>
+   <bind pointcut="execution(org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->new(int, int, int, int, int, int, int, int, int))">
+      <interceptor-ref name="perVm"/>
+   </bind>
+   <bind pointcut="execution(org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->new(int, int, int, int, int, int, int, int, int, int))">
+      <interceptor-ref name="perVm"/>
+   </bind>
+   <bind pointcut="execution(org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->new(int, int, int, int, int, int, int, int, int, int, int))">
+      <interceptor-ref name="perVm"/>
+   </bind>
+   <bind pointcut="execution(org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->new(int, int, int, int, int, int, int, int, int, int, int, int))">
+      <interceptor-ref name="perVm"/>
+   </bind>
+   
+   <bind pointcut="field(* org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->field1)">
+      <interceptor-ref name="perInstance"/>
+   </bind>
+   <bind pointcut="field(* org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->field2)">
+      <interceptor-ref name="perInstance"/>
+   </bind>
+   <bind pointcut="field(* org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->field3)">
+      <interceptor-ref name="perInstance"/>
+   </bind>
+   <bind pointcut="field(* org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->field4)">
+      <interceptor-ref name="perInstance"/>
+   </bind>
+   <bind pointcut="field(* org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->field5)">
+      <interceptor-ref name="perInstance"/>
+   </bind>
+   <bind pointcut="field(* org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->field6)">
+      <interceptor-ref name="perInstance"/>
+   </bind>
+   <bind pointcut="field(* org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->field7)">
+      <interceptor-ref name="perInstance"/>
+   </bind>
+   <bind pointcut="field(* org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->field8)">
+      <interceptor-ref name="perInstance"/>
+   </bind>
+   <bind pointcut="field(* org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->field9)">
+      <interceptor-ref name="perInstance"/>
+   </bind>
+   <bind pointcut="field(* org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->field10)">
+      <interceptor-ref name="perInstance"/>
+   </bind>
+   <bind pointcut="field(* org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->field11)">
+      <interceptor-ref name="perInstance"/>
+   </bind>
+   <bind pointcut="field(* org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->field12)">
+      <interceptor-ref name="perInstance"/>
+   </bind>
+   
+   <bind pointcut="execution(* org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->method1())">
+      <interceptor-ref name="perInstance"/>
+   </bind>
+   <bind pointcut="execution(* org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->method2())">
+      <interceptor-ref name="perInstance"/>
+   </bind>
+   <bind pointcut="execution(* org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->method3())">
+      <interceptor-ref name="perInstance"/>
+   </bind>
+   <bind pointcut="execution(* org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->method4())">
+      <interceptor-ref name="perInstance"/>
+   </bind>
+   <bind pointcut="execution(* org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->method5())">
+      <interceptor-ref name="perInstance"/>
+   </bind>
+   <bind pointcut="execution(* org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->method6())">
+      <interceptor-ref name="perInstance"/>
+   </bind>
+   <bind pointcut="execution(* org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->method7())">
+      <interceptor-ref name="perInstance"/>
+   </bind>
+   <bind pointcut="execution(* org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->method8())">
+      <interceptor-ref name="perInstance"/>
+   </bind>
+   <bind pointcut="execution(* org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->method9())">
+      <interceptor-ref name="perInstance"/>
+   </bind>
+   <bind pointcut="execution(* org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->method10())">
+      <interceptor-ref name="perInstance"/>
+   </bind>
+   <bind pointcut="execution(* org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->method11())">
+      <interceptor-ref name="perInstance"/>
+   </bind>
+   <bind pointcut="execution(* org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings.POJO->method12())">
+      <interceptor-ref name="perInstance"/>
+   </bind>
+   
+</aop>
\ No newline at end of file

Added: branches/Branch_AOP_1_5/aop/src/resources/test/stress/simple/jboss-aop.xml
===================================================================
--- branches/Branch_AOP_1_5/aop/src/resources/test/stress/simple/jboss-aop.xml	                        (rev 0)
+++ branches/Branch_AOP_1_5/aop/src/resources/test/stress/simple/jboss-aop.xml	2007-06-15 00:11:33 UTC (rev 63534)
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<aop>
+   <prepare expr="all(org.jboss.test.aop.stress.simple.LargePojo)"/>
+</aop>

Added: branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/AbstractScenario.java
===================================================================
--- branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/AbstractScenario.java	                        (rev 0)
+++ branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/AbstractScenario.java	2007-06-15 00:11:33 UTC (rev 63534)
@@ -0,0 +1,37 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors. 
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.aop.stress;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class AbstractScenario implements Scenario
+{
+   public String getName()
+   {
+      String name = this.getClass().getName();
+      return name.substring(name.lastIndexOf("."));
+   }
+
+}

Added: branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/Scenario.java
===================================================================
--- branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/Scenario.java	                        (rev 0)
+++ branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/Scenario.java	2007-06-15 00:11:33 UTC (rev 63534)
@@ -0,0 +1,33 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.aop.stress;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 61751 $
+ */
+public interface Scenario
+{
+   String getName();
+   void execute(int thread, int loop) throws Exception;
+}

Added: branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/ScenarioLoggingDecorator.java
===================================================================
--- branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/ScenarioLoggingDecorator.java	                        (rev 0)
+++ branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/ScenarioLoggingDecorator.java	2007-06-15 00:11:33 UTC (rev 63534)
@@ -0,0 +1,50 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.aop.stress;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 61751 $
+ */
+public class ScenarioLoggingDecorator implements Scenario
+{
+   Scenario delegate;
+   
+   public ScenarioLoggingDecorator(Scenario delegate)
+   {
+      this.delegate = delegate;
+   }
+   
+   public void execute(int thread, int loop) throws Exception
+   {
+      String id = (thread + "-" + loop + " " + delegate.getClass());
+      System.out.println(id + " starting");
+      delegate.execute(thread, loop);
+      System.out.println(id + " end");
+   }
+
+   public String getName()
+   {
+      return delegate.getName();
+   }
+}

Added: branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/ScenarioRunner.java
===================================================================
--- branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/ScenarioRunner.java	                        (rev 0)
+++ branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/ScenarioRunner.java	2007-06-15 00:11:33 UTC (rev 63534)
@@ -0,0 +1,268 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.aop.stress;
+
+import java.io.FileInputStream;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.Random;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 62884 $
+ */
+public class ScenarioRunner
+{
+   private static final String WARMUP = "warmup";
+   private static final String LOOPS = "loops";
+   private static final String THREADS = "threads";
+   private static final String RANDOM_SLEEP_INTERVAL = "random_sleep_interval";
+   private static final String SLEEPTIME_MILLIS = "sleeptime_millis";
+   private static final String LOGGING = "logging";
+
+   private Properties properties = new Properties();
+
+   private int warmup;
+   private int loops;
+   private int threads;
+   private boolean randomSleepInterval;
+   private int sleeptimeMillis;
+   Random random = new Random(10);
+   boolean logging;
+   
+   public ScenarioRunner()
+   {
+      try
+      {
+         initialiseProperties();
+         
+         warmup = getIntProperty(WARMUP, "100000");
+         loops = getIntProperty(LOOPS, "10");
+         threads = getIntProperty(THREADS, "10");
+         randomSleepInterval = getBooleanProperty(RANDOM_SLEEP_INTERVAL, "false");
+         sleeptimeMillis = getIntProperty(SLEEPTIME_MILLIS, "100");
+         logging = getBooleanProperty(LOGGING, "false");
+         
+         System.out.println("============================================");
+         System.out.println("Configured ScenarioRunner");
+         System.out.println("   warmup:                  " + warmup);
+         System.out.println("   loops:                   " + loops);
+         System.out.println("   threads:                 " + threads);
+         System.out.println("   Random sleep Interval:   " + randomSleepInterval);
+         System.out.println("   Sleep time millis:       " + randomSleepInterval);
+         System.out.println("   Logging:                 " + logging);
+         System.out.println("============================================");
+      }
+      catch (Exception e)
+      {
+         throw new RuntimeException(e);
+      }
+   }
+
+   private void initialiseProperties() throws Exception
+   {
+      URL url = this.getClass().getProtectionDomain().getCodeSource().getLocation();
+      System.out.println("class url: " + url);
+      String location = url.toString();
+      int index = location.indexOf("/output/");
+      location = location.substring(0, index);
+      
+      location = location + "/src/resources/test/stress/config.properties";
+      url = new URL(location);
+      InputStream in = new FileInputStream(url.getFile());
+      properties = new Properties();
+      properties.load(in);
+      
+   }
+   
+   private int getIntProperty(String key, String defaultValue)
+   {
+      return Integer.parseInt(getProperty(key, defaultValue));  
+   }
+   
+   private boolean getBooleanProperty(String key, String defaultValue)
+   {
+      return "true".equals(getProperty(key, defaultValue));
+   }
+   
+   private String getProperty(String key, String defaultValue)
+   {
+      String val = System.getProperty(key);
+      if (val != null)
+      {
+         return val;
+      }
+      
+      val = properties.getProperty(key);
+      if (val != null)
+      {
+         return val;
+      }
+      
+      return defaultValue;
+   }
+   
+   public void executeScenario(Scenario scenario) throws Exception
+   {
+      Scenario[] scenarios = new Scenario[] {scenario};
+      warmupScenario(scenarios);
+      executeScenarios(scenarios);
+   }
+
+   private void warmupScenario(Scenario[] scenarios) throws Exception
+   {
+      ScenarioLoader loader = getLoader(0, scenarios, true);
+      loader.start();
+      loader.join();
+   }
+   
+   public void executeScenarios(Scenario[] scenarios) throws Exception
+   {
+      System.out.println("Starting run with Scenarios " + getScenarioNames(scenarios));
+      long start = System.currentTimeMillis();
+      
+      ScenarioLoader[] loaders = new ScenarioLoader[threads];
+      for (int thread = 0 ; thread < threads ; thread++)
+      {
+         loaders[thread] = getLoader(thread, scenarios, false);
+      }
+      
+      System.out.println("Starting threads...");
+      for (int thread = 0 ; thread < loaders.length ; thread++)
+      {
+         loaders[thread].start();
+      }
+      
+      for (int thread = 0 ; thread < loaders.length ; thread++)
+      {
+         loaders[thread].join();
+      }
+
+      long end = System.currentTimeMillis();
+      boolean hadExceptions = false;
+      for (int thread = 0 ; thread < loaders.length ; thread++)
+      {
+         if (loaders[thread].exceptions.size() > 0)
+         {
+            hadExceptions = true;
+            for (Iterator it = loaders[thread].exceptions.iterator() ; it.hasNext() ; )
+            {
+               ((Exception)it.next()).printStackTrace(System.err);
+            }
+         }
+      }
+      
+      System.out.println("--- DONE --- test took " + (end - start) + " ms");
+      
+      for (int thread = 0 ; thread < loaders.length ; thread++)
+      {
+         loaders[thread] = null;
+      }
+      
+      if (hadExceptions)
+      {
+         throw new Exception("Exceptions occurred, see System.err");
+      }
+   }
+
+   
+   private ScenarioLoader getLoader(int thread, Scenario[] scenarios, boolean forWarmup)
+   {
+      int num = thread % scenarios.length;
+      Scenario scenario = scenarios[num];
+      if (logging)
+      {
+         scenario = new ScenarioLoggingDecorator(scenario);
+      }
+      return new ScenarioLoader(scenario, thread, forWarmup);
+   }
+   
+   private int getSleepInterval()
+   {
+      if(sleeptimeMillis ==0) return sleeptimeMillis;
+
+      if(randomSleepInterval)
+      {
+         return random.nextInt(sleeptimeMillis);
+      } else
+      {
+         return sleeptimeMillis;
+      }
+   }
+   
+   private String getScenarioNames(Scenario[] scenarios)
+   {
+      StringBuffer buf = new StringBuffer("[");
+      for (int i = 0 ; i < scenarios.length ; i++)
+      {
+         if (i > 0)
+         {
+            buf.append(", ");
+         }
+         buf.append(scenarios[i].getName());
+      }
+      buf.append("]");
+      return buf.toString();
+   }
+   
+   private class ScenarioLoader extends Thread
+   {
+      int thread;
+      Scenario scenario;
+      int loop;
+      ArrayList exceptions = new ArrayList();
+      boolean forWarmup;
+      
+      ScenarioLoader(Scenario scenario, int thread, boolean forWarmup)
+      {
+         this.scenario = scenario;
+         this.thread = thread;
+         this.forWarmup = forWarmup;
+      }
+      
+      public void run()
+      {
+         final int max = forWarmup ? warmup : loops;
+         try
+         {
+            while (loop++ < max)
+            {
+               scenario.execute(thread, loop);
+               Thread.sleep(getSleepInterval());
+            }
+         }
+         catch (InterruptedException e)
+         {
+            e.printStackTrace();
+         }
+         catch(Exception e)
+         {
+            exceptions.add(e);
+            e.printStackTrace();
+         }
+      }
+   }
+}

Added: branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/ScenarioTest.java
===================================================================
--- branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/ScenarioTest.java	                        (rev 0)
+++ branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/ScenarioTest.java	2007-06-15 00:11:33 UTC (rev 63534)
@@ -0,0 +1,52 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.aop.stress;
+
+import org.jboss.test.AbstractTestCaseWithSetup;
+import org.jboss.test.AbstractTestDelegate;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 61636 $
+ */
+public class ScenarioTest extends AbstractTestCaseWithSetup
+{
+   
+   public ScenarioTest(String arg0)
+   {
+      super(arg0);
+//      runner = new ScenarioRunner();
+   }
+
+   public static AbstractTestDelegate getDelegate(Class clazz) throws Exception
+   {
+      ScenarioTestDelegate delegate = new ScenarioTestDelegate(clazz);
+      return delegate;
+   }
+
+   
+   protected ScenarioRunner getRunner()
+   {
+      return ((ScenarioTestDelegate)getDelegate()).getRunner();
+   }
+}

Added: branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/ScenarioTestDelegate.java
===================================================================
--- branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/ScenarioTestDelegate.java	                        (rev 0)
+++ branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/ScenarioTestDelegate.java	2007-06-15 00:11:33 UTC (rev 63534)
@@ -0,0 +1,43 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors. 
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.aop.stress;
+
+import org.jboss.test.AbstractTestDelegate;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class ScenarioTestDelegate extends AbstractTestDelegate
+{
+   ScenarioRunner runner = new ScenarioRunner(); 
+   public ScenarioTestDelegate(Class clazz)
+   {
+      super(clazz);
+   }
+
+   public ScenarioRunner getRunner()
+   {
+      return runner;
+   }
+}

Added: branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/batf/BeforeAfterThrowingFinallyVersusAroundTestCase.java
===================================================================
--- branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/batf/BeforeAfterThrowingFinallyVersusAroundTestCase.java	                        (rev 0)
+++ branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/batf/BeforeAfterThrowingFinallyVersusAroundTestCase.java	2007-06-15 00:11:33 UTC (rev 63534)
@@ -0,0 +1,106 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.test.aop.stress.batf;
+
+import org.jboss.test.aop.stress.AbstractScenario;
+import org.jboss.test.aop.stress.ScenarioTest;
+
+/**
+ * Primarily to make sure I got everything right for the generated advisors
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 61751 $
+ */
+public class BeforeAfterThrowingFinallyVersusAroundTestCase extends ScenarioTest
+{
+   
+   public static void main(String[] args)
+   {
+      junit.textui.TestRunner.run(BeforeAfterThrowingFinallyVersusAroundTestCase.class);
+   }
+
+   
+   public BeforeAfterThrowingFinallyVersusAroundTestCase(String name) throws Exception
+   {
+      super(name);
+   }
+
+   public void testAroundWithNoExceptionScenario() throws Exception
+   {
+      SimpleAspect.reset();
+      POJO pojo = new POJO();
+      pojo.methodWithAroundNoExceptions();
+      assertTrue(SimpleAspect.before);
+      assertTrue(SimpleAspect.after);
+      assertFalse(SimpleAspect.throwing);
+      assertFalse(SimpleAspect.finaly);
+      getRunner().executeScenario(new AroundWithNoExceptionsScenario());
+   }
+   
+   private class AroundWithNoExceptionsScenario extends AbstractScenario
+   {
+      POJO pojo = new POJO();
+
+      public void execute(int thread, int loop) throws Exception
+      {
+         pojo.methodWithAroundNoExceptions();
+      }
+   }
+
+   public void testAroundWithExceptionScenario() throws Exception
+   {
+      SimpleAspect.reset();
+      boolean exception = false;
+      try
+      {
+         POJO pojo = new POJO();
+         pojo.methodWithAroundExceptions();
+      }
+      catch (Exception e)
+      {
+         exception = true;
+      }
+      
+      assertTrue(exception);
+      assertTrue(SimpleAspect.before);
+      assertFalse(SimpleAspect.after);
+      assertTrue(SimpleAspect.throwing);
+      assertTrue(SimpleAspect.finaly);
+
+      getRunner().executeScenario(new AroundWithExceptionsScenario());
+   }
+   
+   private class AroundWithExceptionsScenario extends AbstractScenario
+   {
+      POJO pojo = new POJO();
+      public void execute(int thread, int loop) throws Exception
+      {
+         try
+         {
+            pojo.methodWithAroundExceptions();
+         }
+         catch(RuntimeException e) 
+         {
+            
+         }
+      }
+   }
+}

Added: branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/batf/POJO.java
===================================================================
--- branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/batf/POJO.java	                        (rev 0)
+++ branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/batf/POJO.java	2007-06-15 00:11:33 UTC (rev 63534)
@@ -0,0 +1,39 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors. 
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.aop.stress.batf;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class POJO
+{
+   public void methodWithAroundNoExceptions() 
+   {
+      
+   }
+   public void methodWithAroundExceptions()
+   {
+      throw new RuntimeException();
+   }
+}

Added: branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/batf/SimpleAspect.java
===================================================================
--- branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/batf/SimpleAspect.java	                        (rev 0)
+++ branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/batf/SimpleAspect.java	2007-06-15 00:11:33 UTC (rev 63534)
@@ -0,0 +1,75 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors. 
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.aop.stress.batf;
+
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class SimpleAspect
+{
+   public static boolean before;
+   public static boolean after;
+   public static boolean throwing;
+   public static boolean finaly;
+   
+   public Object methodWithAroundNoExceptions(Invocation inv) throws Throwable
+   {
+      try
+      {
+         before = true;
+         return inv.invokeNext();
+      }
+      finally
+      {
+         after = true;
+      }
+   }
+   
+   public Object methodWithAroundExceptions(Invocation inv) throws Throwable
+   {
+      try
+      {
+         before = true;
+         return inv.invokeNext();
+      }
+      catch(Exception e)
+      {
+         throwing = true;
+         throw e;
+      }
+      finally
+      {
+         finaly = true;
+      }
+   }
+   public static void reset()
+   {
+      before = false;
+      after = false;
+      throwing = false;
+      finaly = false;
+   }
+}

Added: branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/methodinvocation/MethodInvocationTestCase.java
===================================================================
--- branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/methodinvocation/MethodInvocationTestCase.java	                        (rev 0)
+++ branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/methodinvocation/MethodInvocationTestCase.java	2007-06-15 00:11:33 UTC (rev 63534)
@@ -0,0 +1,146 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.test.aop.stress.methodinvocation;
+
+import org.jboss.test.aop.stress.AbstractScenario;
+import org.jboss.test.aop.stress.ScenarioTest;
+
+/**
+ * Primarily to make sure I got everything right for the generated advisors
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 45109 $
+ */
+public class MethodInvocationTestCase extends ScenarioTest
+{
+   
+   public static void main(String[] args)
+   {
+      junit.textui.TestRunner.run(MethodInvocationTestCase.class);
+   }
+
+   
+   public MethodInvocationTestCase(String name) throws Exception
+   {
+      super(name);
+   }
+
+   
+   public void testStaticWovenNoAdvice() throws Exception
+   {
+      getRunner().executeScenario(new StaticWovenNoAdviceScenario());
+   }
+   
+   private class StaticWovenNoAdviceScenario extends AbstractScenario
+   {
+      POJO pojo = new POJO();
+      public void execute(int thread, int loop) throws Exception
+      {
+         POJO.staticMethodNoAdvice();
+      }
+   }
+   
+   public void testNonStaticWovenNoAdvice() throws Exception
+   {
+      getRunner().executeScenario(new NonStaticWovenNoAdviceScenario());
+   }
+
+   private class NonStaticWovenNoAdviceScenario extends AbstractScenario
+   {
+      POJO pojo = new POJO();
+      public void execute(int thread, int loop) throws Exception
+      {
+         pojo.nonStaticMethodNoAdvice();
+      }
+   }
+   
+   public void testNonStaticWithOneInterceptor() throws Exception
+   {
+      POJO pojo = new POJO();
+      PlainInterceptor.called = 0;
+      pojo.oneInterceptor();
+      assertEquals(1, PlainInterceptor.called);
+      getRunner().executeScenario(new NonStaticWithOneInterceptorScenario());
+   }
+   
+   private class NonStaticWithOneInterceptorScenario extends AbstractScenario
+   {
+      POJO pojo = new POJO();
+      public void execute(int thread, int loop) throws Exception
+      {
+         pojo.oneInterceptor();
+      }
+   }
+   
+   public void testNonStaticWithFiveInterceptors() throws Exception
+   {
+      POJO pojo = new POJO();
+      PlainInterceptor.called = 0;
+      pojo.fiveInterceptors();
+      assertEquals(5, PlainInterceptor.called);
+      getRunner().executeScenario(new NonStaticWithFiveInterceptorsScenario());
+   }
+   
+   private class NonStaticWithFiveInterceptorsScenario extends AbstractScenario
+   {
+      POJO pojo = new POJO();
+      public void execute(int thread, int loop) throws Exception
+      {
+         pojo.fiveInterceptors();
+      }
+   }   
+   
+   public void testNonStaticWithOneAdvice() throws Exception
+   {
+      POJO pojo = new POJO();
+      PlainAspect.called = 0;
+      pojo.oneAdvice();
+      assertEquals(1, PlainAspect.called);
+      getRunner().executeScenario(new NonStaticWithOneAdviceScenario());
+   }
+   
+   private class NonStaticWithOneAdviceScenario extends AbstractScenario
+   {
+      POJO pojo = new POJO();
+      public void execute(int thread, int loop) throws Exception
+      {
+         pojo.oneAdvice();
+      }
+   }
+   
+   public void testNonStaticWithFiveAdvices() throws Exception
+   {
+      POJO pojo = new POJO();
+      PlainAspect.called = 0;
+      pojo.fiveAdvices();
+      assertEquals(5, PlainAspect.called);
+      getRunner().executeScenario(new NonStaticWithFiveAdvicesScenario());
+   }
+   
+   private class NonStaticWithFiveAdvicesScenario extends AbstractScenario
+   {
+      POJO pojo = new POJO();
+      public void execute(int thread, int loop) throws Exception
+      {
+         pojo.fiveAdvices();
+      }
+   }   
+}

Added: branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/methodinvocation/POJO.java
===================================================================
--- branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/methodinvocation/POJO.java	                        (rev 0)
+++ branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/methodinvocation/POJO.java	2007-06-15 00:11:33 UTC (rev 63534)
@@ -0,0 +1,66 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.aop.stress.methodinvocation;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class POJO
+{
+   public static void staticMethodNoAdvice()
+   {
+      
+   }
+   
+   public void nonStaticMethodNoAdvice()
+   {
+      
+   }
+   
+   public void oneInterceptor()
+   {
+      
+   }
+   
+   public void fiveInterceptors()
+   {
+      
+   }
+   
+   public void oneAdvice()
+   {
+      
+   }
+   
+   public void fiveAdvices()
+   {
+      
+   }
+   
+   public static void generateStackTrace()
+   {
+      //Look at the depth of the call stack for different weaving types
+      new Exception("CALL STACK - INFO ONLY").printStackTrace();
+   }
+}

Added: branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/methodinvocation/PlainAspect.java
===================================================================
--- branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/methodinvocation/PlainAspect.java	                        (rev 0)
+++ branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/methodinvocation/PlainAspect.java	2007-06-15 00:11:33 UTC (rev 63534)
@@ -0,0 +1,65 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors. 
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.aop.stress.methodinvocation;
+
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class PlainAspect
+{
+   public static int called;
+   
+   public Object one(Invocation invocation) throws Throwable
+   {
+      called++;
+      return invocation.invokeNext();
+   }
+   
+   public Object two(Invocation invocation) throws Throwable
+   {
+      called++;
+      return invocation.invokeNext();
+   }
+   
+   public Object three(Invocation invocation) throws Throwable
+   {
+      called++;
+      return invocation.invokeNext();
+   }
+   
+   public Object four(Invocation invocation) throws Throwable
+   {
+      called++;
+      return invocation.invokeNext();
+   }
+   
+   public Object five(Invocation invocation) throws Throwable
+   {
+      called++;
+      return invocation.invokeNext();
+   }
+   
+}

Added: branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/methodinvocation/PlainInterceptor.java
===================================================================
--- branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/methodinvocation/PlainInterceptor.java	                        (rev 0)
+++ branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/methodinvocation/PlainInterceptor.java	2007-06-15 00:11:33 UTC (rev 63534)
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors. 
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.aop.stress.methodinvocation;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class PlainInterceptor implements Interceptor
+{
+   public static int called;
+   public String getName()
+   {
+      return this.getClass().getName();
+   }
+
+   public Object invoke(Invocation invocation) throws Throwable
+   {
+      called++;
+      return invocation.invokeNext();
+   }
+   
+}

Added: branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocation/POJO.java
===================================================================
--- branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocation/POJO.java	                        (rev 0)
+++ branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocation/POJO.java	2007-06-15 00:11:33 UTC (rev 63534)
@@ -0,0 +1,33 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors. 
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.aop.stress.perinstancemethodinvocation;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class POJO
+{
+   public void method1() {}
+   public void method2() {}
+}

Added: branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocation/PerInstanceAspect.java
===================================================================
--- branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocation/PerInstanceAspect.java	                        (rev 0)
+++ branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocation/PerInstanceAspect.java	2007-06-15 00:11:33 UTC (rev 63534)
@@ -0,0 +1,41 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors. 
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.aop.stress.perinstancemethodinvocation;
+
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class PerInstanceAspect
+{
+   public static int called;
+
+   public Object invoke(Invocation invocation) throws Throwable
+   {
+      called++;
+      return invocation.invokeNext();
+   }
+
+}

Added: branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocation/PerInstanceInterceptor.java
===================================================================
--- branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocation/PerInstanceInterceptor.java	                        (rev 0)
+++ branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocation/PerInstanceInterceptor.java	2007-06-15 00:11:33 UTC (rev 63534)
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors. 
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.aop.stress.perinstancemethodinvocation;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class PerInstanceInterceptor implements Interceptor
+{
+   public static int called;
+
+   public String getName()
+   {
+      return PerInstanceInterceptor.class.getName();
+   }
+
+   public Object invoke(Invocation invocation) throws Throwable
+   {
+      called++;
+      return invocation.invokeNext();
+   }
+}

Added: branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocation/PerInstanceTestCase.java
===================================================================
--- branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocation/PerInstanceTestCase.java	                        (rev 0)
+++ branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocation/PerInstanceTestCase.java	2007-06-15 00:11:33 UTC (rev 63534)
@@ -0,0 +1,117 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors. 
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.aop.stress.perinstancemethodinvocation;
+
+import org.jboss.test.aop.stress.AbstractScenario;
+import org.jboss.test.aop.stress.ScenarioTest;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class PerInstanceTestCase extends ScenarioTest
+{
+   public static void main(String[] args)
+   {
+      junit.textui.TestRunner.run(PerInstanceTestCase.class);
+   }
+
+   public PerInstanceTestCase(String name)
+   {
+      // FIXME PerInstanceTestCase constructor
+      super(name);
+   }
+
+   public void testPerInstanceInterceptor() throws Exception
+   {
+      POJO pojo = new POJO();
+      PerInstanceInterceptor.called = 0;
+      pojo.method1();
+      assertEquals(1, PerInstanceInterceptor.called);
+      getRunner().executeScenario(new PerInstanceInterceptorScenario());
+   }
+   
+   private class PerInstanceInterceptorScenario extends AbstractScenario
+   {
+      POJO pojo = new POJO();
+      public void execute(int thread, int loop) throws Exception
+      {
+         pojo.method1();
+      }
+   }
+
+   public void testPerInstanceAspect() throws Exception
+   {
+      POJO pojo = new POJO();
+      PerInstanceAspect.called = 0;
+      pojo.method2();
+      assertEquals(1, PerInstanceAspect.called);
+      getRunner().executeScenario(new PerInstanceAspectScenario());
+   }
+   
+   private class PerInstanceAspectScenario extends AbstractScenario
+   {
+      POJO pojo = new POJO();
+      public void execute(int thread, int loop) throws Exception
+      {
+         pojo.method2();
+      }
+   }
+
+   public void testPerInstanceInterceptorRepeatInstantiation() throws Exception
+   {
+      POJO pojo = new POJO();
+      PerInstanceInterceptor.called = 0;
+      pojo.method1();
+      pojo.method1();
+      assertEquals(2, PerInstanceInterceptor.called);
+      getRunner().executeScenario(new PerInstanceInterceptorRepeatInstantiationScenario());
+   }
+   
+   private class PerInstanceInterceptorRepeatInstantiationScenario extends AbstractScenario
+   {
+      public void execute(int thread, int loop) throws Exception
+      {
+         POJO pojo = new POJO();
+         pojo.method1();
+      }
+   }
+
+   public void testPerInstanceAspectRepeatInstantiation() throws Exception
+   {
+      POJO pojo = new POJO();
+      PerInstanceAspect.called = 0;
+      pojo.method2();
+      assertEquals(1, PerInstanceAspect.called);
+      getRunner().executeScenario(new PerInstanceAspectRepeatInstantiationScenario());
+   }
+   
+   private class PerInstanceAspectRepeatInstantiationScenario extends AbstractScenario
+   {
+      public void execute(int thread, int loop) throws Exception
+      {
+         POJO pojo = new POJO();
+         pojo.method2();
+      }
+   }
+}

Added: branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocationmanybindings/POJO.java
===================================================================
--- branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocationmanybindings/POJO.java	                        (rev 0)
+++ branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocationmanybindings/POJO.java	2007-06-15 00:11:33 UTC (rev 63534)
@@ -0,0 +1,105 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors. 
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class POJO
+{
+   public int field1;
+   public int field2;
+   public int field3;
+   public int field4;
+   public int field5;
+   public int field6;
+   public int field7;
+   public int field8;
+   public int field9;
+   public int field10;
+   public int field11;
+   public int field12;
+
+   public POJO() {
+      
+   }
+   
+   public POJO(int i) {
+      
+   }
+   
+   public POJO(int i, int i2) {
+      
+   }
+
+   public POJO(int i, int i2, int i3) {
+      
+   }
+   
+   public POJO(int i, int i2, int i3, int i4) {
+      
+   }
+   
+   
+   public POJO(int i, int i2, int i3, int i4, int i5) {
+      
+   }
+   
+   public POJO(int i, int i2, int i3, int i4, int i5, int i6) {
+      
+   }
+   
+   public POJO(int i, int i2, int i3, int i4, int i5, int i6, int i8) {
+      
+   }
+   
+   public POJO(int i, int i2, int i3, int i4, int i5, int i6, int i8, int i9) {
+      
+   }
+   
+   public POJO(int i, int i2, int i3, int i4, int i5, int i6, int i8, int i9, int i10) {
+      
+   }
+
+   public POJO(int i, int i2, int i3, int i4, int i5, int i6, int i8, int i9, int i10, int i11) {
+      
+   }
+   
+   public POJO(int i, int i2, int i3, int i4, int i5, int i6, int i8, int i9, int i10, int i11, int i12) {
+      
+   }
+   
+   public void method1() {}
+   public void method2() {}
+   public void method3() {}
+   public void method4() {}
+   public void method5() {}
+   public void method6() {}
+   public void method7() {}
+   public void method8() {}
+   public void method9() {}
+   public void method10() {}
+   public void method11() {}
+   public void method12() {}
+}

Added: branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocationmanybindings/PerInstanceInterceptor.java
===================================================================
--- branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocationmanybindings/PerInstanceInterceptor.java	                        (rev 0)
+++ branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocationmanybindings/PerInstanceInterceptor.java	2007-06-15 00:11:33 UTC (rev 63534)
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors. 
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class PerInstanceInterceptor implements Interceptor
+{
+   public static int called;
+
+   public String getName()
+   {
+      return PerInstanceInterceptor.class.getName();
+   }
+
+   public Object invoke(Invocation invocation) throws Throwable
+   {
+      called++;
+      return invocation.invokeNext();
+   }
+}

Added: branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocationmanybindings/PerInstanceTestCase.java
===================================================================
--- branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocationmanybindings/PerInstanceTestCase.java	                        (rev 0)
+++ branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocationmanybindings/PerInstanceTestCase.java	2007-06-15 00:11:33 UTC (rev 63534)
@@ -0,0 +1,167 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors. 
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings;
+
+import org.jboss.test.aop.stress.AbstractScenario;
+import org.jboss.test.aop.stress.ScenarioTest;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class PerInstanceTestCase extends ScenarioTest
+{
+   public static void main(String[] args)
+   {
+      junit.textui.TestRunner.run(PerInstanceTestCase.class);
+   }
+
+   public PerInstanceTestCase(String name)
+   {
+      // FIXME PerInstanceTestCase constructor
+      super(name);
+   }
+
+   public void testPerInstanceInterceptorRepeatInstantiation() throws Exception
+   {
+      PerInstanceInterceptor.called = 0;
+      PerVmInterceptor.called = 0;
+      POJO pojo = new POJO();
+      assertEquals(1, PerVmInterceptor.called);
+      assertEquals(0, PerInstanceInterceptor.called);
+      
+      PerInstanceInterceptor.called = 0;
+      PerVmInterceptor.called = 0;
+      POJO pojo1 = new POJO(1);
+      assertEquals(1, PerVmInterceptor.called);
+      assertEquals(0, PerInstanceInterceptor.called);
+      
+      PerInstanceInterceptor.called = 0;
+      PerVmInterceptor.called = 0;
+      POJO pojo2 = new POJO(1, 1);
+      assertEquals(1, PerVmInterceptor.called);
+      assertEquals(0, PerInstanceInterceptor.called);
+      
+      PerInstanceInterceptor.called = 0;
+      PerVmInterceptor.called = 0;
+      POJO pojo3 = new POJO(1, 1, 1);
+      assertEquals(1, PerVmInterceptor.called);
+      assertEquals(0, PerInstanceInterceptor.called);
+      
+      PerInstanceInterceptor.called = 0;
+      PerVmInterceptor.called = 0;
+      POJO pojo4 = new POJO(1, 1, 1, 1);
+      assertEquals(1, PerVmInterceptor.called);
+      assertEquals(0, PerInstanceInterceptor.called);
+      
+      PerInstanceInterceptor.called = 0;
+      PerVmInterceptor.called = 0;
+      POJO pojo5 = new POJO(1, 1, 1, 1, 1);
+      assertEquals(1, PerVmInterceptor.called);
+      assertEquals(0, PerInstanceInterceptor.called);
+      
+      PerInstanceInterceptor.called = 0;
+      PerVmInterceptor.called = 0;
+      POJO pojo6 = new POJO(1, 1, 1, 1, 1, 1);
+      assertEquals(1, PerVmInterceptor.called);
+      assertEquals(0, PerInstanceInterceptor.called);
+      
+      PerInstanceInterceptor.called = 0;
+      PerVmInterceptor.called = 0;
+      POJO pojo7 = new POJO(1, 1, 1, 1, 1, 1, 1);
+      assertEquals(1, PerVmInterceptor.called);
+      assertEquals(0, PerInstanceInterceptor.called);
+      
+      PerInstanceInterceptor.called = 0;
+      PerVmInterceptor.called = 0;
+      POJO pojo8 = new POJO(1, 1, 1, 1, 1, 1, 1, 1);
+      assertEquals(1, PerVmInterceptor.called);
+      assertEquals(0, PerInstanceInterceptor.called);
+      
+      PerInstanceInterceptor.called = 0;
+      PerVmInterceptor.called = 0;
+      POJO pojo9 = new POJO(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+      assertEquals(1, PerVmInterceptor.called);
+      assertEquals(0, PerInstanceInterceptor.called);
+      
+      
+      PerInstanceInterceptor.called = 0;
+      PerVmInterceptor.called = 0;
+      pojo.method1();
+      pojo.method2();
+      pojo.method3();
+      pojo.method4();
+      pojo.method5();
+      pojo.method6();
+      pojo.method7();
+      pojo.method8();
+      pojo.method9();
+      pojo.method10();
+      pojo.method11();
+      pojo.method12();
+      assertEquals(0, PerVmInterceptor.called);
+      assertEquals(12, PerInstanceInterceptor.called);
+      
+      PerInstanceInterceptor.called = 0;
+      PerVmInterceptor.called = 0;
+      pojo.field1 = 1;
+      pojo.field2 = 2;
+      pojo.field3 = 3;
+      pojo.field4 = 4;
+      pojo.field5 = 5;
+      pojo.field6 = 6;
+      pojo.field7 = 7;
+      pojo.field8 = 8;
+      pojo.field9 = 9;
+      pojo.field10 = 10;
+      pojo.field11 = 11;
+      pojo.field12 = 12;
+      assertEquals(1, pojo.field1);
+      assertEquals(2, pojo.field2);
+      assertEquals(3, pojo.field3);
+      assertEquals(4, pojo.field4);
+      assertEquals(5, pojo.field5);
+      assertEquals(6, pojo.field6);
+      assertEquals(7, pojo.field7);
+      assertEquals(8, pojo.field8);
+      assertEquals(9, pojo.field9);
+      assertEquals(10, pojo.field10);
+      assertEquals(11, pojo.field11);
+      assertEquals(12, pojo.field12);
+      assertEquals(0, PerVmInterceptor.called);
+      assertEquals(24, PerInstanceInterceptor.called);
+      
+      getRunner().executeScenario(new PerInstanceInterceptorRepeatInstantiationScenario());
+   }
+   
+   private class PerInstanceInterceptorRepeatInstantiationScenario extends AbstractScenario
+   {
+      public void execute(int thread, int loop) throws Exception
+      {
+         POJO pojo = new POJO();
+         pojo.method1();
+//         pojo.field1 = 10;
+//         int i = pojo.field1;
+      }
+   }
+}

Added: branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocationmanybindings/PerVmInterceptor.java
===================================================================
--- branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocationmanybindings/PerVmInterceptor.java	                        (rev 0)
+++ branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/perinstancemethodinvocationmanybindings/PerVmInterceptor.java	2007-06-15 00:11:33 UTC (rev 63534)
@@ -0,0 +1,46 @@
+/*
+* JBoss, Home of Professional Open Source.
+* Copyright 2006, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors. 
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.aop.stress.perinstancemethodinvocationmanybindings;
+
+import org.jboss.aop.advice.Interceptor;
+import org.jboss.aop.joinpoint.Invocation;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class PerVmInterceptor implements Interceptor
+{
+   public static int called;
+
+   public String getName()
+   {
+      return PerInstanceInterceptor.class.getName();
+   }
+
+   public Object invoke(Invocation invocation) throws Throwable
+   {
+      called++;
+      return invocation.invokeNext();
+   }
+}

Added: branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/simple/LargePojo.java
===================================================================
--- branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/simple/LargePojo.java	                        (rev 0)
+++ branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/simple/LargePojo.java	2007-06-15 00:11:33 UTC (rev 63534)
@@ -0,0 +1,590 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.aop.stress.simple;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.net.URL;
+import java.nio.IntBuffer;
+import java.sql.Blob;
+
+import javassist.NotFoundException;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 45109 $
+ */
+public class LargePojo
+{
+   //Add loads of fields and methods to try to make this slow to load up so we get synchronization issues 
+   private String f1;
+   private Integer f2;
+   private Long f3;
+   private InputStream f4;
+   private OutputStream f5;
+   private Boolean f6;
+   private Character f7;
+   private CharSequence f8;
+   private Double f9;
+   private Float f10;
+   private PrintWriter f11;
+   private URL f12;
+   private Byte f13;
+   private Blob f14;
+   private IntBuffer f15;
+   private Exception f16;
+   private IOException f17;
+   private NotFoundException f18;
+   private IllegalAccessException f19;
+   private IllegalAccessError f20;
+   private IllegalArgumentException f21;
+   private IllegalMonitorStateException f22;
+   private IllegalThreadStateException f23;
+   private NoClassDefFoundError f24;
+   private NoSuchFieldError f25;
+   private NoSuchMethodError f26;
+   
+   public NoSuchMethodError field; //This is the one we will check for
+
+   public void method( 
+         String f1,
+         Integer f2,
+         Long f3,
+         InputStream f4,
+         OutputStream f5,
+         Boolean f6,
+         Character f7,
+         CharSequence f8,
+         Double f9,
+         Float f10,
+         PrintWriter f11,
+         URL f12,
+         Byte f13,
+         Blob f14,
+         IntBuffer f15,
+         Exception f16,
+         IOException f17,
+         NotFoundException f18,
+         IllegalAccessException f19,
+         IllegalAccessError f20,
+         IllegalArgumentException f21,
+         IllegalMonitorStateException f22,
+         IllegalThreadStateException f23,
+         NoClassDefFoundError f24,
+         NoSuchFieldError f25,
+         NoSuchMethodError f26
+         )
+   {
+      
+   }
+
+   public void method(
+         String f1,
+         Integer f2,
+         Long f3,
+         InputStream f4,
+         OutputStream f5,
+         Boolean f6,
+         Character f7,
+         CharSequence f8,
+         Double f9,
+         Float f10,
+         PrintWriter f11,
+         URL f12,
+         Byte f13,
+         Blob f14,
+         IntBuffer f15,
+         Exception f16,
+         IOException f17,
+         NotFoundException f18,
+         IllegalAccessException f19,
+         IllegalAccessError f20,
+         IllegalArgumentException f21,
+         IllegalMonitorStateException f22,
+         IllegalThreadStateException f23,
+         NoClassDefFoundError f24,
+         NoSuchFieldError f25
+         )
+   {
+      
+   }
+
+   public void method(
+         String f1,
+         Integer f2,
+         Long f3,
+         InputStream f4,
+         OutputStream f5,
+         Boolean f6,
+         Character f7,
+         CharSequence f8,
+         Double f9,
+         Float f10,
+         PrintWriter f11,
+         URL f12,
+         Byte f13,
+         Blob f14,
+         IntBuffer f15,
+         Exception f16,
+         IOException f17,
+         NotFoundException f18,
+         IllegalAccessException f19,
+         IllegalAccessError f20,
+         IllegalArgumentException f21,
+         IllegalMonitorStateException f22,
+         IllegalThreadStateException f23,
+         NoClassDefFoundError f24
+         )
+   {
+      
+   }
+
+   public void method(
+         String f1,
+         Integer f2,
+         Long f3,
+         InputStream f4,
+         OutputStream f5,
+         Boolean f6,
+         Character f7,
+         CharSequence f8,
+         Double f9,
+         Float f10,
+         PrintWriter f11,
+         URL f12,
+         Byte f13,
+         Blob f14,
+         IntBuffer f15,
+         Exception f16,
+         IOException f17,
+         NotFoundException f18,
+         IllegalAccessException f19,
+         IllegalAccessError f20,
+         IllegalArgumentException f21,
+         IllegalMonitorStateException f22,
+         IllegalThreadStateException f23
+         )
+   {
+      
+   }
+
+   public void method(
+         String f1,
+         Integer f2,
+         Long f3,
+         InputStream f4,
+         OutputStream f5,
+         Boolean f6,
+         Character f7,
+         CharSequence f8,
+         Double f9,
+         Float f10,
+         PrintWriter f11,
+         URL f12,
+         Byte f13,
+         Blob f14,
+         IntBuffer f15,
+         Exception f16,
+         IOException f17,
+         NotFoundException f18,
+         IllegalAccessException f19,
+         IllegalAccessError f20,
+         IllegalArgumentException f21,
+         IllegalMonitorStateException f22
+         )
+   {
+      
+   }
+
+   public void method(
+         String f1,
+         Integer f2,
+         Long f3,
+         InputStream f4,
+         OutputStream f5,
+         Boolean f6,
+         Character f7,
+         CharSequence f8,
+         Double f9,
+         Float f10,
+         PrintWriter f11,
+         URL f12,
+         Byte f13,
+         Blob f14,
+         IntBuffer f15,
+         Exception f16,
+         IOException f17,
+         NotFoundException f18,
+         IllegalAccessException f19,
+         IllegalAccessError f20,
+         IllegalArgumentException f21
+         )
+   {
+      
+   }
+   
+
+   public void method(
+         String f1,
+         Integer f2,
+         Long f3,
+         InputStream f4,
+         OutputStream f5,
+         Boolean f6,
+         Character f7,
+         CharSequence f8,
+         Double f9,
+         Float f10,
+         PrintWriter f11,
+         URL f12,
+         Byte f13,
+         Blob f14,
+         IntBuffer f15,
+         Exception f16,
+         IOException f17,
+         NotFoundException f18,
+         IllegalAccessException f19,
+         IllegalAccessError f20
+         )
+   {
+      
+   }
+
+   public void method(
+         String f1,
+         Integer f2,
+         Long f3,
+         InputStream f4,
+         OutputStream f5,
+         Boolean f6,
+         Character f7,
+         CharSequence f8,
+         Double f9,
+         Float f10,
+         PrintWriter f11,
+         URL f12,
+         Byte f13,
+         Blob f14,
+         IntBuffer f15,
+         Exception f16,
+         IOException f17,
+         NotFoundException f18,
+         IllegalAccessException f19
+         )
+   {
+      
+   }
+
+   public void method(
+         String f1,
+         Integer f2,
+         Long f3,
+         InputStream f4,
+         OutputStream f5,
+         Boolean f6,
+         Character f7,
+         CharSequence f8,
+         Double f9,
+         Float f10,
+         PrintWriter f11,
+         URL f12,
+         Byte f13,
+         Blob f14,
+         IntBuffer f15,
+         Exception f16,
+         IOException f17,
+         NotFoundException f18
+         )
+   {
+      
+   }
+
+   public void method(
+         String f1,
+         Integer f2,
+         Long f3,
+         InputStream f4,
+         OutputStream f5,
+         Boolean f6,
+         Character f7,
+         CharSequence f8,
+         Double f9,
+         Float f10,
+         PrintWriter f11,
+         URL f12,
+         Byte f13,
+         Blob f14,
+         IntBuffer f15,
+         Exception f16,
+         IOException f17
+         )
+   {
+      
+   }
+   public void method(
+         String f1,
+         Integer f2,
+         Long f3,
+         InputStream f4,
+         OutputStream f5,
+         Boolean f6,
+         Character f7,
+         CharSequence f8,
+         Double f9,
+         Float f10,
+         PrintWriter f11,
+         URL f12,
+         Byte f13,
+         Blob f14,
+         IntBuffer f15,
+         Exception f16
+         )
+   {
+      
+   }
+   
+
+   public void method(
+         String f1,
+         Integer f2,
+         Long f3,
+         InputStream f4,
+         OutputStream f5,
+         Boolean f6,
+         Character f7,
+         CharSequence f8,
+         Double f9,
+         Float f10,
+         PrintWriter f11,
+         URL f12,
+         Byte f13,
+         Blob f14,
+         IntBuffer f15
+         )
+   {
+      
+   }   
+   
+   
+
+   public void method(
+         String f1,
+         Integer f2,
+         Long f3,
+         InputStream f4,
+         OutputStream f5,
+         Boolean f6,
+         Character f7,
+         CharSequence f8,
+         Double f9,
+         Float f10,
+         PrintWriter f11,
+         URL f12,
+         Byte f13,
+         Blob f14
+         )
+   {
+      
+   }   
+   
+   
+
+   public void method(
+         String f1,
+         Integer f2,
+         Long f3,
+         InputStream f4,
+         OutputStream f5,
+         Boolean f6,
+         Character f7,
+         CharSequence f8,
+         Double f9,
+         Float f10,
+         PrintWriter f11,
+         URL f12,
+         Byte f13
+         )
+   {
+      
+   }   
+   
+
+   public void method(
+         String f1,
+         Integer f2,
+         Long f3,
+         InputStream f4,
+         OutputStream f5,
+         Boolean f6,
+         Character f7,
+         CharSequence f8,
+         Double f9,
+         Float f10,
+         PrintWriter f11,
+         URL f12
+         )
+   {
+      
+   }  
+   
+
+   public void method(
+         String f1,
+         Integer f2,
+         Long f3,
+         InputStream f4,
+         OutputStream f5,
+         Boolean f6,
+         Character f7,
+         CharSequence f8,
+         Double f9,
+         Float f10,
+         PrintWriter f11
+         )
+   {
+      
+   }   
+   public void method(
+         String f1,
+         Integer f2,
+         Long f3,
+         InputStream f4,
+         OutputStream f5,
+         Boolean f6,
+         Character f7,
+         CharSequence f8,
+         Double f9,
+         Float f10
+         )
+   {
+      
+   }   
+ 
+   public void method(
+         String f1,
+         Integer f2,
+         Long f3,
+         InputStream f4,
+         OutputStream f5,
+         Boolean f6,
+         Character f7,
+         CharSequence f8,
+         Double f9
+         )
+   {
+      
+   }   
+ 
+   public void method(
+         String f1,
+         Integer f2,
+         Long f3,
+         InputStream f4,
+         OutputStream f5,
+         Boolean f6,
+         Character f7,
+         CharSequence f8
+         )
+   {
+      
+   }   
+      
+   public void method(
+         String f1,
+         Integer f2,
+         Long f3,
+         InputStream f4,
+         OutputStream f5,
+         Boolean f6,
+         Character f7
+         )
+   {
+      
+   }   
+      
+   public void method(
+         String f1,
+         Integer f2,
+         Long f3,
+         InputStream f4,
+         OutputStream f5,
+         Boolean f6
+         )
+   {
+      
+   }   
+ 
+   public void method(
+         String f1,
+         Integer f2,
+         Long f3,
+         InputStream f4,
+         OutputStream f5
+         )
+   {
+      
+   }   
+   
+   public void method(
+         String f1,
+         Integer f2,
+         Long f3,
+         InputStream f4
+         )
+   {
+      
+   }
+   
+   public void method(
+         String f1,
+         Integer f2,
+         Long f3
+         )
+   {
+      
+   }   
+      
+   public void method(
+         String f1,
+         Integer f2
+         )
+   {
+      
+   }   
+ 
+   public void method(
+         String f1
+         )
+   {
+      
+   }   
+   
+   //This is the one we will check for
+   public void method()
+   {
+      
+   }   
+   
+}
\ No newline at end of file

Added: branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/simple/SimpleReflectToJavassistTestCase.java
===================================================================
--- branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/simple/SimpleReflectToJavassistTestCase.java	                        (rev 0)
+++ branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/simple/SimpleReflectToJavassistTestCase.java	2007-06-15 00:11:33 UTC (rev 63534)
@@ -0,0 +1,116 @@
+/*
+  * JBoss, Home of Professional Open Source
+  * Copyright 2005, JBoss Inc., and individual contributors as indicated
+  * by the @authors tag. See the copyright.txt in the distribution for a
+  * full listing of individual contributors.
+  *
+  * This is free software; you can redistribute it and/or modify it
+  * under the terms of the GNU Lesser General Public License as
+  * published by the Free Software Foundation; either version 2.1 of
+  * the License, or (at your option) any later version.
+  *
+  * This software is distributed in the hope that it will be useful,
+  * but WITHOUT ANY WARRANTY; without even the implied warranty of
+  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+  * Lesser General Public License for more details.
+  *
+  * You should have received a copy of the GNU Lesser General Public
+  * License along with this software; if not, write to the Free
+  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+  * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+  */
+package org.jboss.test.aop.stress.simple;
+
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+
+import org.jboss.aop.util.ReflectToJavassist;
+import org.jboss.test.aop.stress.AbstractScenario;
+import org.jboss.test.aop.stress.Scenario;
+import org.jboss.test.aop.stress.ScenarioTest;
+
+/**
+ * Primarily to make sure I got everything right for the generated advisors
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 61751 $
+ */
+public class SimpleReflectToJavassistTestCase extends ScenarioTest
+{
+   
+   public static void main(String[] args)
+   {
+      junit.textui.TestRunner.run(SimpleReflectToJavassistTestCase.class);
+   }
+
+   
+   public SimpleReflectToJavassistTestCase(String name) throws Exception
+   {
+      super(name);
+   }
+
+   public void testException() throws Exception
+   {
+      boolean exception = false;
+      try
+      {
+         getRunner().executeScenario(new ExceptionScenario());
+      }
+      catch (Exception e)
+      {
+         exception = true;
+      }
+      
+      assertTrue(exception);
+   }
+   
+   public void testAnnotationsUnderStress() throws Exception
+   {
+      Scenario[] scenarios = new Scenario[] {
+        new SimpleClassToJavassistScenario(),
+        new SimpleFieldToJavassistScenario(),
+        new SimpleMethodToJavassistScenario()};
+      
+      getRunner().executeScenarios(scenarios);
+   }
+
+   private class ExceptionScenario extends AbstractScenario
+   {
+      public void execute(int thread, int loop) throws Exception
+      {
+         if (thread == 0 && loop == 1)
+         {
+            System.out.println("Throwing exception!!!!");
+            throw new Exception("Thrown Exception");
+         }
+      }
+      
+   }
+   private class SimpleClassToJavassistScenario extends AbstractScenario
+   {
+      public void execute(int thread, int loop) throws Exception
+      {
+         Class pojo = LargePojo.class;
+         ReflectToJavassist.classToJavassist(pojo);
+      }
+   }
+
+   private class SimpleMethodToJavassistScenario extends AbstractScenario
+   {
+      public void execute(int thread, int loop) throws Exception
+      {
+         Class pojo = LargePojo.class;
+         Method m = pojo.getMethod("method", new Class[0]);
+         ReflectToJavassist.methodToJavassist(m);
+      }
+   }
+
+   private class SimpleFieldToJavassistScenario extends AbstractScenario
+   {
+      public void execute(int thread, int loop) throws Exception
+      {
+         Class pojo = LargePojo.class;
+         Field f = pojo.getField("field");
+         ReflectToJavassist.fieldToJavassist(f);
+      }
+   }
+}

Added: branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/simple/Test.java
===================================================================
--- branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/simple/Test.java	                        (rev 0)
+++ branches/Branch_AOP_1_5/aop/src/test/org/jboss/test/aop/stress/simple/Test.java	2007-06-15 00:11:33 UTC (rev 63534)
@@ -0,0 +1,32 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/ 
+package org.jboss.test.aop.stress.simple;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 45109 $
+ */
+public interface Test
+{
+
+}

Modified: branches/Branch_AOP_1_5/build/build.xml
===================================================================
--- branches/Branch_AOP_1_5/build/build.xml	2007-06-14 20:39:25 UTC (rev 63533)
+++ branches/Branch_AOP_1_5/build/build.xml	2007-06-15 00:11:33 UTC (rev 63534)
@@ -95,6 +95,7 @@
       <!-- Modules -->
       <module name="aop"/>
       <module name="common"/>
+      <module name="test"/>
 
       <!-- Module groups -->
 
@@ -106,7 +107,7 @@
       </group>
 
       <group name="core">
-        <include modules="common, aop"/>
+        <include modules="common, test, aop"/>
       </group>
 
       <!-- Module group sets -->

Modified: branches/Branch_AOP_1_5/test/.classpath
===================================================================
--- branches/Branch_AOP_1_5/test/.classpath	2007-06-14 20:39:25 UTC (rev 63533)
+++ branches/Branch_AOP_1_5/test/.classpath	2007-06-15 00:11:33 UTC (rev 63534)
@@ -5,7 +5,6 @@
 	<classpathentry kind="lib" path="/thirdparty/apache-log4j/lib/log4j.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/junit/lib/junit.jar"/>
 	<classpathentry kind="src" path="/common"/>
-	<classpathentry kind="src" path="/j2se"/>
 	<classpathentry kind="lib" path="/tools/lib/ant.jar"/>
 	<classpathentry kind="lib" path="/thirdparty/jboss/profiler/jvmti/lib/jboss-profiler-jvmti.jar"/>
 	<classpathentry kind="output" path="output/eclipse-classes"/>

Modified: branches/Branch_AOP_1_5/test/build.xml
===================================================================
--- branches/Branch_AOP_1_5/test/build.xml	2007-06-14 20:39:25 UTC (rev 63533)
+++ branches/Branch_AOP_1_5/test/build.xml	2007-06-15 00:11:33 UTC (rev 63534)
@@ -79,7 +79,6 @@
       <!-- The combined dependent module classpath -->
       <path id="dependentmodule.classpath">
          <path refid="jboss.common.classpath"/>
-         <path refid="jboss.j2se.classpath"/>
          <path refid="jboss.profiler.jvmti.classpath"/>
       </path>
 

Modified: branches/Branch_AOP_1_5/test/src/main/org/jboss/test/JBossIIOPTestCase.java
===================================================================
--- branches/Branch_AOP_1_5/test/src/main/org/jboss/test/JBossIIOPTestCase.java	2007-06-14 20:39:25 UTC (rev 63533)
+++ branches/Branch_AOP_1_5/test/src/main/org/jboss/test/JBossIIOPTestCase.java	2007-06-15 00:11:33 UTC (rev 63534)
@@ -56,9 +56,9 @@
       return new InitialContext(jndiProps);
    }
    
-   protected InitialContext getInitialJnpContext() throws Exception
-   {
-      return super.getInitialContext();
-   }
+//   protected InitialContext getInitialJnpContext() throws Exception
+//   {
+//      return super.getInitialContext();
+//   }
 
 }

Modified: branches/Branch_AOP_1_5/test/src/main/org/jboss/test/JBossTestCase.java
===================================================================
--- branches/Branch_AOP_1_5/test/src/main/org/jboss/test/JBossTestCase.java	2007-06-14 20:39:25 UTC (rev 63533)
+++ branches/Branch_AOP_1_5/test/src/main/org/jboss/test/JBossTestCase.java	2007-06-15 00:11:33 UTC (rev 63534)
@@ -23,16 +23,16 @@
 
 import java.net.MalformedURLException;
 import java.net.URL;
-import java.util.StringTokenizer;
-
-import javax.management.MBeanServerConnection;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import javax.naming.InitialContext;
-
-import junit.framework.Test;
+//import java.util.StringTokenizer;
+//
+//import javax.management.MBeanServerConnection;
+//import javax.management.MalformedObjectNameException;
+//import javax.management.ObjectName;
+//import javax.naming.InitialContext;
+//
+//import junit.framework.Test;
 import junit.framework.TestCase;
-import junit.framework.TestSuite;
+//import junit.framework.TestSuite;
 
 import org.apache.log4j.Logger;
 
@@ -82,7 +82,7 @@
       delegate = new JBossTestServices(getClass().getName());
       try
       {
-         delegate.init();
+//         delegate.init();
       }
       catch (Exception e)
       {
@@ -93,7 +93,7 @@
    {
       try
       {
-         delegate.reinit();
+//         delegate.reinit();
       }
       catch(Exception e)
       {
@@ -112,12 +112,12 @@
     *
     * @exception Exception  Description of Exception
     */
-   public void serverFound() throws Exception
-   {
-      if (deploymentException != null)
-         throw deploymentException;
-      assertTrue("Server was not found", getServer() != null);
-   }
+//   public void serverFound() throws Exception
+//   {
+//      if (deploymentException != null)
+//         throw deploymentException;
+//      assertTrue("Server was not found", getServer() != null);
+//   }
 
    //protected---------
 
@@ -126,20 +126,20 @@
     *
     * @return   The InitialContext value
     */
-   protected InitialContext getInitialContext() throws Exception
-   {
-      return delegate.getInitialContext();
-   }
+//   protected InitialContext getInitialContext() throws Exception
+//   {
+//      return delegate.getInitialContext();
+//   }
 
    /**
     * Gets the Server attribute of the JBossTestCase object
     *
     * @return   The Server value
     */
-   protected MBeanServerConnection getServer() throws Exception
-   {
-      return delegate.getServer();
-   }
+//   protected MBeanServerConnection getServer() throws Exception
+//   {
+//      return delegate.getServer();
+//   }
 
    /**
     * Gets the Log attribute of the JBossTestCase object
@@ -157,10 +157,10 @@
     * @return                                  The DeployerName value
     * @exception MalformedObjectNameException  Description of Exception
     */
-   protected ObjectName getDeployerName() throws MalformedObjectNameException
-   {
-      return delegate.getDeployerName();
-   }
+//   protected ObjectName getDeployerName() throws MalformedObjectNameException
+//   {
+//      return delegate.getDeployerName();
+//   }
 
 
    /**
@@ -202,10 +202,10 @@
     * @return               Object returned by mbean method invocation.
     * @exception Exception  Description of Exception
     */
-   protected Object invoke(ObjectName name, String method, Object[] args, String[] sig) throws Exception
-   {
-      return delegate.invoke(name, method, args, sig);
-   }
+//   protected Object invoke(ObjectName name, String method, Object[] args, String[] sig) throws Exception
+//   {
+//      return delegate.invoke(name, method, args, sig);
+//   }
 
    /**
     * Deploy a package with the main deployer. The supplied name is
@@ -214,10 +214,10 @@
     * @param name           filename/url of package to deploy.
     * @exception Exception  Description of Exception
     */
-   protected void deploy(String name) throws Exception
-   {
-      delegate.deploy(name);
-   }
+//   protected void deploy(String name) throws Exception
+//   {
+//      delegate.deploy(name);
+//   }
 
    /**
     * Redeploy a package with the main deployer. The supplied name is
@@ -226,10 +226,10 @@
     * @param name           filename/url of package to deploy.
     * @exception Exception  Description of Exception
     */
-   protected void redeploy(String name) throws Exception
-   {
-      delegate.redeploy(name);
-   }
+//   protected void redeploy(String name) throws Exception
+//   {
+//      delegate.redeploy(name);
+//   }
 
    /**
     * Undeploy a package with the main deployer. The supplied name is
@@ -238,10 +238,10 @@
     * @param name           filename/url of package to undeploy.
     * @exception Exception  Description of Exception
     */
-   protected void undeploy(String name) throws Exception
-   {
-      delegate.undeploy(name);
-   }
+//   protected void undeploy(String name) throws Exception
+//   {
+//      delegate.undeploy(name);
+//   }
 
    /**
     * Get a JBossTestSetup that does login and deployment in setUp/tearDown
@@ -249,80 +249,80 @@
     * @param test a Test
     * @param jarNames is a comma seperated list of deployments
     */
-   public static Test getDeploySetup(final Test test, final String jarNames)
-      throws Exception
-   {
-      JBossTestSetup wrapper = new JBossTestSetup(test)
-      {
-         protected void setUp() throws Exception
-         {
-            deploymentException = null;
-            try
-            {
-               this.delegate.init();
+//   public static Test getDeploySetup(final Test test, final String jarNames)
+//      throws Exception
+//   {
+//      JBossTestSetup wrapper = new JBossTestSetup(test)
+//      {
+//         protected void setUp() throws Exception
+//         {
+//            deploymentException = null;
+//            try
+//            {
+//               this.delegate.init();
+//
+//               if (this.delegate.isSecure())
+//                  this.delegate.login();
+//
+//               if (jarNames == null) return;
+//
+//               // deploy the comma seperated list of jars
+//               StringTokenizer st = new StringTokenizer(jarNames, ", ");
+//               while (st != null && st.hasMoreTokens())
+//               {
+//                  String jarName = st.nextToken();
+//                  this.redeploy(jarName);
+//                  this.getLog().debug("deployed package: " + jarName);
+//               }
+//            }
+//            catch (Exception ex)
+//            {
+//               // Throw this in testServerFound() instead.
+//               deploymentException = ex;
+//            }
+//         }
+//
+//         protected void tearDown() throws Exception
+//         {
+//            if (jarNames == null) return; //Nothing to Undeploy
+//             
+//            // undeploy the comma seperated list of jars
+//            StringTokenizer st = new StringTokenizer(jarNames, ", ");
+//            String[] depoyments = new String[st.countTokens()];
+//            for (int i = depoyments.length - 1; i >= 0; i--)
+//               depoyments[i] = st.nextToken();
+//            for (int i = 0; i < depoyments.length; i++)
+//            {
+//               String jarName = depoyments[i];
+//               this.undeploy(jarName);
+//               this.getLog().debug("undeployed package: " + jarName);
+//            }
+//
+//            if (this.delegate.isSecure())
+//               this.delegate.logout();
+//         }
+//      };
+//      return wrapper;
+//   }
 
-               if (this.delegate.isSecure())
-                  this.delegate.login();
+//   public static Test getDeploySetup(final Class clazz, final String jarName)
+//      throws Exception
+//   {
+//      TestSuite suite = new TestSuite();
+//      suite.addTest(new TestSuite(clazz));
+//      return getDeploySetup(suite, jarName);
+//   }
 
-               if (jarNames == null) return;
+//   protected String getJndiURL()
+//   {
+//      return delegate.getJndiURL();
+//   }
 
-               // deploy the comma seperated list of jars
-               StringTokenizer st = new StringTokenizer(jarNames, ", ");
-               while (st != null && st.hasMoreTokens())
-               {
-                  String jarName = st.nextToken();
-                  this.redeploy(jarName);
-                  this.getLog().debug("deployed package: " + jarName);
-               }
-            }
-            catch (Exception ex)
-            {
-               // Throw this in testServerFound() instead.
-               deploymentException = ex;
-            }
-         }
+//   protected String getJndiInitFactory()
+//   {
+//      return delegate.getJndiInitFactory();
+//   }
 
-         protected void tearDown() throws Exception
-         {
-            if (jarNames == null) return; //Nothing to Undeploy
-             
-            // undeploy the comma seperated list of jars
-            StringTokenizer st = new StringTokenizer(jarNames, ", ");
-            String[] depoyments = new String[st.countTokens()];
-            for (int i = depoyments.length - 1; i >= 0; i--)
-               depoyments[i] = st.nextToken();
-            for (int i = 0; i < depoyments.length; i++)
-            {
-               String jarName = depoyments[i];
-               this.undeploy(jarName);
-               this.getLog().debug("undeployed package: " + jarName);
-            }
-
-            if (this.delegate.isSecure())
-               this.delegate.logout();
-         }
-      };
-      return wrapper;
-   }
-
-   public static Test getDeploySetup(final Class clazz, final String jarName)
-      throws Exception
-   {
-      TestSuite suite = new TestSuite();
-      suite.addTest(new TestSuite(clazz));
-      return getDeploySetup(suite, jarName);
-   }
-
-   protected String getJndiURL()
-   {
-      return delegate.getJndiURL();
-   }
-
-   protected String getJndiInitFactory()
-   {
-      return delegate.getJndiInitFactory();
-   }
-
    protected int getThreadCount()
    {
       return delegate.getThreadCount();
@@ -347,23 +347,23 @@
       return delegate.getServerHost();
    }
 
-   protected void flushAuthCache() throws Exception
-   {
-      flushAuthCache("other");
-   }
+//   protected void flushAuthCache() throws Exception
+//   {
+//      flushAuthCache("other");
+//   }
 
-   protected void flushAuthCache(String domain) throws Exception
-   {
-      delegate.flushAuthCache(domain);
-   }
+//   protected void flushAuthCache(String domain) throws Exception
+//   {
+//      delegate.flushAuthCache(domain);
+//   }
 
    /** Restart the connection pool associated with the DefaultDS
     * @throws Exception on failure
     */
-   protected void restartDBPool() throws Exception
-   {
-      delegate.restartDBPool();
-   }
+//   protected void restartDBPool() throws Exception
+//   {
+//      delegate.restartDBPool();
+//   }
 
    protected void sleep(long interval) throws InterruptedException
    {

Modified: branches/Branch_AOP_1_5/test/src/main/org/jboss/test/JBossTestServices.java
===================================================================
--- branches/Branch_AOP_1_5/test/src/main/org/jboss/test/JBossTestServices.java	2007-06-14 20:39:25 UTC (rev 63533)
+++ branches/Branch_AOP_1_5/test/src/main/org/jboss/test/JBossTestServices.java	2007-06-15 00:11:33 UTC (rev 63534)
@@ -27,12 +27,12 @@
 import java.util.Arrays;
 import java.util.Hashtable;
 
-import javax.management.MBeanServerConnection;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.security.auth.login.LoginContext;
+//import javax.management.MBeanServerConnection;
+//import javax.management.MalformedObjectNameException;
+//import javax.management.ObjectName;
+//import javax.naming.Context;
+//import javax.naming.InitialContext;
+//import javax.security.auth.login.LoginContext;
 
 import org.apache.log4j.Category;
 import org.jboss.test.util.AppCallbackHandler;
@@ -65,11 +65,11 @@
    public final static int DEFAULT_BEANCOUNT = 100;
 
    // Attributes ----------------------------------------------------
-   protected MBeanServerConnection server;
+//   protected MBeanServerConnection server;
    protected Category log;
-   protected InitialContext initialContext;
+//   protected InitialContext initialContext;
    protected Hashtable jndiEnv;
-   protected LoginContext lc;
+//   protected LoginContext lc;
 
    /**
     * Constructor for the JBossTestCase object
@@ -90,13 +90,13 @@
    public void setUp() throws Exception
    {
       log.debug("JBossTestServices.setUp()");
-      init();
-      log.info("jbosstest.beancount: " + System.getProperty("jbosstest.beancount"));
-      log.info("jbosstest.iterationcount: " + System.getProperty("jbosstest.iterationcount"));
-      log.info("jbosstest.threadcount: " + System.getProperty("jbosstest.threadcount"));
-      log.info("jbosstest.nodeploy: " + System.getProperty("jbosstest.nodeploy"));
-      log.info("jbosstest.jndiurl: " + this.getJndiURL());
-      log.info("jbosstest.jndifactory: " + this.getJndiInitFactory());
+//      init();
+//      log.info("jbosstest.beancount: " + System.getProperty("jbosstest.beancount"));
+//      log.info("jbosstest.iterationcount: " + System.getProperty("jbosstest.iterationcount"));
+//      log.info("jbosstest.threadcount: " + System.getProperty("jbosstest.threadcount"));
+//      log.info("jbosstest.nodeploy: " + System.getProperty("jbosstest.nodeploy"));
+//      log.info("jbosstest.jndiurl: " + this.getJndiURL());
+//      log.info("jbosstest.jndifactory: " + this.getJndiInitFactory());
    }
 
    /**
@@ -114,25 +114,25 @@
     *
     * @return   The InitialContext value
     */
-   public InitialContext getInitialContext() throws Exception
-   {
-      return initialContext;
-   }
+//   public InitialContext getInitialContext() throws Exception
+//   {
+//      return initialContext;
+//   }
 
    /**
     * Gets the Server attribute of the JBossTestCase object
     *
     * @return   The Server value
     */
-   public MBeanServerConnection getServer() throws Exception
-   {
-      if (server == null)
-      {
-         String adaptorName = System.getProperty("jbosstest.server.name", "jmx/invoker/RMIAdaptor");
-         server = (MBeanServerConnection)initialContext.lookup(adaptorName);
-      }
-      return server;
-   }
+//   public MBeanServerConnection getServer() throws Exception
+//   {
+//      if (server == null)
+//      {
+//         String adaptorName = System.getProperty("jbosstest.server.name", "jmx/invoker/RMIAdaptor");
+//         server = (MBeanServerConnection)initialContext.lookup(adaptorName);
+//      }
+//      return server;
+//   }
 
    /**
     * Gets the Log attribute of the JBossTestCase object
@@ -150,10 +150,10 @@
     * @return                                  The Main DeployerName value
     * @exception MalformedObjectNameException  Description of Exception
     */
-   ObjectName getDeployerName() throws MalformedObjectNameException
-   {
-      return new ObjectName(DEPLOYER_NAME);
-   }
+//   ObjectName getDeployerName() throws MalformedObjectNameException
+//   {
+//      return new ObjectName(DEPLOYER_NAME);
+//   }
 
    /**
     * Returns the deployment directory to use. This does it's best to figure out
@@ -211,49 +211,49 @@
     * @return               Object returned by mbean method invocation.
     * @exception Exception  Description of Exception
     */
-   protected Object invoke(ObjectName name, String method, Object[] args, String[] sig) throws Exception
-   {
-      return invoke(getServer(), name, method, args, sig);
-   }
+//   protected Object invoke(ObjectName name, String method, Object[] args, String[] sig) throws Exception
+//   {
+//      return invoke(getServer(), name, method, args, sig);
+//   }
+//
+//   protected Object invoke(MBeanServerConnection server, ObjectName name, String method, Object[] args, String[] sig)
+//      throws Exception
+//   {
+//      try
+//      {
+//         this.getLog().debug("Invoking " + name.getCanonicalName() + " method=" + method);
+//         if (args != null)
+//            this.getLog().debug("args=" + Arrays.asList(args));
+//         return server.invoke(name, method, args, sig);
+//      }
+//      catch (javax.management.MBeanException e)
+//      {
+//         log.error("MbeanException", e.getTargetException());
+//         throw e.getTargetException();
+//      }
+//      catch (javax.management.ReflectionException e)
+//      {
+//         log.error("ReflectionException", e.getTargetException());
+//         throw e.getTargetException();
+//      }
+//      catch (javax.management.RuntimeOperationsException e)
+//      {
+//         log.error("RuntimeOperationsException", e.getTargetException());
+//         throw e.getTargetException();
+//      }
+//      catch (javax.management.RuntimeMBeanException e)
+//      {
+//         log.error("RuntimeMbeanException", e.getTargetException());
+//         throw e.getTargetException();
+//      }
+//      catch (javax.management.RuntimeErrorException e)
+//      {
+//         log.error("RuntimeErrorException", e.getTargetError());
+//         throw e.getTargetError();
+//      }
+//   }
 
-   protected Object invoke(MBeanServerConnection server, ObjectName name, String method, Object[] args, String[] sig)
-      throws Exception
-   {
-      try
-      {
-         this.getLog().debug("Invoking " + name.getCanonicalName() + " method=" + method);
-         if (args != null)
-            this.getLog().debug("args=" + Arrays.asList(args));
-         return server.invoke(name, method, args, sig);
-      }
-      catch (javax.management.MBeanException e)
-      {
-         log.error("MbeanException", e.getTargetException());
-         throw e.getTargetException();
-      }
-      catch (javax.management.ReflectionException e)
-      {
-         log.error("ReflectionException", e.getTargetException());
-         throw e.getTargetException();
-      }
-      catch (javax.management.RuntimeOperationsException e)
-      {
-         log.error("RuntimeOperationsException", e.getTargetException());
-         throw e.getTargetException();
-      }
-      catch (javax.management.RuntimeMBeanException e)
-      {
-         log.error("RuntimeMbeanException", e.getTargetException());
-         throw e.getTargetException();
-      }
-      catch (javax.management.RuntimeErrorException e)
-      {
-         log.error("RuntimeErrorException", e.getTargetError());
-         throw e.getTargetError();
-      }
-   }
 
-
    /**
     * Deploy a package with the main deployer. The supplied name is
     * interpreted as a url, or as a filename in jbosstest.deploy.lib or ../lib.
@@ -261,70 +261,70 @@
     * @param name           filename/url of package to deploy.
     * @exception Exception  Description of Exception
     */
-   public void deploy(String name) throws Exception
-   {
-      if (Boolean.getBoolean("jbosstest.nodeploy") == true)
-      {
-         log.debug("Skipping deployment of: " + name);
-         return;
-      }
+//   public void deploy(String name) throws Exception
+//   {
+//      if (Boolean.getBoolean("jbosstest.nodeploy") == true)
+//      {
+//         log.debug("Skipping deployment of: " + name);
+//         return;
+//      }
+//
+//      URL deployURL = getDeployURL(name);
+//      log.debug("Deploying " + name + ", url=" + deployURL);
+//      invoke(getDeployerName(),
+//         "deploy",
+//         new Object[]{deployURL},
+//         new String[]{"java.net.URL"});
+//   }
+//
+//   public void redeploy(String name) throws Exception
+//   {
+//      if (Boolean.getBoolean("jbosstest.nodeploy") == true)
+//      {
+//         log.debug("Skipping redeployment of: " + name);
+//         return;
+//      }
+//
+//      URL deployURL = getDeployURL(name);
+//      log.debug("Deploying " + name + ", url=" + deployURL);
+//      invoke(getDeployerName(),
+//         "redeploy",
+//         new Object[]{deployURL},
+//         new String[]{"java.net.URL"});
+//   }
 
-      URL deployURL = getDeployURL(name);
-      log.debug("Deploying " + name + ", url=" + deployURL);
-      invoke(getDeployerName(),
-         "deploy",
-         new Object[]{deployURL},
-         new String[]{"java.net.URL"});
-   }
-
-   public void redeploy(String name) throws Exception
-   {
-      if (Boolean.getBoolean("jbosstest.nodeploy") == true)
-      {
-         log.debug("Skipping redeployment of: " + name);
-         return;
-      }
-
-      URL deployURL = getDeployURL(name);
-      log.debug("Deploying " + name + ", url=" + deployURL);
-      invoke(getDeployerName(),
-         "redeploy",
-         new Object[]{deployURL},
-         new String[]{"java.net.URL"});
-   }
-
    /** Do a JAAS login with the current username, password and login config.
     * @throws Exception
     */
-   public void login() throws Exception
-   {
-      flushAuthCache("other");
-      String username = getUsername();
-      String pass = getPassword();
-      String config = getLoginConfig();
-      char[] password = null;
-      if (pass != null)
-         password = pass.toCharArray();
-      AppCallbackHandler handler = new AppCallbackHandler(username, password);
-      getLog().debug("Creating LoginContext(" + config + ")");
-      lc = new LoginContext(config, handler);
-      lc.login();
-      getLog().debug("Created LoginContext, subject=" + lc.getSubject());
-   }
+//   public void login() throws Exception
+//   {
+//      flushAuthCache("other");
+//      String username = getUsername();
+//      String pass = getPassword();
+//      String config = getLoginConfig();
+//      char[] password = null;
+//      if (pass != null)
+//         password = pass.toCharArray();
+//      AppCallbackHandler handler = new AppCallbackHandler(username, password);
+//      getLog().debug("Creating LoginContext(" + config + ")");
+//      lc = new LoginContext(config, handler);
+//      lc.login();
+//      getLog().debug("Created LoginContext, subject=" + lc.getSubject());
+//   }
 
-   public void logout()
-   {
-      try
-      {
-         getLog().debug("logout, LoginContext: " + lc);
-         if (lc != null)
-            lc.logout();
-      }
-      catch (Exception e)
-      {
-         getLog().error("logout error: ", e);
-      }
-   }
+//   public void logout()
+//   {
+//      try
+//      {
+//         getLog().debug("logout, LoginContext: " + lc);
+//         if (lc != null)
+//            lc.logout();
+//      }
+//      catch (Exception e)
+//      {
+//         getLog().error("logout error: ", e);
+//      }
+//   }
 
    /**
     * Undeploy a package with the main deployer. The supplied name is
@@ -333,37 +333,37 @@
     * @param name           filename/url of package to undeploy.
     * @exception Exception  Description of Exception
     */
-   public void undeploy(String name) throws Exception
-   {
-      if (Boolean.getBoolean("jbosstest.nodeploy") == true)
-         return;
-      URL deployURL = getDeployURL(name);
-      log.debug("Undeploying " + name + ", url=" + deployURL);
-      Object[] args = {deployURL};
-      String[] sig = {"java.net.URL"};
-      invoke(getDeployerName(), "undeploy", args, sig);
-   }
+//   public void undeploy(String name) throws Exception
+//   {
+//      if (Boolean.getBoolean("jbosstest.nodeploy") == true)
+//         return;
+//      URL deployURL = getDeployURL(name);
+//      log.debug("Undeploying " + name + ", url=" + deployURL);
+//      Object[] args = {deployURL};
+//      String[] sig = {"java.net.URL"};
+//      invoke(getDeployerName(), "undeploy", args, sig);
+//   }
 
    /** Flush all authentication credentials for the java:/jaas/other security
     domain
     */
-   void flushAuthCache(String domain) throws Exception
-   {
-      ObjectName jaasMgr = new ObjectName("jboss.security:service=JaasSecurityManager");
-      Object[] params = {domain};
-      String[] signature = {"java.lang.String"};
-      invoke(jaasMgr, "flushAuthenticationCache", params, signature);
-   }
+//   void flushAuthCache(String domain) throws Exception
+//   {
+//      ObjectName jaasMgr = new ObjectName("jboss.security:service=JaasSecurityManager");
+//      Object[] params = {domain};
+//      String[] signature = {"java.lang.String"};
+//      invoke(jaasMgr, "flushAuthenticationCache", params, signature);
+//   }
+//
+//   void restartDBPool() throws Exception
+//   {
+//      ObjectName dbPool = new ObjectName("jboss.jca:service=ManagedConnectionPool,name=DefaultDS");
+//      Object[] params = {};
+//      String[] signature = {};
+//      invoke(dbPool, "stop", params, signature);
+//      invoke(dbPool, "start", params, signature);
+//   }
 
-   void restartDBPool() throws Exception
-   {
-      ObjectName dbPool = new ObjectName("jboss.jca:service=ManagedConnectionPool,name=DefaultDS");
-      Object[] params = {};
-      String[] signature = {};
-      invoke(dbPool, "stop", params, signature);
-      invoke(dbPool, "start", params, signature);
-   }
-
    boolean isSecure()
    {
       return Boolean.getBoolean("jbosstest.secure");
@@ -384,18 +384,18 @@
       return System.getProperty("jbosstest.loginconfig", DEFAULT_LOGIN_CONFIG);
    }
 
-   String getJndiURL()
-   {
-      String url = (String)jndiEnv.get(Context.PROVIDER_URL);
-      return url;
-   }
+//   String getJndiURL()
+//   {
+//      String url = (String)jndiEnv.get(Context.PROVIDER_URL);
+//      return url;
+//   }
+//
+//   String getJndiInitFactory()
+//   {
+//      String factory = (String)jndiEnv.get(Context.INITIAL_CONTEXT_FACTORY);
+//      return factory;
+//   }
 
-   String getJndiInitFactory()
-   {
-      String factory = (String)jndiEnv.get(Context.INITIAL_CONTEXT_FACTORY);
-      return factory;
-   }
-
    int getThreadCount()
    {
       int result = Integer.getInteger("jbosstest.threadcount", DEFAULT_THREADCOUNT).intValue();
@@ -420,25 +420,25 @@
    /** 
     * Initializes the {@link InitialContext} if not set.
     */
-   public void init() throws Exception
-   {
-      if (initialContext == null)
-      {
-         initialContext = new InitialContext();
-         log.debug("initialContext.getEnvironment()=" + initialContext.getEnvironment());         
-         jndiEnv = initialContext.getEnvironment();
-      }
-   }
-   
-   /** 
-    * Re-initializes the {@link InitialContext}.
-    */   
-   public void reinit() throws Exception
-   {
-      initialContext = null;
-      server = null;
-      init();
-   }
+//   public void init() throws Exception
+//   {
+//      if (initialContext == null)
+//      {
+//         initialContext = new InitialContext();
+//         log.debug("initialContext.getEnvironment()=" + initialContext.getEnvironment());         
+//         jndiEnv = initialContext.getEnvironment();
+//      }
+//   }
+//   
+//   /** 
+//    * Re-initializes the {@link InitialContext}.
+//    */   
+//   public void reinit() throws Exception
+//   {
+//      initialContext = null;
+//      server = null;
+//      init();
+//   }
 
    /**
     * Returns the JBoss server host from system property "jbosstest.server.host"

Modified: branches/Branch_AOP_1_5/test/src/main/org/jboss/test/JBossTestSetup.java
===================================================================
--- branches/Branch_AOP_1_5/test/src/main/org/jboss/test/JBossTestSetup.java	2007-06-14 20:39:25 UTC (rev 63533)
+++ branches/Branch_AOP_1_5/test/src/main/org/jboss/test/JBossTestSetup.java	2007-06-15 00:11:33 UTC (rev 63534)
@@ -24,10 +24,10 @@
 import java.net.MalformedURLException;
 import java.net.URL;
 
-import javax.management.MBeanServerConnection;
-import javax.management.MalformedObjectNameException;
-import javax.management.ObjectName;
-import javax.naming.InitialContext;
+//import javax.management.MBeanServerConnection;
+//import javax.management.MalformedObjectNameException;
+//import javax.management.ObjectName;
+//import javax.naming.InitialContext;
 
 import junit.extensions.TestSetup;
 import junit.framework.Test;
@@ -63,7 +63,7 @@
    {
       super(test);
       delegate = createTestServices();
-      delegate.init();
+//      delegate.init();
    }
 
    protected JBossTestServices createTestServices()
@@ -76,20 +76,20 @@
     *
     * @return   The InitialContext value
     */
-   protected InitialContext getInitialContext() throws Exception
-   {
-      return delegate.getInitialContext();
-   }
+//   protected InitialContext getInitialContext() throws Exception
+//   {
+//      return delegate.getInitialContext();
+//   }
 
    /**
     * Gets the Server attribute of the JBossTestCase object
     *
     * @return   The Server value
     */
-   protected MBeanServerConnection getServer() throws Exception
-   {
-      return delegate.getServer();
-   }
+//   protected MBeanServerConnection getServer() throws Exception
+//   {
+//      return delegate.getServer();
+//   }
 
    /**
     * Gets the Log attribute of the JBossTestCase object
@@ -107,10 +107,10 @@
     * @return                                  The DeployerName value
     * @exception MalformedObjectNameException  Description of Exception
     */
-   protected ObjectName getDeployerName() throws MalformedObjectNameException
-   {
-      return delegate.getDeployerName();
-   }
+//   protected ObjectName getDeployerName() throws MalformedObjectNameException
+//   {
+//      return delegate.getDeployerName();
+//   }
 
    /**
     * Returns the deployment directory to use. This does it's best to figure out
@@ -146,10 +146,10 @@
     * @return               Object returned by mbean method invocation.
     * @exception Exception  Description of Exception
     */
-   protected Object invoke(ObjectName name, String method, Object[] args, String[] sig) throws Exception
-   {
-      return delegate.invoke(name, method, args, sig);
-   }
+//   protected Object invoke(ObjectName name, String method, Object[] args, String[] sig) throws Exception
+//   {
+//      return delegate.invoke(name, method, args, sig);
+//   }
 
    /**
     * Deploy a package with the main deployer. The supplied name is
@@ -158,16 +158,16 @@
     * @param name           filename/url of package to deploy.
     * @exception Exception  Description of Exception
     */
-   protected void deploy(String name) throws Exception
-   {
-      delegate.deploy(name);
-   }
+//   protected void deploy(String name) throws Exception
+//   {
+//      delegate.deploy(name);
+//   }
+//
+//   protected void redeploy(String name) throws Exception
+//   {
+//      delegate.redeploy(name);
+//   }
 
-   protected void redeploy(String name) throws Exception
-   {
-      delegate.redeploy(name);
-   }
-
    /**
     * Undeploy a package with the main deployer. The supplied name is
     * interpreted as a url, or as a filename in jbosstest.deploy.lib or ../lib.
@@ -175,39 +175,39 @@
     * @param name           filename/url of package to undeploy.
     * @exception Exception  Description of Exception
     */
-   protected void undeploy(String name) throws Exception
-   {
-      delegate.undeploy(name);
-   }
+//   protected void undeploy(String name) throws Exception
+//   {
+//      delegate.undeploy(name);
+//   }
 
 
-   protected void flushAuthCache() throws Exception
-   {
-      flushAuthCache("other");
-   }
+//   protected void flushAuthCache() throws Exception
+//   {
+//      flushAuthCache("other");
+//   }
 
-   protected void flushAuthCache(String domain) throws Exception
-   {
-      delegate.flushAuthCache(domain);
-   }
+//   protected void flushAuthCache(String domain) throws Exception
+//   {
+//      delegate.flushAuthCache(domain);
+//   }
 
    /** Restart the connection pool associated with the DefaultDS
     * @throws Exception on failure
     */
-   protected void restartDBPool() throws Exception
-   {
-      delegate.restartDBPool();
-   }
+//   protected void restartDBPool() throws Exception
+//   {
+//      delegate.restartDBPool();
+//   }
 
-   protected String getJndiURL()
-   {
-      return delegate.getJndiURL();
-   }
+//   protected String getJndiURL()
+//   {
+//      return delegate.getJndiURL();
+//   }
 
-   protected String getJndiInitFactory()
-   {
-      return delegate.getJndiInitFactory();
-   }
+//   protected String getJndiInitFactory()
+//   {
+//      return delegate.getJndiInitFactory();
+//   }
 
    protected int getThreadCount()
    {

Modified: branches/Branch_AOP_1_5/tools/etc/buildmagic/modules.ent
===================================================================
--- branches/Branch_AOP_1_5/tools/etc/buildmagic/modules.ent	2007-06-14 20:39:25 UTC (rev 63533)
+++ branches/Branch_AOP_1_5/tools/etc/buildmagic/modules.ent	2007-06-15 00:11:33 UTC (rev 63534)
@@ -26,17 +26,11 @@
   <pathelement path="${jboss.common.lib}/namespace.jar"/>
 </path>
 
-<!-- J2SE -->
-<!--
-<property name="jboss.j2se.root" value="${project.root}/j2se/output"/>
-<property name="jboss.j2se.lib" value="${jboss.j2se.root}/lib"/>
-<path id="jboss.j2se.classpath">
-  <pathelement path="${jboss.j2se.lib}/jboss-j2se.jar"/>
+<property name="jboss.test.root" value="${project.root}/test/output"/>
+<property name="jboss.test.lib" value="${jboss.test.root}/lib"/>
+<path id="jboss.test.classpath">
+  <pathelement path="${jboss.test.lib}/jboss-test.jar"/>
 </path>
-<path id="jboss.jmxcompliance.classpath">
-  <pathelement path="${jboss.j2se.lib}/jboss-jmx-compliance.jar"/>
-</path>
--->
 
 
 




More information about the jboss-cvs-commits mailing list