Author: jsong
Date: Tue Aug 10 22:38:48 2004
New Revision: 36208

Added:
   incubator/beehive/trunk/controls/test/infra/tch/schema.jar   (contents, 
props changed)
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/basic/
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/basic/Event.java
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/basic/EventImpl.jcs
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/basic/Hello.java
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/basic/HelloImpl.jcs
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/basic/OperExcept.jcx
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/basic/OperExtend.jcx
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/basic/Operation.java
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/basic/OperationImpl.jcs
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/context/
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/context/BaseContext.java
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/context/BaseContextImpl.jcs
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/context/ServiceGetter.java
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/context/ServiceGetterImpl.jcs
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/contextevent/
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/contextevent/Recorder.java
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/contextevent/RecorderImpl.jcs
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/event/
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/event/Hello.java
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/event/HelloImpl.jcs
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/extension/
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/extension/ExtensibleControl.java
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/extension/ExtensibleControlImpl.jcs
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/extension/SubControl.java
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/extension/SubControlImpl.jcs
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/property/
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/property/NestProps.java
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/property/NestPropsImpl.jcs
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/property/Props.java
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/property/PropsExtension.jcx
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/property/PropsImpl.jcs
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/property/SingleProperty.java
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/property/SingleProperty2.java
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/property/SingleProperty2Impl.jcs
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/property/SinglePropertyImpl.jcs
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/util/
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/util/TestBeanContext.java
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/util/TestContext.java
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/driver/
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/driver/instantiate/
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/driver/instantiate/DriveHelloControl.java
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/driver/instantiate/DriveSingleProperty.java
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/driver/property/
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/driver/property/DriveClientAccess.java
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/driver/property/DriveClientImpl.java
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/driver/property/DriveImplAccess.java
   incubator/beehive/trunk/controls/test/webapps/controlsWeb/instantiate/
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/instantiate/declarative/
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/instantiate/declarative/Controller.jpf
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/instantiate/declarewithproperty/
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/instantiate/declarewithproperty/Controller.jpf
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/instantiate/programmatic/
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/instantiate/programmatic/Controller.jpf
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/instantiate/programwithproperty/
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/instantiate/programwithproperty/Controller.jpf
   incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/client_access/
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/client_access/Controller.jpf
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/client_access2/
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/client_access2/Controller.jpf
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/client_impl/
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/client_impl/Controller.jpf
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/client_impl2/
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/client_impl2/Controller.jpf
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/impl_access/
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/impl_access/Controller.jpf
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/impl_access2/
   
incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/impl_access2/Controller.jpf
Modified:
   incubator/beehive/trunk/controls/test/build.xml
Log:
Add controls tests on pageflow invoking controls.


Modified: incubator/beehive/trunk/controls/test/build.xml
==============================================================================
--- incubator/beehive/trunk/controls/test/build.xml     (original)
+++ incubator/beehive/trunk/controls/test/build.xml     Tue Aug 10 22:38:48 2004
@@ -1,203 +1,257 @@
-<?xml version="1.0" ?>
+<?xml version="1.0"?>
+<!-- 
+===========================================================================
+
+  This project consists of targets to build/clean a web appplication with
+  the latest Beehive NETUI artifacts, start/stop Tomcat server, and deploy
+  the web application to a started Tomcat server.
+  
+  This project originates from trunk/netui/test/webapps/drt/build.xml for
+  code reusing.
 
-<project name="beehive_test" default="usage">
+============================================================================ 
+-->
+<project name="Beehive/Controls/TestControls-TomcatApp" default="usage" 
basedir=".">
 
     <property environment="os"/>
     <property file="${os.BEEHIVE_HOME}/beehive.properties"/>
-    <property file="common/path.properties"/>
+    <!--property file="${os.BEEHIVE_HOME}/netui/test/ant/test.properties"/-->
+    <!--property file="${os.BEEHIVE_HOME}/netui/ant/bootstrap.properties"/-->
+    <!--property file="${os.BEEHIVE_HOME}/netui/ant/common.properties"/-->
+    <!--property file="common.properties"/-->
+    
+    <property name="webapp.name" value="controlsWeb"/>
+    <property name="webapp.waitfor.url" 
value="http://localhost:8080/${webapp.name}"/>
 
-    <property name="dev.root" value="${os.DEV_ROOT}"/>
+  <target name="usage">
+    <echo message="" />
+    <echo message="" />
+    <echo message="scripts for building/deploying web apps for controls 
testing" />
+    <echo 
message="================================================================" />
+    <echo message="|                          Usage                            
   |" />
+    <echo 
message="================================================================" />
+    <echo message="" />
+    <echo 
message="-------------------------------------------------------------------" />
+    <echo message="|                       Standard Targets                    
      |" />
+    <echo 
message="-------------------------------------------------------------------" />
+    <echo message="build       - inject latest netui artifacts and build 
controlsWeb, " />
+    <echo message="              build controlsWeb includes compiling controls 
in the " />
+    <echo message="              web app.                                      
       " />
+    <echo message="start       - start Tomcat server"/>
+    <echo message="stop        - stop Tomcat server"/>
+    <echo message="deploy      - deploys a built webapp to a started Tomcat" />
+    <echo message="" />
+    <echo message="" />
+   </target>
+
+    <!-- ================================================================ -->
+    <!--                                                                  -->
+    <!-- Targets for building a webapp                                    -->
+    <!--                                                                  -->
+    <!-- ================================================================ -->
+    <target name="build" description="Build webapp">
+        <echo message="-----------------------------------------------------"/>
+        <echo message="|    Beehive Controls controlsWeb build starting    |"/>
+        <echo message="-----------------------------------------------------"/>
+
+        <property name="webapp.dir" location="./${webapp.name}"/>
+
+       <ant antfile="${buildWebapp.ant}" target="deploy.netui" 
inheritAll="false">
+               <property name="webapp.dir" value="${webapp.dir}" />
+       </ant>
+
+        <copy file="${webapp.dir}/WEB-INF/local-netui-config.xml" 
+              tofile="${webapp.dir}/WEB-INF/${netuiconfig.xml.name}" 
+              overwrite="true" failonerror="false"/>
+
+        <!--copy todir="${webapp.dir}/WEB-INF" file="${struts11.logic.tld}"/-->
+        <!--copy todir="${webapp.dir}/WEB-INF" file="${struts11.html.tld}"/-->
+        <!--copy todir="${webapp.dir}/WEB-INF" file="${struts11.bean.tld}"/-->
 
-    <taskdef name="apt" 
classname="org.apache.beehive.controls.runtime.generator.AptTask" 
-             classpath="../build/jars/controls.jar" onerror="report" />
+        <ant antfile="${buildWebapp.ant}" target="build.webapp" 
inheritAll="false">
+            <property name="webapp.dir" location="${webapp.dir}"/>
+        </ant>
 
-    <!-- BeeHive test specific properties -->
-    <property name="test.root" location="${basedir}/src"/>
-    <property name="tests.src" location="${test.root}/units"/>
-    <property name="tests.driver.src" location="${test.root}/drivers"/>
-    <property name="controls.src" location="${test.root}/controls"/>
-    <property name="build.dir" location="${basedir}/build"/>
-    <property name="build.classes" location="${build.dir}/classes"/>
-    <property name="build.beans" location="${build.dir}/classes/beans"/>
-    <property name="build.tests" location="${build.dir}/classes/tests"/>
-    <property name="build.tests.driver" 
location="${build.dir}/classes/drivers"/>
-    <property name="build.beansrc" location="${build.dir}/beansrc"/>
-    <property name="build.jars" location="${build.dir}/jars"/>
-    <property name="test.logs" location="${basedir}/logs"/>
-    <condition property="test.os" value="windows" >
-       <os family="windows" />
-    </condition>
-    <condition property="test.os" value="unix" >
-       <os family="unix" />
-    </condition>
-
-
-    <path id="tch.run.classpath">
-       <pathelement location="${tch.jar}"/>
-       <pathelement location="${tch.schema.jar}"/>
-       <pathelement location="${tch.xbean.jar}"/>      
-       <pathelement location="${milton.jar}"/>
-        <pathelement location="${ant.jar}"/>
-        <pathelement path="${os.ANT_HOME}/lib/ant-launcher.jar"/>
-       
-        <pathelement location="${junit.jar}"/>
-        <pathelement location="${tools.jar}"/>
-        <pathelement location="${velocity14.jar}"/>
-        <pathelement location="${velocitydep14.jar}"/>
-        <pathelement location="${servlet24.jar}"/>
-        <pathelement location="../build/jars/controls.jar"/>
-        <pathelement path="${build.beans}"/>
-       
-        <pathelement path="${build.tests.driver}"/>
-       <pathelement location="${build.tests}" />
+        <echo message="----------------------------------------------"/>
+        <echo message="|     Controls controlsWeb build ending      |"/>
+        <echo message="----------------------------------------------"/>
+    </target>
 
-       <pathelement location="${jakarta.jar}"/>
-    </path>
+    <!-- Fix me: currently, netui\ant\webappTemplate.xml 
undeploy.netui.runtime delete all the jars -->
+    <!-- Fix me: milton.jar is deleted by mistake. undeploy.netui.runtime 
should be fixed and -->
+    <!-- Fix me: not delete milton.jar -->
+    <target name="clean" description="Clean webapp">
+        <echo message="----------------------------------------------"/>
+        <echo message="|     Controls controlsWeb clean starting    |"/>
+        <echo message="----------------------------------------------"/>
 
-    
-    <!-- =================================================================== 
-->
-    <!-- Usage - print the usage -->
-    <!-- ==================================================================== 
-->
-    <target name="usage">
-        <echo message=""/>
-        <echo message=""/>
-        <echo message="Controls Test Build file"/>
-        <echo 
message="================================================================"/>
-        <echo message="|                          Usage                        
       |"/>
-        <echo 
message="================================================================"/>
-        <echo 
message="----------------------------------------------------------------"/>
-        <echo message="|                      Standard Targets                 
       |"/>
-        <echo 
message="----------------------------------------------------------------"/>
-        <echo message="clean               - Delete the junit classes."/>
-        <echo message="build               - build controls,test drivers and 
java tests."/>
-        <echo message="run                 - run java tests that have already 
been built"/>
-        <echo message="test                - clean, build and run"/>
-        <echo 
message="----------------------------------------------------------------"/>
-    </target>
-
-    <path id="test.classpath">
-        <pathelement location="${junit.jar}"/>
-        <pathelement location="${tools.jar}"/>
-        <pathelement location="${velocity14.jar}"/>
-        <pathelement location="${velocitydep14.jar}"/>
-        <pathelement location="${servlet24.jar}"/>
-        <pathelement path="../build/jars/controls.jar"/>
-        <pathelement path="${build.beans}"/>
-    </path>
-
-    <target name="clean">
-        <delete dir="${build.dir}"/>
-        <delete dir="${test.logs}"/>
-        <delete file="velocity.log"/>
-    </target>
-
-    <target name="dirs">
-        <mkdir dir="${build.classes}" />
-        <mkdir dir="${build.beans}" />
-        <mkdir dir="${build.tests.driver}" />
-        <mkdir dir="${build.tests}" />
-        <mkdir dir="${build.beansrc}" />
-        <mkdir dir="${build.jars}" />
-        <mkdir dir="${test.logs}" />
-    </target>
-
-    <target name="build" depends="dirs">
-        <ant target="build-controls" />
-        <ant target="build-test-drivers" />
-        <ant target="build-java-tests" />
-    </target>
-
-    <target name="build-controls" depends="dirs" unless="_build.controls.ran">
-
-        <apt srcdir="${controls.src}" destdir="${build.beans}" 
gendir="${build.beansrc}"
-             classpathref="test.classpath" 
-             srcExtensions="*.jcs,*.jcx,*.java" >
-        </apt>
-        <jar destfile="${build.jars}/testbeans.jar"  basedir="${build.beans}" 
/>
-        <property name="_build.controls.ran" value="true"/>
-    </target>
-
-    <target name="build-test-drivers" depends="build-controls" 
unless="_build.test.drivers.ran">
-       <echo>build helper class for testing controls</echo>
-        <!-- Build the test source directory -->
-        <javac srcdir="${tests.driver.src}"
-            destdir="${build.tests.driver}"
-            classpathref="test.classpath"
-            debug="on"
-            optimize="on"
-            verbose="false"
-            failonerror="true"
-            >
-            <classpath>
-               <pathelement location="${milton.jar}"/>
-            </classpath>
-        </javac>
-        <property name="_build.test.drivers.ran" value="true"/>
-    </target>
-
-
-    <target name="build-java-tests" depends="build-test-drivers" 
unless="_build.java.tests.ran">
-        <!-- Build the test source directory -->
-        <javac srcdir="${tests.src}"
-            destdir="${build.tests}"
-            classpathref="test.classpath"
-            debug="on"
-            optimize="on"
-            verbose="false"
-            failonerror="true">
-            <classpath>
-               <pathelement location="${milton.jar}"/>
-               <pathelement path="${build.tests.driver}"/>
-            </classpath>
-        </javac>
-        <property name="_build.java.tests.ran" value="true"/>
+        <ant antfile="${buildWebapp.ant}" target="undeploy.netui" 
inheritAll="false">
+            <property name="webapp.dir" location="./${webapp.name}"/>
+        </ant>
+        <ant antfile="${buildWebapp.ant}" target="clean.webapp" 
inheritAll="false">
+            <property name="webapp.dir" location="./${webapp.name}"/>
+        </ant>
+
+        <echo message="****************************************************"/>
+        <echo message="* milton.jar is deleted by undeploy.netui.runtime, *"/>
+        <echo message="* please put it back to controlsWeb/WEB-INF/lib/   *"/>
+        <echo message="****************************************************"/>
+
+        <echo message="----------------------------------------------"/>
+        <echo message="|     Controls controlsWeb clean ending      |"/>
+        <echo message="----------------------------------------------"/>
     </target>
 
-    <target name="test" depends="tests"/>
-    
-    <target name="tests" >
+    <target name="scrub" depends="clean" description="Scrub webapp">
+        <delete dir="${tomcat.dir}/work/Catalina/localhost/${webapp.name}" 
includeEmptyDirs="true"/>
+        <delete 
file="${tomcat.dir}/conf/Catalina/localhost/${webapp.name}.xml"/>
+    </target>
 
-        <antcall target="clean" />
-        <antcall target="build" />
-        <antcall target="run" />
+    <!-- ================================================================ -->
+    <!--                                                                  -->
+    <!-- Targets for running test recorder test suites                    -->
+    <!--                                                                  -->
+    <!-- ================================================================ -->
+    <target name="playback" description="Playback a specified list of test 
recorder tests">
+        <ant antfile="${test.dir}/ant/testRecorder.xml" target="playback" 
inheritAll="false">
+            <property name="testRecorder.config.name" 
value="${testRecorder.config.name}"/>
+        </ant>
+    </target>
 
+    <target name="drt.running" description="Playback the 'drt' category to a 
running server">
+        <ant antfile="${test.dir}/ant/testRecorder.xml" 
target="suite.callback" inheritAll="false">
+            <property name="testRecorder.config.name" 
value="${testRecorder.config.name}"/>
+            <property name="suite.name" value="drt"/>
+            <property name="waitfor.url" value="${webapp.waitfor.url}"/>
+        </ant>
     </target>
 
-    
-    
-    <!-- =============================================== -->
-    <!-- stuff below this is stuff i added -->
-    <!-- =============================================== -->
+    <target name="bvt.running" description="Playback the 'bvt' category to a 
running server">
+        <ant antfile="${test.dir}/ant/testRecorder.xml" 
target="suite.callback" inheritAll="false">
+            <property name="testRecorder.config.name" 
value="${testRecorder.config.name}"/>
+            <property name="suite.name" value="bvt"/>
+            <property name="waitfor.url" value="http://localhost:8080/"/>
+        </ant>
+    </target>
 
-    <property name="junit.src.dir" value="${basedir}/src/units"/>
-  
-    <taskdef name="tch"
-             classname="org.apache.beehive.test.tools.tch.TchVMTask"
-             classpathref="tch.run.classpath"/>
+    <target name="drt" description="Run the drt suite with full server start / 
stop support.">
+        <ant dir="${test.dir}" antfile="${test.dir}/ant/testRecorder.xml" 
inheritAll="false" target="server.test">
+            <property name="app.build.file" 
location="${app.dir}/drt/build.xml"/>
+            <property name="waitfor.url" value="http://localhost:8080/"/>
+            <property name="testRecorder.config.name" 
value="${testRecorder.config.name}"/>
+            <property name="suite.name" value="drt"/>
+            <property name="drt.mode" value="true"/>
+        </ant>
+    </target>
 
-    <echo message="milton.jar: ${milton.jar}"/>
-    
-    <target name="run">
-        <property name="test-suite" value="${junit.src.dir}/root.xml"/>
-       <property name="tch.base-logfile-name" value="tch"/>
+    <target name="bvt" description="Run the bvt suite with full server start / 
stop support.">
+        <ant antfile="${test.dir}/ant/testRecorder.xml" inheritAll="false" 
target="server.test">
+            <property name="app.build.file" 
location="${app.dir}/drt/build.xml"/>
+            <property name="waitfor.url" value="http://localhost:8080/"/>
+            <property name="testRecorder.config.name" 
value="${testRecorder.config.name}"/>
+            <property name="suite.name" value="bvt"/>
+            <property name="drt.mode" value="true"/>
+        </ant>
+    </target>
 
+    <!-- ================================================================ -->
+    <!--                                                                  -->
+    <!-- Targets for deploying the webapp on a server                     -->
+    <!--                                                                  -->
+    <!-- ================================================================ -->
+    <target name="deploy" description="Deploy webapp">
+        <ant antfile="${runTomcat.ant}" target="deploy" inheritAll="false">
+            <property name="context.path" value="${webapp.name}"/>
+            <property name="webapp.root" 
value="C:/beehive/work_dir/controls/test/webapps/${webapp.name}"/>
+        </ant>
+    </target>
 
-       <tch tchHome="${tch.home}"
-            testfile="${test-suite}"
-            fork="true"
-            classpathref="tch.run.classpath"
-            failureproperty="run.failed">
+    <target name="undeploy" description="Undeploy webapp">
+        <ant antfile="${runTomcat.ant}" target="undeploy" inheritAll="false">
+            <property name="context.path" value="${webapp.name}"/>
+        </ant>
+    </target>
 
+    <target name="redeploy" description="Redeploy webapp">
+        <ant antfile="${runTomcat.ant}" target="redeploy" inheritAll="false">
+            <property name="context.path" value="${webapp.name}"/>
+        </ant>
+    </target>
 
+    <!-- ================================================================ -->
+    <!--                                                                  -->
+    <!-- Targets for starting / stopping a server                         -->
+    <!--                                                                  -->
+    <!-- ================================================================ -->
+    <target name="start" description="Start server">
+        <ant antfile="${runTomcat.ant}" target="start" inheritAll="false"/>
+    </target>
 
-            <arg value="-emacs"/>
-            <property name="tch.replication.entry-point" value="ant -f 
${controls.test.dir}/build.xml run"/>
-        </tch>
+    <target name="start.with.shmem" description="Start server">
+        <ant antfile="${runTomcat.ant}" target="start.with.shmem" 
inheritAll="false"/>
+    </target>
+
+    <target name="start.with.asserts" description="Start server with asserts 
enabled for org.apache.beehive.netui">
+        <ant antfile="${runTomcat.ant}" target="start" inheritAll="false">
+            <property name="java.options" 
value="-ea:org.apache.beehive.netui..."/>
+        </ant>
+    </target>
 
-       
-       <ant antfile="${controls.test.infra.dir}/tch/runtime/build.xml" 
target="generate-html-log" dir="${basedir}">
-               <property name="gtlf.file" 
value="${basedir}/${tch.base-logfile-name}.xml"/>
-               <property name="output.file" 
value="${basedir}/${tch.base-logfile-name}.html"/>
+    <target name="start.with.shmem.asserts" description="Start server with 
asserts enabled for org.apache.beehive.netui">
+        <ant antfile="${runTomcat.ant}" target="start.with.shmem" 
inheritAll="false">
+            <property name="java.options" 
value="-ea:org.apache.beehive.netui..."/>
         </ant>
-    </target>  
+    </target>
+
+    <target name="stop" description="Stop server">
+        <ant antfile="${runTomcat.ant}" target="stop" inheritAll="false"/>
+    </target>
+
+    <target name="package.drts" description="Package the NetUI DRT 
application.">
+        <antcall target="clean"/>
+
+        <mkdir dir="../../../build/drt"/>
+
+        <zip destfile="../../../build/drt/beehive-netui-drt.zip">
+            <zipfileset dir="." prefix="drt"/>
+        </zip>
+    </target>
+
+    <!-- todo: this needs to compost down into runTomcat.xml; until we're sure 
it works, it stays here -->
+    <target name="ensure.deployed" description="Deploy webapp for the test 
recorder">
+        <echo>Ensuring that the webapp ${webapp.name} is deployed on a running 
server at the url ${webapp.waitfor.url}</echo>
+
+        <waitfor maxwait="5" maxwaitunit="second" 
timeoutproperty="unavailable">
+            <http url="${webapp.waitfor.url}"/>
+        </waitfor>
+        <antcall target="do.deploy"/>
+        <antcall target="do.redeploy"/>
+        <fail if="still.unavailable" message="Couldn't find webapp with path 
${webapp.waitfor.url}"/>
+    </target>
+
+    <target name="do.deploy" if="unavailable">
+        <echo>Webapp is not deployed; deploying</echo>
+
+        <antcall target="deploy"/>
+        <echo>...deploy complete</echo>
+
+        <waitfor maxwait="120" maxwaitunit="second" 
timeoutproperty="still.unavailable">
+            <http url="${webapp.waitfor.url}"/>
+        </waitfor>
+    </target>
+
+    <target name="do.redeploy" unless="unavailable">
+        <echo>Webapp is deployed; undeploy and redeploy</echo>
+
+        <antcall target="undeploy"/>
+        <echo>...undeploy complete</echo>
+
+        <antcall target="deploy"/>
+        <echo>...deploy complete</echo>
+
+        <waitfor maxwait="120" maxwaitunit="second" 
timeoutproperty="still.unavailable">
+            <http url="${webapp.waitfor.url}"/>
+        </waitfor>
+    </target>
+
 </project>

Added: incubator/beehive/trunk/controls/test/infra/tch/schema.jar
==============================================================================
Binary file. No diff available.

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/basic/Event.java
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/basic/Event.java
       Tue Aug 10 22:38:48 2004
@@ -0,0 +1,35 @@
+package org.apache.beehive.controls.test.controls.basic;
+
+import org.apache.beehive.controls.api.bean.ControlInterface;
+import org.apache.beehive.controls.api.events.EventSet;
+
+/**
+ * This is a basic control that tests event support code generation and 
runtime behavior
+ * for ControlBeans.
+ * <p>
+ * There is not currently a DRT test cases that exercises this control, but 
having it here
+ * will at least exercise callback event handling codegen paths.
+ */
[EMAIL PROTECTED]
+public interface Event
+{
+    @EventSet
+    public interface EventSet1
+    {
+        public void set1Method1();
+        public int set1Method2();
+        public boolean set1OverloadedMethod();
+        public boolean set1OverloadedMethod(int anArg);
+    }
+
+    @EventSet
+    public interface EventSet2
+    {
+        public void set2Method1();
+        public int set2Method2();
+        public boolean set2OverloadedMethod();
+        public boolean set2OverloadedMethod(int anArg);
+    }
+
+    public void testEvents();
+}

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/basic/EventImpl.jcs
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/basic/EventImpl.jcs
    Tue Aug 10 22:38:48 2004
@@ -0,0 +1,18 @@
+package org.apache.beehive.controls.test.controls.basic;
+
+import org.apache.beehive.controls.api.bean.ControlImplementation;
+import org.apache.beehive.controls.api.events.Client;
+
[EMAIL PROTECTED]
+public class EventImpl implements Event
+{
+    @Client Event.EventSet1 eventSet1;
+    @Client Event.EventSet2 eventSet2;
+
+    public void testEvents() 
+    {
+        eventSet1.set1Method1();
+
+        eventSet2.set2Method2();
+    }
+}

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/basic/Hello.java
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/basic/Hello.java
       Tue Aug 10 22:38:48 2004
@@ -0,0 +1,45 @@
+package org.apache.beehive.controls.test.controls.basic;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.beehive.controls.api.bean.ControlInterface;
+import org.apache.beehive.controls.api.properties.PropertySet;
+
[EMAIL PROTECTED]
+public interface Hello
+{
+    //
+    // A simple enumerated type used to customize the greeting by gender
+    //
+    public enum GenderType
+    {
+        NEUTRAL, MALE, FEMALE
+    }
+
+    public @interface Gender
+    {
+        GenderType value();
+    }
+
+    /**
+     * Declare a simple PropertySet, that allows the salutation used by the 
custom
+     * control to be customized.
+     */
+    @PropertySet
+    @Target( {ElementType.TYPE, ElementType.FIELD, ElementType.METHOD} )
+    @Retention(RetentionPolicy.RUNTIME)
+    public @interface Greeting
+    {
+        String salutation() default "Hello";
+        Gender gender() default @Gender(GenderType.NEUTRAL);
+    }
+
+    java.lang.String hello(java.lang.String name);
+
+    java.lang.String lastVisitor();
+
+    int visitorCount();
+}

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/basic/HelloImpl.jcs
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/basic/HelloImpl.jcs
    Tue Aug 10 22:38:48 2004
@@ -0,0 +1,41 @@
+package org.apache.beehive.controls.test.controls.basic;
+
+import java.lang.reflect.Method;
+
+import org.apache.beehive.controls.api.bean.ControlImplementation;
+import org.apache.beehive.controls.api.bean.Extensible;
+
[EMAIL PROTECTED]
+public class HelloImpl implements Hello, Extensible
+{ 
+    public String _lastVisitor = "<none>";
+    int _visitorCount = 0;
+
+    public String hello(String name)
+    {
+        _lastVisitor = name;
+        _visitorCount++;
+        return "Hello, " + name;
+    }
+
+    public String lastVisitor()
+    {
+        return _lastVisitor;
+    }
+
+    public int visitorCount()
+    {
+        return _visitorCount;
+    }
+
+    /**
+     * Implements the Extensible.invoke interface when a JCX-declared method 
is called
+     */
+    public Object invoke(Method method, Object [] args)
+    {
+        //
+        // To Be Implemented
+        //
+        return null; 
+    }
+} 

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/basic/OperExcept.jcx
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/basic/OperExcept.jcx
   Tue Aug 10 22:38:48 2004
@@ -0,0 +1,23 @@
+package org.apache.beehive.controls.test.controls.basic;
+
+import java.io.IOException;
+import org.apache.beehive.controls.api.bean.ControlExtension;
+
+/**
+ * This is a test extension that declares operations throwing different types 
of exceptions
+ * <p>
+ */
[EMAIL PROTECTED]
+public interface OperExcept extends Operation
+{
+    public class LocalException extends Exception
+    {
+        LocalException(String message) { super(message); }
+    }
+
+    public void noException(Exception toThrow);
+    public void baseException(Exception toThrow) throws Exception;
+    public void runtimeException(Exception toThrow) throws RuntimeException;
+    public void multiException(Exception toThrow) throws 
IllegalAccessException, IOException;
+    public void localException(Exception toThrow) throws LocalException;
+}

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/basic/OperExtend.jcx
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/basic/OperExtend.jcx
   Tue Aug 10 22:38:48 2004
@@ -0,0 +1,20 @@
+package org.apache.beehive.controls.test.controls.basic;
+
+import org.apache.beehive.controls.api.bean.ControlExtension;
+
+/**
+ * This is a test extension that declares operations of various types
+ * <p>
+ */
[EMAIL PROTECTED]
+public interface OperExtend extends Operation
+{
+    public void voidExtOperation();
+    public int  intExtOperation(int intArg);
+    public int [] intArrayExtOperation(int [] intArrayArg);
+    public int [][] intMultiArrayExtOperation(int [][] intMultiArrayArg);
+    public Integer integerExtOperation(Integer integerArg);
+    public Integer [] integerArrayExtOperation(Integer [] integerArrayArg);
+    public Integer [][] integerMultiArrayExtOperation(Integer [][] 
integerMultiArrayArg);
+    public Object [] multiArgsExtOperation(int intArg, Integer integerArg, 
String stringArg);
+}

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/basic/Operation.java
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/basic/Operation.java
   Tue Aug 10 22:38:48 2004
@@ -0,0 +1,27 @@
+package org.apache.beehive.controls.test.controls.basic;
+
+import org.apache.beehive.controls.api.bean.ControlInterface;
+
+/**
+ * This is a test interface that declares operations of various types
+ * <p>
+ */
[EMAIL PROTECTED]
+public interface Operation
+{
+    public class LocalArg
+    {
+        int intArg;
+        String stringArg;
+    }
+
+    public void voidOperation();
+    public int  intOperation(int intArg);
+    public int [] intArrayOperation(int [] intArrayArg);
+    public int [][] intMultiArrayOperation(int [][] intMultiArrayArg);
+    public Integer integerOperation(Integer integerArg);
+    public Integer [] integerArrayOperation(Integer [] integerArrayArg);
+    public Integer [][] integerMultiArrayOperation(Integer [][] 
integerMultiArrayArg);
+    public Object [] multiArgsOperation(int intArg, Integer integerArg, String 
stringArg);
+    public LocalArg localArgOperation(LocalArg localArg);
+}

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/basic/OperationImpl.jcs
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/basic/OperationImpl.jcs
        Tue Aug 10 22:38:48 2004
@@ -0,0 +1,39 @@
+package org.apache.beehive.controls.test.controls.basic;
+
+import org.apache.beehive.controls.api.bean.ControlImplementation;
+import org.apache.beehive.controls.api.bean.Extensible;
+import org.apache.beehive.controls.api.events.Client;
+
[EMAIL PROTECTED]
+public class OperationImpl implements Operation
+{
+    public void voidOperation() {};
+    public int  intOperation(int intArg) { return intArg; }
+    public int [] intArrayOperation(int [] intArrayArg) { return intArrayArg; }
+    public int [][] intMultiArrayOperation(int [][] intMultiArrayArg) { return 
intMultiArrayArg; }
+    public Integer integerOperation(Integer integerArg) { return integerArg; }
+    public Integer [] integerArrayOperation(Integer [] integerArrayArg) { 
return integerArrayArg; }
+    public Integer [][] integerMultiArrayOperation(Integer [][] 
integerMultiArrayArg) { return integerMultiArrayArg; }
+    public Object [] multiArgsOperation(int intArg, Integer integerArg, String 
stringArg)
+    {
+        return new Object [] { intArg, integerArg, stringArg };
+    }
+    public LocalArg localArgOperation(LocalArg localArg) { return localArg; }
+
+    public Object invoke(Object [] args) throws Throwable
+    {
+        // If the argument is an exception, throw it
+        if (args[0] instanceof Throwable)
+            throw (Throwable)args[0];
+
+        // otherwise, just echo it back, following the pattern above.
+        if (args.length == 1)
+        {
+            return args[0];
+        } 
+        else
+        {
+            return args;
+        }
+    }
+}

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/context/BaseContext.java
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/context/BaseContext.java
       Tue Aug 10 22:38:48 2004
@@ -0,0 +1,16 @@
+package org.apache.beehive.controls.test.controls.context;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.beehive.controls.api.bean.ControlInterface;
+import org.apache.beehive.controls.api.context.Context;
+import org.apache.beehive.controls.api.properties.PropertySet;
+
[EMAIL PROTECTED]
+public interface BaseContext
+{
+    java.lang.String hello(java.lang.String name);
+}

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/context/BaseContextImpl.jcs
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/context/BaseContextImpl.jcs
    Tue Aug 10 22:38:48 2004
@@ -0,0 +1,45 @@
+package org.apache.beehive.controls.test.controls.context;
+
+import java.lang.reflect.Method;
+
+import org.apache.beehive.controls.api.bean.ControlImplementation;
+import org.apache.beehive.controls.api.context.Context;
+import org.apache.beehive.controls.api.context.ControlBeanContext;
+import org.apache.beehive.controls.api.context.ControlBeanContext.LifeCycle;
+import org.apache.beehive.controls.api.context.ResourceContext;
+import org.apache.beehive.controls.api.context.ResourceContext.ResourceEvents;
+import org.apache.beehive.controls.api.events.EventHandler;
+
+import org.apache.beehive.controls.test.controls.util.TestContext;
+
[EMAIL PROTECTED]
+public class BaseContextImpl implements BaseContext
+{ 
+    @Context ControlBeanContext context;
+    @Context ResourceContext resourceContext;
+    @Context TestContext testContext;
+
+    public String hello(String name)
+    {
+        testContext.addEvent("BaseContextImpl.hello " + name);
+        return "Hello, " + name;
+    }
+    
+    @EventHandler (field="context", eventSet=LifeCycle.class, 
eventName="onCreate")
+    public void onCreate() 
+    {
+        testContext.addEvent("BaseContextImpl.onCreate");
+    }
+
+    @EventHandler (field="resourceContext", eventSet=ResourceEvents.class, 
eventName="onAcquire")
+    /* package */ void onAcquire() 
+    {
+        testContext.addEvent("BaseContextImpl.onAcquire");
+    }
+
+    @EventHandler (field="resourceContext", eventSet=ResourceEvents.class, 
eventName="onRelease")
+    protected void onRelease()
+    {
+        testContext.addEvent("BaseContextImpl.onRelease");
+    }
+}

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/context/ServiceGetter.java
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/context/ServiceGetter.java
     Tue Aug 10 22:38:48 2004
@@ -0,0 +1,13 @@
+package org.apache.beehive.controls.test.controls.context;
+
+import java.lang.annotation.Annotation;
+import org.apache.beehive.controls.api.bean.ControlInterface;
+
+/**
+ * A simple control that retrieve specific service
+ */
[EMAIL PROTECTED]
+public interface ServiceGetter
+{
+       public String getService(Class theService, Object selector);
+}
\ No newline at end of file

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/context/ServiceGetterImpl.jcs
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/context/ServiceGetterImpl.jcs
  Tue Aug 10 22:38:48 2004
@@ -0,0 +1,29 @@
+package org.apache.beehive.controls.test.controls.context;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+
+import org.apache.beehive.controls.api.bean.ControlImplementation;
+import org.apache.beehive.controls.api.bean.Control;
+import org.apache.beehive.controls.api.context.Context;
+import org.apache.beehive.controls.api.context.ControlBeanContext;
+
+/**
+ * A impl that retrieves specific service via controlContext
+ */
[EMAIL PROTECTED]
+public class ServiceGetterImpl implements ServiceGetter
+{ 
+
+       @Context ControlBeanContext context;
+
+       public String getService(Class theService, Object selector){
+               
+               Object obj=context.getService(theService, selector);
+               if (obj==null)
+                       return "-1";
+               else
+                       return "0";
+       }
+
+} 

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/contextevent/Recorder.java
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/contextevent/Recorder.java
     Tue Aug 10 22:38:48 2004
@@ -0,0 +1,12 @@
+package org.apache.beehive.controls.test.controls.contextevent;
+
+import org.apache.beehive.controls.api.bean.ControlInterface;
+
+/**
+ * A simple control that records its lifecycle events in its impl
+ */
[EMAIL PROTECTED]
+public interface Recorder
+{
+    public String getRecord();
+}

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/contextevent/RecorderImpl.jcs
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/contextevent/RecorderImpl.jcs
  Tue Aug 10 22:38:48 2004
@@ -0,0 +1,64 @@
+package org.apache.beehive.controls.test.controls.contextevent;
+
+import org.apache.beehive.controls.api.context.Context;
+import org.apache.beehive.controls.api.context.ControlBeanContext;
+import org.apache.beehive.controls.api.context.ResourceContext;
+import org.apache.beehive.controls.api.bean.ControlImplementation;
+import org.apache.beehive.controls.api.events.EventHandler;
+
+/**
+ * A control impl that listens to and records its lifecycle events
+ * This impl listens to context event by declaring EventHandler
+ */
+
[EMAIL PROTECTED] 
+public class RecorderImpl implements Recorder
+{
+
+    private String event_log="init";
+    
+    @Context ControlBeanContext context;
+    @Context ResourceContext resourceContext;
+    
+    /*A EventHandler that listens to onCreate event*/
+    @EventHandler(field="context", 
eventSet=ControlBeanContext.LifeCycle.class, eventName="onCreate")
+    public void onCreate()
+    {
+       System.out.println("+++++++++++++++++++++++++++++++++++++++++");
+        System.out.println("onCreate on SimpleControlImpl");
+        System.out.println("++++++++++++++++++++++++++++++++++++++++++");
+
+       event_log=event_log+"onCreate";
+    }
+
+    /*A EventHandler that listens to onAcquire event*/
+    @EventHandler(field="resourceContext", 
eventSet=ResourceContext.ResourceEvents.class, eventName="onAcquire")
+    public void onAcquire()
+    {
+       System.out.println("+++++++++++++++++++++++++++++++++++++++++");
+        System.out.println("onAcquire on SimpleControlImpl");
+        System.out.println("++++++++++++++++++++++++++++++++++++++++++");
+       event_log=event_log+"onAcquire";
+    }
+
+    /*A EventHandler that listens to onRelease event*/
+    @EventHandler(field="resourceContext", 
eventSet=ResourceContext.ResourceEvents.class, eventName="onRelease")
+    public void onRelease()
+    {
+       System.out.println("+++++++++++++++++++++++++++++++++++++++++");
+        System.out.println("onRelease on SimpleControlImpl");
+        System.out.println("++++++++++++++++++++++++++++++++++++++++++");
+
+       event_log=event_log+"onRelease";
+    }
+    
+    /*Returns the event log*/
+    public String getRecord()
+    {
+       System.out.println("+++++++++++++++++++++++++++++++++++++++++");
+        System.out.println("method on SimpleControlImpl invoked");
+        System.out.println("++++++++++++++++++++++++++++++++++++++++++");
+        
+       return event_log;
+    }
+}

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/event/Hello.java
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/event/Hello.java
       Tue Aug 10 22:38:48 2004
@@ -0,0 +1,34 @@
+package org.apache.beehive.controls.test.controls.event;
+
+import org.apache.beehive.controls.api.bean.ControlInterface;
+import org.apache.beehive.controls.api.events.EventSet;
+
+/**
+ * A ControlInterface that declares three events
+ */
[EMAIL PROTECTED]
+public interface Hello
+{
+
+    @EventSet
+    public interface EventSet0
+    {}
+
+
+    @EventSet
+    public interface EventSet1
+    {
+        public void method1();
+    }
+
+    @EventSet
+    public interface EventSet2
+    {
+        public void method1();
+        public int set2Method2();
+        public boolean set2OverloadedMethod();
+        public boolean set2OverloadedMethod(int anArg);
+    }
+
+    public void triggerEvents();
+}

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/event/HelloImpl.jcs
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/event/HelloImpl.jcs
    Tue Aug 10 22:38:48 2004
@@ -0,0 +1,21 @@
+package org.apache.beehive.controls.test.controls.event;
+
+import org.apache.beehive.controls.api.bean.ControlImplementation;
+import org.apache.beehive.controls.api.events.Client;
+
+/**
+ * A control implementation that raises events while executing its method
+ */
[EMAIL PROTECTED]
+public class HelloImpl implements Hello
+{
+    @Client Hello.EventSet0 eventSet0;
+    @Client Hello.EventSet1 eventSet1;
+    @Client Hello.EventSet2 eventSet2;
+
+    public void triggerEvents() 
+    {
+        eventSet1.method1();
+        eventSet2.set2Method2();
+    }
+}

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/extension/ExtensibleControl.java
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/extension/ExtensibleControl.java
       Tue Aug 10 22:38:48 2004
@@ -0,0 +1,28 @@
+package org.apache.beehive.controls.test.controls.extension;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import org.apache.beehive.controls.api.bean.ControlInterface;
+import org.apache.beehive.controls.api.properties.PropertySet;
+
+/**
+ * A control interface with one method and one propertySet
+ */
[EMAIL PROTECTED]
+public interface ExtensibleControl
+{
+       static final String CURRENT_POSITION = "In_ExtensibleControl_Interface";
+       static final String CURRENT_LAYER = "On_ExtensibleControl_Layer";
+
+       @PropertySet
+       @Retention(RetentionPolicy.RUNTIME)
+       public @interface WhereAbout
+       {
+               String Position() default CURRENT_POSITION;
+               String Layer() default CURRENT_LAYER;
+    }
+
+    public String hello();
+
+    public String getLayerByContext();
+}

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/extension/ExtensibleControlImpl.jcs
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/extension/ExtensibleControlImpl.jcs
    Tue Aug 10 22:38:48 2004
@@ -0,0 +1,37 @@
+package org.apache.beehive.controls.test.controls.extension;
+
+import java.lang.reflect.Method;
+import org.apache.beehive.controls.api.context.Context;
+import org.apache.beehive.controls.api.context.ControlBeanContext;
+import org.apache.beehive.controls.api.bean.ControlImplementation;
+import org.apache.beehive.controls.api.bean.Extensible;
+
+/**
+ * A control impl.
+ * By implementing Extensible, this impl makes itself extensible
+ */
+
[EMAIL PROTECTED] 
+public class ExtensibleControlImpl implements ExtensibleControl, Extensible
+{
+    @Context ControlBeanContext context;
+
+    public String hello()
+    {
+       return "Hello from super control";
+    }
+    
+    public String getLayerByContext()
+    {
+       /**BUG: could not refer to Greeting directly*/
+        WhereAbout 
whereabout=(WhereAbout)context.getControlPropertySet(WhereAbout.class);
+        
+        return whereabout.Layer();
+    }
+    
+    public Object invoke(Method m, Object[] args)throws Throwable
+    {
+       return null;
+    }
+    
+}

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/extension/SubControl.java
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/extension/SubControl.java
      Tue Aug 10 22:38:48 2004
@@ -0,0 +1,31 @@
+package org.apache.beehive.controls.test.controls.extension;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import org.apache.beehive.controls.api.bean.ControlExtension;
+import org.apache.beehive.controls.api.properties.PropertySet;
+
+/**
+ * A sub control extending ExtensibleControl.
+ * This control declares one new method and one new propertySet.
+ * It also resets the value of the propertySet inherited from 
ExtensibleControl.
+ *
+ * It will access another property inherited from ExtensibleControl in its 
impl.
+ */
[EMAIL PROTECTED]
[EMAIL PROTECTED](Layer="On_SubControl_Interface_Layer")
+public interface SubControl extends ExtensibleControl
+{
+
+    static final String A_MESSAGE = "New Property Declared by Sub Control";
+
+       @PropertySet
+       @Retention(RetentionPolicy.RUNTIME)
+       public @interface NewProperty
+       {
+               String Message() default A_MESSAGE;
+    }
+
+    public String hello2();
+    public String accessInheritedProperty();
+}

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/extension/SubControlImpl.jcs
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/extension/SubControlImpl.jcs
   Tue Aug 10 22:38:48 2004
@@ -0,0 +1,28 @@
+package org.apache.beehive.controls.test.controls.extension;
+
+import org.apache.beehive.controls.api.context.Context;
+import org.apache.beehive.controls.api.context.ControlBeanContext;
+import org.apache.beehive.controls.api.bean.ControlImplementation;
+
+/**
+ * A control impl of a SubControl and extending ExtensibleControlImpl.
+ * It access the propertySet inherited from ExtensibleControl.
+ */
[EMAIL PROTECTED] 
+public class SubControlImpl extends ExtensibleControlImpl implements SubControl
+{
+    @Context ControlBeanContext context;
+
+    public String hello2()
+    {
+       return "Hello from subcontrol";
+    }
+    /*Accessing the propertySet inherited from ExtensibleControl*/
+    public String accessInheritedProperty()
+    {
+        /**Bug: could not refer to WhereAbout directly*/
+        ExtensibleControl.WhereAbout 
where=(ExtensibleControl.WhereAbout)context.getControlPropertySet(ExtensibleControl.WhereAbout.class);
+        
+        return where.Position();    
+    }
+}

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/property/NestProps.java
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/property/NestProps.java
        Tue Aug 10 22:38:48 2004
@@ -0,0 +1,28 @@
+package org.apache.beehive.controls.test.controls.property;
+
+import java.lang.annotation.Annotation;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.beehive.controls.api.bean.ControlInterface;
+import org.apache.beehive.controls.api.properties.PropertyKey;
+import org.apache.beehive.controls.api.properties.PropertySet;
+
+/**
+ * A simple control that nests the Props control, for nested property testing.
+ */
[EMAIL PROTECTED]
+public interface NestProps
+{
+    //
+    // Returns a propertySet value for a simple nested control
+    //
+    public Annotation getControlPropertySet(Class propertySet);
+
+    //
+    // Returns a propertySet value for an extension nested control
+    //
+    public Annotation getExtensionControlPropertySet(Class propertySet);
+}

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/property/NestPropsImpl.jcs
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/property/NestPropsImpl.jcs
     Tue Aug 10 22:38:48 2004
@@ -0,0 +1,39 @@
+package org.apache.beehive.controls.test.controls.property;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+
+import org.apache.beehive.controls.api.bean.ControlImplementation;
+import org.apache.beehive.controls.api.bean.Control;
+import org.apache.beehive.controls.api.bean.Extensible;
+import org.apache.beehive.controls.api.context.Context;
+import org.apache.beehive.controls.api.context.ControlBeanContext;
+import org.apache.beehive.controls.api.properties.PropertySet;
+
[EMAIL PROTECTED]
+public class NestPropsImpl implements NestProps
+{ 
+    static final long serialVersionUID = 1L;
+
+    @Control 
+    @Props.SimpleProps(simpleString="A field annotation value")
+    Props propControl;
+
+    @Control 
+    @PropsExtension.ArrayProps(arrayString={"One","Two","Three"})
+    private PropsExtension propExtControl;
+
+    /**
+     * Provides a simple test API to externally query the PropertySet values 
on a
+     * nested control.
+     */
+    public Annotation getControlPropertySet(Class propertySet)
+    {
+        return propControl.getControlPropertySet(propertySet);
+    }
+
+    public Annotation getExtensionControlPropertySet(Class propertySet)
+    {
+        return propExtControl.getControlPropertySet(propertySet);
+    }
+} 

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/property/Props.java
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/property/Props.java
    Tue Aug 10 22:38:48 2004
@@ -0,0 +1,99 @@
+package org.apache.beehive.controls.test.controls.property;
+
+import java.lang.annotation.Annotation;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.beehive.controls.api.bean.ControlInterface;
+import org.apache.beehive.controls.api.properties.PropertyKey;
+import org.apache.beehive.controls.api.properties.PropertySet;
+
+/**
+ * A simple control that can be used for property testing of basic primitive 
properties,
+ * as well as nested an array property types.
+ */
[EMAIL PROTECTED]
+public interface Props
+{
+    //
+    // A simple enumeration used to test enum annotations
+    //
+    public enum SimpleEnum { ChoiceA, ChoiceB, ChoiceC; }
+
+    //
+    // Define static final constants for SimpleProps defaults
+    //
+    static final int INT_DEFAULT = 87;
+    static final String STRING_DEFAULT = "Hello";
+    static final Class CLASS_DEFAULT = java.lang.Object.class;
+    static final SimpleEnum ENUM_DEFAULT = SimpleEnum.ChoiceA;
+
+    //
+    //
+    // Define a PropertySet that tests simple types
+    //
+    @PropertySet
+    @Retention(RetentionPolicy.RUNTIME)
+    @Target( {ElementType.TYPE, ElementType.FIELD, ElementType.METHOD} )
+    public @interface SimpleProps
+    {
+        int simpleInt() default INT_DEFAULT;
+        String simpleString() default STRING_DEFAULT;
+        Class simpleClass() default java.lang.Object.class;
+        SimpleEnum simpleEnum() default SimpleEnum.ChoiceA;
+    }
+
+    //
+    // Define static final constants for ArrayProps defaults
+    //
+    static final int [] ARRAY_INT_DEFAULT = {99, 33, 66, 22};
+    static final String [] ARRAY_STRING_DEFAULT = {"How", "are", "you", ",", 
"today", "?"};
+    static final Class [] ARRAY_CLASS_DEFAULT = {java.util.HashMap.class, 
java.util.Iterator.class};
+    static final SimpleEnum [] ARRAY_ENUM_DEFAULT = { SimpleEnum.ChoiceB, 
SimpleEnum.ChoiceC };
+
+    //
+    // Define a PropertySet that tests array types
+    //
+    @PropertySet
+    @Retention(RetentionPolicy.RUNTIME)
+    @Target( {ElementType.TYPE, ElementType.FIELD} )
+    public @interface ArrayProps
+    {
+        int [] arrayInt() default {99, 33, 66, 22};
+        String [] arrayString() default {"How", "are", "you", ",", "today", 
"?"};
+        Class [] arrayClass() default {java.util.HashMap.class, 
java.util.Iterator.class};
+        SimpleEnum [] arrayEnum() default { SimpleEnum.ChoiceB, 
SimpleEnum.ChoiceC };
+    }
+
+    //
+    // Define static final constants for SimpleProps defaults
+    //
+    static final int ANNOT_INT_DEFAULT = 9999999;
+    static final String ANNOT_STRING_DEFAULT = "Hola";
+    static final Class ANNOT_CLASS_DEFAULT = java.beans.Beans.class;
+    static final SimpleEnum ANNOT_ENUM_DEFAULT = SimpleEnum.ChoiceC;
+
+    //
+    // Define a PropertySet that tests properties that are themselves 
annotation types
+    //
+    @PropertySet
+    @Retention(RetentionPolicy.RUNTIME)
+    @Target( {ElementType.TYPE, ElementType.FIELD, ElementType.METHOD} )
+    public @interface TestAnnot
+    {
+        SimpleProps simpleAnnot()
+            default @SimpleProps(
+                simpleInt = ANNOT_INT_DEFAULT,
+                simpleString = ANNOT_STRING_DEFAULT,
+                simpleClass =  java.beans.Beans.class,
+                simpleEnum = SimpleEnum.ChoiceC);
+        ArrayProps arrayAnnot();
+    }
+
+    //
+    // Define property keys to enable access to test members in a PropertyMap
+    //
+    public Annotation getControlPropertySet(Class propertySet);
+}

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/property/PropsExtension.jcx
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/property/PropsExtension.jcx
    Tue Aug 10 22:38:48 2004
@@ -0,0 +1,25 @@
+package org.apache.beehive.controls.test.controls.property;
+
+import org.apache.beehive.controls.api.bean.ControlExtension;
+
+import org.apache.beehive.controls.api.properties.PropertyKey;
+
+/**
+ * Defines a new extension interface that derives from Props
+ */
[EMAIL PROTECTED]
[EMAIL PROTECTED](simpleInt=3)   // matches INT_PRIM_VALUE below
+public interface PropsExtension extends Props
+{
+    // the class annotation value set above
+    public static int SIMPLE_INT_VALUE = 3;
+
+    // the method annotation vales set below
+    public static Class SIMPLE_CLASS_VALUE1 = java.beans.Beans.class;
+    public static Class SIMPLE_CLASS_VALUE2 = 
org.apache.beehive.controls.api.bean.ControlBean.class;
+    @SimpleProps (simpleClass=java.beans.Beans.class)
+    public Object getPropertySetOnMethod1(Class propertySet);
+
+    @SimpleProps 
(simpleClass=org.apache.beehive.controls.api.bean.ControlBean.class)
+    public Object getPropertySetOnMethod2(Class propertySet);
+}

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/property/PropsImpl.jcs
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/property/PropsImpl.jcs
 Tue Aug 10 22:38:48 2004
@@ -0,0 +1,41 @@
+package org.apache.beehive.controls.test.controls.property;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+
+import org.apache.beehive.controls.api.bean.ControlImplementation;
+import org.apache.beehive.controls.api.bean.Extensible;
+import org.apache.beehive.controls.api.context.Context;
+import org.apache.beehive.controls.api.context.ControlBeanContext;
+import org.apache.beehive.controls.api.properties.PropertySet;
+
[EMAIL PROTECTED]
+public class PropsImpl implements Props, Extensible
+{ 
+    static final long serialVersionUID = 1L;
+
+    @Context
+    ControlBeanContext context;
+
+    /**
+     * Provides a simple test API to externally query the control instance 
PropertySet values 
+     * returned by ControlBeanContext APIs
+     */
+    public Annotation getControlPropertySet(Class propertySet)
+    {
+        return context.getControlPropertySet(propertySet);
+    }
+
+    /**
+     * This implementation of Extensible.invoke allows the testing of 
annotations found
+     * on JCX methods
+     */
+    public Object invoke(Method m, Object [] args) throws Throwable
+    {
+        if (!(args[0] instanceof Class) || 
+            !(((Class)args[0]).isAnnotationPresent(PropertySet.class)))
+            throw new IllegalArgumentException("Arg 0 must be an PropertySet 
interface!");
+
+        return context.getMethodPropertySet(m, (Class)args[0]);
+    }
+} 

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/property/SingleProperty.java
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/property/SingleProperty.java
   Tue Aug 10 22:38:48 2004
@@ -0,0 +1,24 @@
+package org.apache.beehive.controls.test.controls.property;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import org.apache.beehive.controls.api.bean.ControlInterface;
+import org.apache.beehive.controls.api.properties.PropertySet;
+
+/**
+ * A control interface with one propertySet and one method declared
+ */
[EMAIL PROTECTED]
+public interface SingleProperty
+{
+       static final String GREET_DEFAULT = "Hello";
+
+       @PropertySet
+       @Retention(RetentionPolicy.RUNTIME)
+       public @interface Greeting
+       {
+               public String GreetWord() default GREET_DEFAULT;
+    }
+
+       public String sayHello();
+}
\ No newline at end of file

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/property/SingleProperty2.java
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/property/SingleProperty2.java
  Tue Aug 10 22:38:48 2004
@@ -0,0 +1,24 @@
+package org.apache.beehive.controls.test.controls.property;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import org.apache.beehive.controls.api.bean.ControlInterface;
+import org.apache.beehive.controls.api.properties.PropertySet;
+
+/**
+ * A control interface with one propertySet and one method declared
+ */
[EMAIL PROTECTED]
+public interface SingleProperty2
+{
+       static final String GREET_DEFAULT = "Hello";
+
+       @PropertySet
+       @Retention(RetentionPolicy.RUNTIME)
+       public @interface Greeting
+       {
+               public String GreetWord() default GREET_DEFAULT;
+    }
+
+       public String sayHello();
+}
\ No newline at end of file

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/property/SingleProperty2Impl.jcs
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/property/SingleProperty2Impl.jcs
       Tue Aug 10 22:38:48 2004
@@ -0,0 +1,22 @@
+package org.apache.beehive.controls.test.controls.property;
+
+import org.apache.beehive.controls.api.bean.ControlImplementation;
+import org.apache.beehive.controls.api.context.Context;
+import org.apache.beehive.controls.api.context.ControlBeanContext;
+
+/**
+ * A control impl
+ * Test client shall retrieve the property value via the getter/setter
+ * in the generated bean class
+ */
[EMAIL PROTECTED]
+public class SingleProperty2Impl implements SingleProperty2
+{ 
+    @Context ControlBeanContext context;
+
+    public String sayHello()
+    {
+       return "Hello";
+    }
+
+} 

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/property/SinglePropertyImpl.jcs
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/property/SinglePropertyImpl.jcs
        Tue Aug 10 22:38:48 2004
@@ -0,0 +1,25 @@
+package org.apache.beehive.controls.test.controls.property;
+
+import org.apache.beehive.controls.api.bean.ControlImplementation;
+import org.apache.beehive.controls.api.context.Context;
+import org.apache.beehive.controls.api.context.ControlBeanContext;
+
+/**
+ * A control impl that access the property declared in its control interface
+ */
+
[EMAIL PROTECTED]
+public class SinglePropertyImpl implements SingleProperty
+{ 
+    @Context ControlBeanContext context;
+
+    /*Accesses the propertySet value and returns the value*/
+    public String sayHello()
+    {
+       /**BUG: could not refer to Greeting directly*/
+        Greeting 
greeting=(SingleProperty.Greeting)context.getControlPropertySet(SingleProperty.Greeting.class);
+        
+        return greeting.GreetWord();
+    }
+
+} 
\ No newline at end of file

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/util/TestBeanContext.java
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/util/TestBeanContext.java
      Tue Aug 10 22:38:48 2004
@@ -0,0 +1,100 @@
+package org.apache.beehive.controls.test.controls.util;
+
+import java.beans.beancontext.BeanContextServices;
+import java.beans.beancontext.BeanContextServiceProvider;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Vector;
+import java.util.Arrays;
+
+import org.apache.beehive.controls.runtime.bean.ControlContainerContext;
+
+/**
+ * The TestBeanContext is a simple standalone bean context intended to be used 
as a test harness
+ * for control drt tests.  The goal is to enable controls to be instantiated 
and used within
+ * a standalone VM, and to give the client control of ControlContainerContext 
behavior, such
+ * as resource scoping.
+ */
+public class TestBeanContext extends ControlContainerContext implements 
TestContext
+{
+    /**
+     * The ControlBeanContextProvider inner class acts as a single BeanContext 
service
+     * provider for the ControlBeanContext service class.  The implementation 
is simple,
+     * because the runtime ControlBeanContext implementation class directly 
implements
+     * this interface.
+     */
+    private static class TestContextProvider implements 
BeanContextServiceProvider
+    {
+        //
+        // BeanContextServiceProvider.getService()
+        //
+        public Object getService(BeanContextServices bcs, Object requestor, 
Class serviceClass,
+                                 Object serviceSelector)
+        {
+            //
+            // Contextual services for a ControlBean is provided by the peer 
context
+            // instance.
+            //
+            return bcs;
+        }
+
+        //
+        // BeanContextServiceProvider.releaseService()
+        //
+        public void releaseService(BeanContextServices bcs, Object requestor, 
Object service)
+        {
+            // noop, because context exists whether referenced or not
+        }
+
+        //
+        // BeanContextServiceProvider.getContextServiceSelectors()
+        //
+        public Iterator getCurrentServiceSelectors(BeanContextServices bcs, 
Class serviceClass)
+        {
+            return null;    // no selectors
+        }
+    }
+
+    /**
+     * A singleton instance of the ControlBeanContextProvider class is that 
will be registered
+     * on all ControlBeanContext instances.  The provider can be a singleton 
because it is
+     * completely stateless and thread-safe.
+     */
+    static private TestContextProvider theProvider = new TestContextProvider();
+
+    /**
+     * Called by BeanContextSupport superclass during construction and 
deserialization to
+     * initialize subclass transient state
+     */
+    public void initialize()
+    {
+        super.initialize();
+
+        //
+        // Register the ControlBeanContext provider on all new context 
instances.
+        //
+        
addService(org.apache.beehive.controls.test.controls.util.TestContext.class, 
theProvider);
+    }
+
+    // TestContext.addEvent()
+    public void addEvent(String event)
+    {
+        _events.add(event);
+    }
+
+    // TestContext.resetEvents()
+    public void resetEvents()
+    {
+        _events.clear();
+    }
+
+    // TestContext.getEvents();
+    public String [] getEvents()
+    {
+        String [] retval = new String [_events.size()];
+        _events.toArray(retval);
+        return retval;
+    }
+
+    Vector<String> _events = new Vector<String>();
+}

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/util/TestContext.java
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/controls/util/TestContext.java
  Tue Aug 10 22:38:48 2004
@@ -0,0 +1,16 @@
+package org.apache.beehive.controls.test.controls.util;
+
+import java.util.Collection;
+
+/**
+ * The TestContext is contextual service interface that is part of the basic 
test harness
+ * It is implemented by the TestBeanContext class
+ */
+public interface TestContext
+{
+    public void addEvent(String event);
+
+    public void resetEvents();
+
+    public String [] getEvents();
+}

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/driver/instantiate/DriveHelloControl.java
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/driver/instantiate/DriveHelloControl.java
       Tue Aug 10 22:38:48 2004
@@ -0,0 +1,37 @@
+package org.apache.beehive.controls.test.driver.instantiate;
+
+import org.apache.beehive.test.tools.milton.common.Report;
+import org.apache.beehive.controls.test.controls.instantiate.HelloControlBean;
+
+/* This class contains the logic to test HelloControlBean
+       It will exercise the control in a certain way and generate a
+       test result report
+ */
+
+public class DriveHelloControl
+{
+       private HelloControlBean myControl;
+
+       public void setControl(HelloControlBean bean){
+
+               myControl=bean;
+       }
+
+       public Report doTest(){
+
+               Report report=new Report();
+
+               if (myControl==null)
+                       report.setStatus(Report.FAIL);
+               else
+               {
+                       if (myControl.hello(Report.PASS).equals(Report.PASS))
+                               report.setStatus(Report.PASS);
+                       else
+                               report.setStatus(Report.FAIL);
+
+               }
+               return report;
+       }
+
+}

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/driver/instantiate/DriveSingleProperty.java
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/driver/instantiate/DriveSingleProperty.java
     Tue Aug 10 22:38:48 2004
@@ -0,0 +1,38 @@
+package org.apache.beehive.controls.test.driver.instantiate;
+
+import org.apache.beehive.test.tools.milton.common.Report;
+import org.apache.beehive.controls.test.controls.property.SinglePropertyBean;
+
+/* This class contains the logic to test HelloControlBean
+       It will exercise the control in a certain way and generate a
+       test result report
+ */
+
+public class DriveSingleProperty
+{
+       public static String EXPECTED_GREETING="Good evening!";
+       private SinglePropertyBean myControl;
+
+       public void setControl(SinglePropertyBean aControl){
+
+               myControl=aControl;
+       }
+
+       public Report doTest(){
+
+               Report report=new Report();
+
+               if (myControl==null)
+                       report.setStatus(Report.FAIL);
+               else
+               {
+                       if (myControl.sayHello().equals(EXPECTED_GREETING))
+                               report.setStatus(Report.PASS);
+                       else
+                               report.setStatus(Report.FAIL);
+
+               }
+               return report;
+       }
+
+}

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/driver/property/DriveClientAccess.java
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/driver/property/DriveClientAccess.java
  Tue Aug 10 22:38:48 2004
@@ -0,0 +1,45 @@
+package org.apache.beehive.controls.test.driver.property;
+
+import org.apache.beehive.test.tools.milton.common.Report;
+import org.apache.beehive.controls.test.controls.property.SinglePropertyBean;
+
+/* This class contains the logic to test SinglePropertyBean
+       It will exercise the control in a certain way and generate a
+       test result report
+ */
+
+public class DriveClientAccess
+{
+       public static String EXPECTED_GREETING="Hello";
+       private SinglePropertyBean myControl;
+
+       public void setControl(SinglePropertyBean aControl){
+
+               myControl=aControl;
+       }
+
+       public Report doTest(){
+
+               Report report=new Report();
+
+               if (myControl==null){
+                       report.setStatus(Report.FAIL);
+                       report.setMessage("the control is NULL");
+               }
+               else
+               {   /*
+                       control bean getter/setter is busted.
+                       before it is fixed, just fail this test.
+
+                       if 
(myControl.getGreetingGreetWord().equals(EXPECTED_GREETING))
+                               report.setStatus(Report.PASS);
+                       else
+                               report.setStatus(Report.FAIL);
+                       */
+                       report.setStatus(Report.FAIL);
+                       report.setMessage("control bean getter/setter is 
broken. Check the latest dev status.");
+               }
+               return report;
+       }
+
+}

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/driver/property/DriveClientImpl.java
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/driver/property/DriveClientImpl.java
    Tue Aug 10 22:38:48 2004
@@ -0,0 +1,40 @@
+package org.apache.beehive.controls.test.driver.property;
+
+import org.apache.beehive.test.tools.milton.common.Report;
+import org.apache.beehive.controls.test.controls.property.SinglePropertyBean;
+
+/* This class contains the logic to test SinglePropertyBean
+       It will exercise the control in a certain way and generate a
+       test result report
+ */
+
+public class DriveClientImpl
+{
+       public static String EXPECTED_GREETING="Hello";
+       private SinglePropertyBean myControl;
+
+       public void setControl(SinglePropertyBean aControl){
+
+               myControl=aControl;
+       }
+
+       public Report doTest(){
+
+               Report report=new Report();
+
+               if (myControl==null){
+                       report.setStatus(Report.FAIL);
+                       report.setMessage("the control is NULL");
+               }
+               else
+               {
+                       if (myControl.sayHello().equals(EXPECTED_GREETING))
+                               report.setStatus(Report.PASS);
+                       else
+                               report.setStatus(Report.FAIL);
+
+               }
+               return report;
+       }
+
+}

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/driver/property/DriveImplAccess.java
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/controls/org/apache/beehive/controls/test/driver/property/DriveImplAccess.java
    Tue Aug 10 22:38:48 2004
@@ -0,0 +1,48 @@
+package org.apache.beehive.controls.test.driver.property;
+
+import org.apache.beehive.test.tools.milton.common.Report;
+import org.apache.beehive.controls.test.controls.property.SinglePropertyBean;
+
+/* This class contains the logic to test SinglePropertyBean
+       It will exercise the control in a certain way and generate a
+       test result report
+ */
+
+public class DriveImplAccess
+{
+       public static String EXPECTED_GREETING="Good morning!";
+       private SinglePropertyBean myControl;
+
+       public void setControl(SinglePropertyBean aControl){
+
+               myControl=aControl;
+       }
+
+       public Report doTest(){
+
+               Report report=new Report();
+
+               if (myControl==null){
+                       report.setStatus(Report.FAIL);
+                       report.setMessage("the control is NULL");
+               }
+               else
+               {
+                       /*
+                       Before control bean getter/setter is fix, just fail 
this test
+
+                       myControl.setGreetingGreetWord(EXPECTED_GREETING);
+                       String s=myControl.sayHello();
+
+                       if (s.equals(EXPECTED_GREETING))
+                               report.setStatus(Report.PASS);
+                       else
+                               report.setStatus(Report.FAIL);
+                       */
+                       report.setStatus(Report.FAIL);
+                       report.setMessage("control bean getter/setter is 
broken. Check the latest dev status.");
+               }
+               return report;
+       }
+
+}

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/instantiate/declarative/Controller.jpf
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/instantiate/declarative/Controller.jpf
    Tue Aug 10 22:38:48 2004
@@ -0,0 +1,60 @@
+/*
+ * B E A   S Y S T E M S
+ *
+ * N E T U I
+ *
+ * Copyright (c) 2001-2002  BEA Systems, Inc.
+ *
+ * All Rights Reserved. Unpublished rights reserved under the copyright laws
+ * of the United States. The software contained on this media is proprietary
+ * to and embodies the confidential technology of BEA Systems, Inc. The
+ * possession or receipt of this information does not convey any right to
+ * disclose its contents, reproduce it, or use,  or license the use,
+ * for manufacture or sale, the information or anything described
+ * therein. Any use, disclosure, or reproduction without BEA System's
+ * prior written permission is strictly prohibited.
+ *
+ * $Header:$
+ */
+package instantiate.declarative;
+
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.FormData;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+import org.apache.beehive.controls.api.bean.Control;
+import org.apache.beehive.controls.api.bean.ControlBean;
+import org.apache.beehive.controls.test.controls.instantiate.HelloControlBean;
+import org.apache.beehive.controls.test.driver.instantiate.DriveHelloControl;
+import org.apache.beehive.test.tools.milton.common.Report;
+
+/* Instantiate a custom control declaratively*/
+
[EMAIL PROTECTED](
+    forwards = {
+        @Jpf.Forward(name=Report.RESULTS,path = Report.RESULTSJSP) 
+    })
+public class Controller extends PageFlowController
+{
+
+    @Control
+    public HelloControlBean hellobean;
+    
+    /**
+     * @jpf:action
+     */
+    @Jpf.Action(
+        )
+    protected Forward begin(){
+       
+       DriveHelloControl driver=new DriveHelloControl();
+       driver.setControl(hellobean);
+       Report report=driver.doTest();
+       
+        return new Forward(Report.RESULTS, Report.KEY, report);
+    }
+
+}
+
+

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/instantiate/declarewithproperty/Controller.jpf
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/instantiate/declarewithproperty/Controller.jpf
    Tue Aug 10 22:38:48 2004
@@ -0,0 +1,62 @@
+/*
+ * B E A   S Y S T E M S
+ *
+ * N E T U I
+ *
+ * Copyright (c) 2001-2002  BEA Systems, Inc.
+ *
+ * All Rights Reserved. Unpublished rights reserved under the copyright laws
+ * of the United States. The software contained on this media is proprietary
+ * to and embodies the confidential technology of BEA Systems, Inc. The
+ * possession or receipt of this information does not convey any right to
+ * disclose its contents, reproduce it, or use,  or license the use,
+ * for manufacture or sale, the information or anything described
+ * therein. Any use, disclosure, or reproduction without BEA System's
+ * prior written permission is strictly prohibited.
+ *
+ * $Header:$
+ */
+package instantiate.declarewithproperty;
+
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.FormData;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+import org.apache.beehive.controls.api.bean.Control;
+import org.apache.beehive.controls.api.bean.ControlBean;
+import org.apache.beehive.controls.test.controls.property.SingleProperty;
+import org.apache.beehive.controls.test.controls.property.SinglePropertyBean;
+import org.apache.beehive.controls.test.driver.instantiate.DriveSingleProperty;
+import org.apache.beehive.test.tools.milton.common.Report;
+
+/* Instantiate a custom control declaratively with property*/
+
[EMAIL PROTECTED](
+    forwards = {
+        @Jpf.Forward(name=Report.RESULTS,path = Report.RESULTSJSP) 
+    })
+public class Controller extends PageFlowController
+{
+
+    @Control
+    @SingleProperty.Greeting(GreetWord="Good evening!")
+    public SinglePropertyBean myPropertyBean;
+    
+    /**
+     * @jpf:action
+     */
+    @Jpf.Action(
+        )
+    protected Forward begin(){
+       
+       DriveSingleProperty driver=new DriveSingleProperty();
+       driver.setControl(myPropertyBean);
+       Report report=driver.doTest();
+       
+        return new Forward(Report.RESULTS, Report.KEY, report);
+    }
+
+}
+
+

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/instantiate/programmatic/Controller.jpf
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/instantiate/programmatic/Controller.jpf
   Tue Aug 10 22:38:48 2004
@@ -0,0 +1,67 @@
+/*
+ * B E A   S Y S T E M S
+ *
+ * N E T U I
+ *
+ * Copyright (c) 2001-2002  BEA Systems, Inc.
+ *
+ * All Rights Reserved. Unpublished rights reserved under the copyright laws
+ * of the United States. The software contained on this media is proprietary
+ * to and embodies the confidential technology of BEA Systems, Inc. The
+ * possession or receipt of this information does not convey any right to
+ * disclose its contents, reproduce it, or use,  or license the use,
+ * for manufacture or sale, the information or anything described
+ * therein. Any use, disclosure, or reproduction without BEA System's
+ * prior written permission is strictly prohibited.
+ *
+ * $Header:$
+ */
+package instantiate.programmatic;
+
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.FormData;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+import org.apache.beehive.controls.api.bean.Control;
+import org.apache.beehive.controls.api.bean.ControlBean;
+import org.apache.beehive.controls.test.controls.instantiate.HelloControlBean;
+import org.apache.beehive.controls.test.driver.instantiate.DriveHelloControl;
+import org.apache.beehive.test.tools.milton.common.Report;
+
+/* Instantiate a custom control programmatically*/
+
[EMAIL PROTECTED](
+    forwards = {
+        @Jpf.Forward(name=Report.RESULTS,path = Report.RESULTSJSP) 
+    })
+public class Controller extends PageFlowController
+{
+  
+    /**
+     * @jpf:action
+     */
+    @Jpf.Action(
+        )
+    protected Forward begin(){
+       
+       Report report=new Report();
+       DriveHelloControl driver=new DriveHelloControl();
+       try{
+               HelloControlBean 
hellobean=(HelloControlBean)java.beans.Beans.instantiate(
+                       Thread.currentThread().getContextClassLoader() ,
+                       
"org.apache.beehive.controls.test.controls.instantiate.HelloControlBean");
+               driver.setControl(hellobean);
+               report=driver.doTest();
+        }
+        catch(Exception e){
+               
+               report.setStatus(Report.FAIL);
+               report.setExceptionStack(e);
+        }
+        return new Forward(Report.RESULTS, Report.KEY, report);
+    }
+
+}
+
+

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/instantiate/programwithproperty/Controller.jpf
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/instantiate/programwithproperty/Controller.jpf
    Tue Aug 10 22:38:48 2004
@@ -0,0 +1,64 @@
+/*
+ * B E A   S Y S T E M S
+ *
+ * N E T U I
+ *
+ * Copyright (c) 2001-2002  BEA Systems, Inc.
+ *
+ * All Rights Reserved. Unpublished rights reserved under the copyright laws
+ * of the United States. The software contained on this media is proprietary
+ * to and embodies the confidential technology of BEA Systems, Inc. The
+ * possession or receipt of this information does not convey any right to
+ * disclose its contents, reproduce it, or use,  or license the use,
+ * for manufacture or sale, the information or anything described
+ * therein. Any use, disclosure, or reproduction without BEA System's
+ * prior written permission is strictly prohibited.
+ *
+ * $Header:$
+ */
+package instantiate.programwithproperty;
+
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.FormData;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+import org.apache.beehive.controls.api.bean.Control;
+import org.apache.beehive.controls.api.bean.ControlBean;
+import org.apache.beehive.controls.test.controls.property.SinglePropertyBean;
+import org.apache.beehive.controls.test.driver.instantiate.DriveSingleProperty;
+import org.apache.beehive.test.tools.milton.common.Report;
+
+/* Instantiate a custom control programmatically with property*/
+
[EMAIL PROTECTED](
+    forwards = {
+        @Jpf.Forward(name=Report.RESULTS,path = Report.RESULTSJSP) 
+    })
+public class Controller extends PageFlowController
+{
+  
+    /**
+     * @jpf:action
+     */
+    @Jpf.Action(
+        )
+    protected Forward begin(){
+       
+       /*BUG:CR190302
+
+       PropertyMap greetAttr = new (PropertyMap(SingleProperty.Greeting.class);
+       greetAttr.setProperty("GreetWord","Good afternoon!");
+       SinglePropertyBean spbean = (SinglePropertyBean)
+             Controls.instantiate(cl, 
"org.apache.beehive.controls.test.controls.properties.SinglePropertyBean", 
greetAttr);
+       
+       Before CR190302 is fixed, this test just simply fails.
+       */
+       Report report=new Report();
+       report.setStatus(Report.FAIL);
+        return new Forward(Report.RESULTS, Report.KEY, report);
+    }
+
+}
+
+

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/client_access/Controller.jpf
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/client_access/Controller.jpf
     Tue Aug 10 22:38:48 2004
@@ -0,0 +1,68 @@
+/*
+ * B E A   S Y S T E M S
+ *
+ * N E T U I
+ *
+ * Copyright (c) 2001-2002  BEA Systems, Inc.
+ *
+ * All Rights Reserved. Unpublished rights reserved under the copyright laws
+ * of the United States. The software contained on this media is proprietary
+ * to and embodies the confidential technology of BEA Systems, Inc. The
+ * possession or receipt of this information does not convey any right to
+ * disclose its contents, reproduce it, or use,  or license the use,
+ * for manufacture or sale, the information or anything described
+ * therein. Any use, disclosure, or reproduction without BEA System's
+ * prior written permission is strictly prohibited.
+ *
+ * $Header:$
+ */
+package property.client_access;
+
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.FormData;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+import org.apache.beehive.controls.api.bean.Control;
+import org.apache.beehive.controls.api.bean.ControlBean;
+import org.apache.beehive.controls.test.controls.property.SinglePropertyBean;
+import org.apache.beehive.controls.test.driver.property.DriveClientAccess;
+import org.apache.beehive.test.tools.milton.common.Report;
+
+/* Tests client getting control property via getter/setter on control bean
+ * The control bean is instantiated declaratively
+ */
+
[EMAIL PROTECTED](
+    forwards = {
+        @Jpf.Forward(name=Report.RESULTS,path = Report.RESULTSJSP) 
+    })
+public class Controller extends PageFlowController
+{
+    @Control
+    public SinglePropertyBean myControl;
+  
+    /**
+     * @jpf:action
+     */
+    @Jpf.Action(
+        )
+    protected Forward begin(){
+       
+       Report report=new Report();
+       DriveClientAccess driver=new DriveClientAccess();
+       try{
+               driver.setControl(myControl);
+               report=driver.doTest();
+        }
+        catch(Exception e){
+               
+               report.setStatus(Report.FAIL);
+               report.setExceptionStack(e);
+        }
+        return new Forward(Report.RESULTS, Report.KEY, report);
+    }
+
+}
+
+

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/client_access2/Controller.jpf
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/client_access2/Controller.jpf
    Tue Aug 10 22:38:48 2004
@@ -0,0 +1,70 @@
+/*
+ * B E A   S Y S T E M S
+ *
+ * N E T U I
+ *
+ * Copyright (c) 2001-2002  BEA Systems, Inc.
+ *
+ * All Rights Reserved. Unpublished rights reserved under the copyright laws
+ * of the United States. The software contained on this media is proprietary
+ * to and embodies the confidential technology of BEA Systems, Inc. The
+ * possession or receipt of this information does not convey any right to
+ * disclose its contents, reproduce it, or use,  or license the use,
+ * for manufacture or sale, the information or anything described
+ * therein. Any use, disclosure, or reproduction without BEA System's
+ * prior written permission is strictly prohibited.
+ *
+ * $Header:$
+ */
+package property.client_access2;
+
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.FormData;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+import java.beans.Beans;
+import org.apache.beehive.controls.api.bean.Control;
+import org.apache.beehive.controls.api.bean.ControlBean;
+import org.apache.beehive.controls.test.controls.property.SinglePropertyBean;
+import org.apache.beehive.controls.test.driver.property.DriveClientAccess;
+import org.apache.beehive.test.tools.milton.common.Report;
+
+/* Tests client getting control property via getter/setter on control bean.
+ * The control bean is instantiated programmatically.
+ */
+
[EMAIL PROTECTED](
+    forwards = {
+        @Jpf.Forward(name=Report.RESULTS,path = Report.RESULTSJSP) 
+    })
+public class Controller extends PageFlowController
+{
+  
+    /**
+     * @jpf:action
+     */
+    @Jpf.Action(
+        )
+    protected Forward begin(){
+       
+       Report report=new Report();
+       DriveClientAccess driver=new DriveClientAccess();
+       try{
+               SinglePropertyBean 
thebean=(SinglePropertyBean)Beans.instantiate(
+                       Thread.currentThread().getContextClassLoader() ,
+                       
"org.apache.beehive.controls.test.controls.property.SinglePropertyBean");
+               driver.setControl(thebean);
+               report=driver.doTest();
+        }
+        catch(Exception e){
+               
+               report.setStatus(Report.FAIL);
+               report.setExceptionStack(e);
+        }
+        return new Forward(Report.RESULTS, Report.KEY, report);
+    }
+
+}
+
+

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/client_impl/Controller.jpf
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/client_impl/Controller.jpf
       Tue Aug 10 22:38:48 2004
@@ -0,0 +1,75 @@
+/*
+ * B E A   S Y S T E M S
+ *
+ * N E T U I
+ *
+ * Copyright (c) 2001-2002  BEA Systems, Inc.
+ *
+ * All Rights Reserved. Unpublished rights reserved under the copyright laws
+ * of the United States. The software contained on this media is proprietary
+ * to and embodies the confidential technology of BEA Systems, Inc. The
+ * possession or receipt of this information does not convey any right to
+ * disclose its contents, reproduce it, or use,  or license the use,
+ * for manufacture or sale, the information or anything described
+ * therein. Any use, disclosure, or reproduction without BEA System's
+ * prior written permission is strictly prohibited.
+ *
+ * $Header:$
+ */
+package property.client_impl;
+
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.FormData;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+import org.apache.beehive.controls.api.bean.Control;
+import org.apache.beehive.controls.api.bean.ControlBean;
+import org.apache.beehive.controls.test.controls.property.SinglePropertyBean;
+import org.apache.beehive.controls.test.driver.property.DriveClientImpl;
+import org.apache.beehive.test.tools.milton.common.Report;
+
+/* Tests getting and setting control property via control context on control 
implementation
+ * and getter/setter on control bean class.
+ * The custom control is instantiated declaratively    
+ */
+
[EMAIL PROTECTED](
+    forwards = {
+        @Jpf.Forward(name=Report.RESULTS,path = Report.RESULTSJSP) 
+    })
+public class Controller extends PageFlowController
+{
+
+    /**
+     * A control that declares some propertySets in its control interface.
+     * It has a method that allow accessing these property values via control 
context.
+     */
+    @Control
+    public SinglePropertyBean myControl;
+
+  
+    /**
+     * @jpf:action
+     */
+    @Jpf.Action(
+        )
+    protected Forward begin(){
+       
+       Report report=new Report();
+       try{
+               DriveClientImpl driver=new DriveClientImpl();
+               driver.setControl(myControl);
+               report=driver.doTest();
+        }
+        catch(Exception e){
+               
+               report.setStatus(Report.FAIL);
+               report.setExceptionStack(e);
+        }
+        return new Forward(Report.RESULTS, Report.KEY, report);
+    }
+
+}
+
+

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/client_impl2/Controller.jpf
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/client_impl2/Controller.jpf
      Tue Aug 10 22:38:48 2004
@@ -0,0 +1,71 @@
+/*
+ * B E A   S Y S T E M S
+ *
+ * N E T U I
+ *
+ * Copyright (c) 2001-2002  BEA Systems, Inc.
+ *
+ * All Rights Reserved. Unpublished rights reserved under the copyright laws
+ * of the United States. The software contained on this media is proprietary
+ * to and embodies the confidential technology of BEA Systems, Inc. The
+ * possession or receipt of this information does not convey any right to
+ * disclose its contents, reproduce it, or use,  or license the use,
+ * for manufacture or sale, the information or anything described
+ * therein. Any use, disclosure, or reproduction without BEA System's
+ * prior written permission is strictly prohibited.
+ *
+ * $Header:$
+ */
+package property.client_impl2;
+
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.FormData;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+import java.beans.Beans;
+import org.apache.beehive.controls.api.bean.Control;
+import org.apache.beehive.controls.api.bean.ControlBean;
+import org.apache.beehive.controls.test.controls.property.SinglePropertyBean;
+import org.apache.beehive.controls.test.driver.property.DriveClientImpl;
+import org.apache.beehive.test.tools.milton.common.Report;
+
+/* Tests getting and setting control property via control context on control 
implementation
+ * and getter/setter on control bean class.
+ * The custom control is instantiated programmatically 
+ */
+
[EMAIL PROTECTED](
+    forwards = {
+        @Jpf.Forward(name=Report.RESULTS,path = Report.RESULTSJSP) 
+    })
+public class Controller extends PageFlowController
+{
+
+    /**
+     * @jpf:action
+     */
+    @Jpf.Action(
+        )
+    protected Forward begin(){
+       
+       Report report=new Report();
+       DriveClientImpl driver =new DriveClientImpl();
+       try{
+               SinglePropertyBean 
thebean=(SinglePropertyBean)Beans.instantiate(
+                       Thread.currentThread().getContextClassLoader(),
+                       
"org.apache.beehive.controls.test.controls.property.SinglePropertyBean");
+               driver.setControl(thebean);
+               report=driver.doTest();
+        }
+        catch(Exception e){
+               
+               report.setStatus(Report.FAIL);
+               report.setExceptionStack(e);
+        }
+        return new Forward(Report.RESULTS, Report.KEY, report);
+    }
+
+}
+
+

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/impl_access/Controller.jpf
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/impl_access/Controller.jpf
       Tue Aug 10 22:38:48 2004
@@ -0,0 +1,74 @@
+/*
+ * B E A   S Y S T E M S
+ *
+ * N E T U I
+ *
+ * Copyright (c) 2001-2002  BEA Systems, Inc.
+ *
+ * All Rights Reserved. Unpublished rights reserved under the copyright laws
+ * of the United States. The software contained on this media is proprietary
+ * to and embodies the confidential technology of BEA Systems, Inc. The
+ * possession or receipt of this information does not convey any right to
+ * disclose its contents, reproduce it, or use,  or license the use,
+ * for manufacture or sale, the information or anything described
+ * therein. Any use, disclosure, or reproduction without BEA System's
+ * prior written permission is strictly prohibited.
+ *
+ * $Header:$
+ */
+package property.impl_access;
+
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.FormData;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+import org.apache.beehive.controls.api.bean.Control;
+import org.apache.beehive.controls.api.bean.ControlBean;
+import org.apache.beehive.controls.test.controls.property.SinglePropertyBean;
+import org.apache.beehive.controls.test.driver.property.DriveImplAccess;
+import org.apache.beehive.test.tools.milton.common.Report;
+
+/* Tests getting control property via control context on control 
implementation class
+ * The custom control is instantiated declaratively    
+ */
+
[EMAIL PROTECTED](
+    forwards = {
+        @Jpf.Forward(name=Report.RESULTS,path = Report.RESULTSJSP) 
+    })
+public class Controller extends PageFlowController
+{
+
+    /**
+     * A control that declares some propertySets in its control interface.
+     * It has a method that allow accessing these property values via control 
context.
+     */
+    @Control
+    public SinglePropertyBean myControl;
+
+  
+    /**
+     * @jpf:action
+     */
+    @Jpf.Action(
+        )
+    protected Forward begin(){
+       
+       Report report=new Report();
+       try{
+               DriveImplAccess driver=new DriveImplAccess();
+               driver.setControl(myControl);
+               report=driver.doTest();
+        }
+        catch(Exception e){
+               
+               report.setStatus(Report.FAIL);
+               report.setExceptionStack(e);
+        }
+        return new Forward(Report.RESULTS, Report.KEY, report);
+    }
+
+}
+
+

Added: 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/impl_access2/Controller.jpf
==============================================================================
--- (empty file)
+++ 
incubator/beehive/trunk/controls/test/webapps/controlsWeb/property/impl_access2/Controller.jpf
      Tue Aug 10 22:38:48 2004
@@ -0,0 +1,70 @@
+/*
+ * B E A   S Y S T E M S
+ *
+ * N E T U I
+ *
+ * Copyright (c) 2001-2002  BEA Systems, Inc.
+ *
+ * All Rights Reserved. Unpublished rights reserved under the copyright laws
+ * of the United States. The software contained on this media is proprietary
+ * to and embodies the confidential technology of BEA Systems, Inc. The
+ * possession or receipt of this information does not convey any right to
+ * disclose its contents, reproduce it, or use,  or license the use,
+ * for manufacture or sale, the information or anything described
+ * therein. Any use, disclosure, or reproduction without BEA System's
+ * prior written permission is strictly prohibited.
+ *
+ * $Header:$
+ */
+package property.impl_access2;
+
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.FormData;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
+
+import java.beans.Beans;
+import org.apache.beehive.controls.api.bean.Control;
+import org.apache.beehive.controls.api.bean.ControlBean;
+import org.apache.beehive.controls.test.controls.property.SinglePropertyBean;
+import org.apache.beehive.controls.test.driver.property.DriveImplAccess;
+import org.apache.beehive.test.tools.milton.common.Report;
+
+/* Tests getting control property via control context on control implmentation
+ * The custom control is instantiated programmatically 
+ */
+
[EMAIL PROTECTED](
+    forwards = {
+        @Jpf.Forward(name=Report.RESULTS,path = Report.RESULTSJSP) 
+    })
+public class Controller extends PageFlowController
+{
+  
+    /**
+     * @jpf:action
+     */
+    @Jpf.Action(
+        )
+    protected Forward begin(){
+       
+       Report report=new Report();
+       DriveImplAccess driver=new DriveImplAccess();
+       try{
+               SinglePropertyBean 
thebean=(SinglePropertyBean)Beans.instantiate(
+                       Thread.currentThread().getContextClassLoader(),
+                       
"org.apache.beehive.controls.test.controls.property.SinglePropertyBean");
+               driver.setControl(thebean);
+               report=driver.doTest();
+        }
+        catch(Exception e){
+               
+               report.setStatus(Report.FAIL);
+               report.setExceptionStack(e);
+        }
+        return new Forward(Report.RESULTS, Report.KEY, report);
+    }
+
+}
+
+

Reply via email to