You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by cs...@apache.org on 2006/07/06 18:45:24 UTC

svn commit: r419614 [1/6] - in /beehive/trunk/controls/test: ./ src/controls/org/apache/beehive/controls/test/controls/assembly/ src/controls/org/apache/beehive/controls/test/controls/beaninfo/ src/controls/org/apache/beehive/controls/test/controls/gen...

Author: cschoett
Date: Thu Jul  6 09:45:19 2006
New Revision: 419614

URL: http://svn.apache.org/viewvc?rev=419614&view=rev
Log:
Ported the rest of the java tests from tch to junit, (still need to determine what to do with the jpf controls tests).
Still have a bit of cleanup to complete on the junit side and possible some of the ant scripts.

Added:
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestAssembler.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestAssembler2.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestControl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestControl2.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestControl2Impl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestControlImpl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/beaninfo/
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/beaninfo/InfoTest.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/beaninfo/InfoTestBundle.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/beaninfo/InfoTestImpl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/Composer.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/ComposerImpl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/Nested.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/NestedAssembler.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/NestedImpl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/BaseContext.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/BaseContextImpl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/ContextParam.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/ContextParamExt.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/ContextParamImpl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/ServiceGetter.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/ServiceGetterImpl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/contextevent/
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/contextevent/BeanContextRecorder.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/contextevent/BeanContextRecorderImpl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/contextevent/Recorder.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/contextevent/RecorderImpl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/encoding/
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/encoding/ExtPropertySet.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/encoding/NestProps.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/encoding/NestPropsImpl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/encoding/Props.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/encoding/PropsExtension.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/encoding/PropsImpl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/event/
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/event/Event2Listener.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/event/Hello.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/event/HelloImpl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/event/SerializeUtils.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/generic/
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/generic/ExtendedSimpleControl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/generic/ExtendedSimpleControlImpl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/generic/ListControl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/generic/ListControlImpl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/generic/SimpleControl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/generic/SimpleControlImpl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/inherit/
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/inherit/AddIn.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/inherit/Ext1.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/inherit/Ext2.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/inherit/Hello.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/inherit/HelloImpl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/inherit/Intf1.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/inherit/Intf1Impl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/inherit/Intf2.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/inherit/Intf2Impl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/inherit/Root.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/inherit/RootImpl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/methodOverride/BaseExtCtrlImpl.java   (contents, props changed)
      - copied, changed from r413714, beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/methodOverride/BaseExtImpl.java
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/packaging/
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/packaging/BoundExtPropertySet.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/packaging/BoundPropertyControl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/packaging/BoundPropertyControlImpl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/packaging/FeatureInfoControl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/packaging/FeatureInfoControlImpl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/packaging/Hello.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/packaging/HelloControl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/packaging/HelloControlImpl.java   (with props)
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/packaging/HelloImpl.java   (with props)
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/ContextEventTest.java   (with props)
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/EncodingTest.java   (with props)
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/assembly/
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/assembly/AssemblyTest.java   (with props)
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/beaninfo/
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/beaninfo/BeanInfoTest.java   (with props)
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/beaninfo/InfoTestBean.beaninfo
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/composition/
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/composition/ComposerTest.java   (with props)
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/composition/ProgrammaticTest.java   (with props)
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/context/
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/context/ContextParamTest.java   (with props)
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/context/ContextTest.java   (with props)
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/context/GetServiceTest.java   (with props)
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/event/
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/event/Event2Listener.java   (with props)
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/event/EventHandlerTest.java   (with props)
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/event/ListenerTest.java   (with props)
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/generic/
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/generic/GenericTest.java   (with props)
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/generic/SimpleControlTest.java   (with props)
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/inherit/
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/inherit/Ext1Bean.beaninfo
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/inherit/Ext2Bean.beaninfo
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/inherit/InheritTest.java   (with props)
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/inherit/Intf1Bean.beaninfo
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/inherit/Intf2Bean.beaninfo
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/packaging/
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/packaging/EventSetInfoTest.java   (with props)
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/packaging/FeatureInfoTest.java   (with props)
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/packaging/PropertyInfoTest.java   (with props)
    beehive/trunk/controls/test/src/junit-tests/org/apache/beehive/controls/test/junit/utils/ControlIntrospector.java   (with props)
Removed:
    beehive/trunk/controls/test/src/controls/org/apache/beehive/controls/test/controls/assembly/
    beehive/trunk/controls/test/src/controls/org/apache/beehive/controls/test/controls/beaninfo/
    beehive/trunk/controls/test/src/controls/org/apache/beehive/controls/test/controls/generic/
    beehive/trunk/controls/test/src/controls/org/apache/beehive/controls/test/controls/inherit/
    beehive/trunk/controls/test/src/controls/org/apache/beehive/controls/test/controls/packaging/
    beehive/trunk/controls/test/src/drivers/org/apache/beehive/controls/test/driver/generic/
    beehive/trunk/controls/test/src/drivers/org/apache/beehive/controls/test/driver/packaging/
    beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/methodOverride/BaseExtImpl.java
    beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/assembly/
    beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/beaninfo/
    beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/context/
    beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/contextevent/
    beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/encoding/
    beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/event/
    beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/generic/
    beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/inherit/
    beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/packaging/
Modified:
    beehive/trunk/controls/test/build.xml
    beehive/trunk/controls/test/src/units/org/apache/beehive/controls/test/java/composition/DeclarativeTest.java

Modified: beehive/trunk/controls/test/build.xml
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/build.xml?rev=419614&r1=419613&r2=419614&view=diff
==============================================================================
--- beehive/trunk/controls/test/build.xml (original)
+++ beehive/trunk/controls/test/build.xml Thu Jul  6 09:45:19 2006
@@ -519,6 +519,7 @@
         <mkdir dir="${build.dir}/junit-controls-classes"/>
         <mkdir dir="${build.dir}/junit-controls-beansrc"/>
         <mkdir dir="${build.dir}/junit-tests-classes"/>
+        <mkdir dir="${build.dir}/junit-assembly-beansrc"/>
 
         <build-controls srcdir="src/junit-controls"
                         destdir="${build.dir}/junit-controls-classes"
@@ -531,6 +532,18 @@
             </fileset>
         </copy>
 
+        <assemble moduleDir="${build.dir}/junit-controls-classes"
+                  srcOutputDir="${build.dir}/junit-controls-beansrc"
+                  contextFactoryClassname="org.apache.beehive.controls.runtime.assembly.EJBAssemblyContext$Factory">
+            <classpath>
+                <path refid="test-junit.dependency.path"/>
+                <pathelement location="${build.dir}/junit-controls-classes"/>
+            </classpath>
+            <fileset dir="${build.dir}/junit-controls-classes">
+                <include name="**/*.controls.properties"/>
+            </fileset>
+        </assemble>
+
         <control-jar destfile="${build.dir}/beehive-controls-junit-tests.jar"  basedir="${build.dir}/junit-controls-classes"/>
 
         <path id="_test.classpath">
@@ -543,6 +556,36 @@
                         destdir="${build.dir}/junit-tests-classes"
                         tempdir="${build.dir}/junit-tests-beansrc"
                         classpathref="_test.classpath"/>
+
+        <copy todir="${build.dir}/junit-tests-classes">
+            <fileset dir="src/junit-tests">
+                <include name="**/*.beaninfo"/>
+            </fileset>
+        </copy>
+
+       <!-- in the assemble phase, any clients processed above which use controls requiring assembly will be dealt with here -->
+        <assemble moduleDir="${build.dir}/junit-tests-classes"
+                  srcOutputDir="${build.dir}/junit-assembly-beansrc"
+                  contextFactoryClassname="org.apache.beehive.controls.runtime.assembly.EJBAssemblyContext$Factory">
+            <classpath>
+                <pathelement location="${build.dir}/junit-controls-classes"/>
+                <path refid="_test.classpath"/>
+                <pathelement location="${build.dir}/junit-tests-classes"/>
+            </classpath>
+            <fileset dir="${build.dir}/junit-tests-classes">
+                <include name="**/*.controls.properties"/>
+            </fileset>
+        </assemble>
+
+        <!-- build the generated files from the assemble phase -->
+        <javac srcdir="${build.dir}/junit-assembly-beansrc"
+            destdir="${build.dir}/junit-tests-classes"
+            classpathref="_test.classpath"
+            debug="on"
+            verbose="false"
+            failonerror="true">
+            <include name="**/*generated/*"/>
+        </javac>
     </target>
 
     <target name="junit.test" description="Run tests for this project">

Added: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestAssembler.java
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestAssembler.java?rev=419614&view=auto
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestAssembler.java (added)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestAssembler.java Thu Jul  6 09:45:19 2006
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+package org.apache.beehive.controls.test.controls.assembly;
+
+import org.apache.beehive.controls.api.assembly.ControlAssembler;
+import org.apache.beehive.controls.api.assembly.ControlAssemblyContext;
+import org.apache.beehive.controls.api.assembly.ControlAssemblyException;
+
+import java.io.File;
+import java.io.FileWriter;
+
+public class AssemblyTestAssembler implements ControlAssembler {
+
+    public void assemble(ControlAssemblyContext cac) throws ControlAssemblyException {
+
+        String genPackageName = "org.apache.beehive.controls.test.assembly.generated";
+        String genClassName = "AssemblyTestGenerated";
+System.out.println("*** IN TEST ASSEMBLER ***");
+        /* Write basic class structure out for later
+           compiliation and then finally instantiation in a test */
+        try {
+            File dir = new File(cac.getSrcOutputDir(), genPackageName.replace(".", File.separator));
+System.out.println("*** dir = " + dir.toString());
+            dir.mkdirs();
+
+            FileWriter fw = new FileWriter(new File(dir, genClassName + ".java"));
+            fw.write("package " + genPackageName + ";" +
+                    "public class " + genClassName + "{ }");
+            fw.close();
+System.out.println("** done");            
+        }
+        catch (java.io.IOException ioe) {
+            throw new ControlAssemblyException("Error writing " +
+                    genPackageName.replace(".", File.separator) +
+                    File.separator + genClassName, ioe);
+        }
+    }
+}

Propchange: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestAssembler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestAssembler2.java
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestAssembler2.java?rev=419614&view=auto
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestAssembler2.java (added)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestAssembler2.java Thu Jul  6 09:45:19 2006
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+package org.apache.beehive.controls.test.controls.assembly;
+
+import org.apache.beehive.controls.api.assembly.ControlAssembler;
+import org.apache.beehive.controls.api.assembly.ControlAssemblyContext;
+import org.apache.beehive.controls.api.assembly.ControlAssemblyException;
+
+import java.io.File;
+import java.io.FileWriter;
+
+public class AssemblyTestAssembler2 implements ControlAssembler {
+
+    public void assemble(ControlAssemblyContext cac) throws ControlAssemblyException {
+        
+        String genPackageName = "org.apache.beehive.controls.test.assembly.generated";
+        String genClassName = "AssemblyTest2Generated";
+
+        /* Write basic class structure out for later
+           compiliation and then finally instantiation in a test */
+        try {
+            File dir = new File(cac.getSrcOutputDir(), genPackageName.replace(".", File.separator));
+            dir.mkdirs();
+
+            FileWriter fw = new FileWriter(new File(dir, genClassName + ".java"));
+            fw.write("package " + genPackageName + ";" +
+                    "public class " + genClassName + "{ }");
+            fw.close();
+        }
+        catch (java.io.IOException ioe) {
+            throw new ControlAssemblyException("Error writing " +
+                    genPackageName.replace(".", File.separator) +
+                    File.separator + genClassName, ioe);
+        }
+    }
+}

Propchange: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestAssembler2.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestControl.java
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestControl.java?rev=419614&view=auto
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestControl.java (added)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestControl.java Thu Jul  6 09:45:19 2006
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+package org.apache.beehive.controls.test.controls.assembly;
+
+import org.apache.beehive.controls.api.bean.ControlInterface;
+
+@ControlInterface(
+        defaultBinding = "org.apache.beehive.controls.test.controls.assembly.AssemblyTestControlImpl"
+)
+public interface AssemblyTestControl {
+}

Propchange: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestControl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestControl2.java
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestControl2.java?rev=419614&view=auto
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestControl2.java (added)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestControl2.java Thu Jul  6 09:45:19 2006
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+package org.apache.beehive.controls.test.controls.assembly;
+
+import org.apache.beehive.controls.api.bean.ControlInterface;
+
+@ControlInterface(
+        defaultBinding = "org.apache.beehive.controls.test.controls.assembly.AssemblyTestControl2Impl"
+)
+public interface AssemblyTestControl2 {
+}

Propchange: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestControl2.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestControl2Impl.java
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestControl2Impl.java?rev=419614&view=auto
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestControl2Impl.java (added)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestControl2Impl.java Thu Jul  6 09:45:19 2006
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+package org.apache.beehive.controls.test.controls.assembly;
+
+import org.apache.beehive.controls.api.bean.ControlImplementation;
+
+@ControlImplementation(
+        assembler = AssemblyTestAssembler2.class
+)
+public class AssemblyTestControl2Impl implements AssemblyTestControl2, java.io.Serializable {
+}

Propchange: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestControl2Impl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestControlImpl.java
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestControlImpl.java?rev=419614&view=auto
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestControlImpl.java (added)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestControlImpl.java Thu Jul  6 09:45:19 2006
@@ -0,0 +1,27 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+package org.apache.beehive.controls.test.controls.assembly;
+
+import org.apache.beehive.controls.api.bean.ControlImplementation;
+
+@ControlImplementation(
+        assembler = AssemblyTestAssembler.class, isTransient = true
+)
+public class AssemblyTestControlImpl implements AssemblyTestControl {
+}

Propchange: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/assembly/AssemblyTestControlImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/beaninfo/InfoTest.java
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/beaninfo/InfoTest.java?rev=419614&view=auto
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/beaninfo/InfoTest.java (added)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/beaninfo/InfoTest.java Thu Jul  6 09:45:19 2006
@@ -0,0 +1,88 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+package org.apache.beehive.controls.test.controls.beaninfo;
+
+import org.apache.beehive.controls.api.bean.ControlInterface;
+import org.apache.beehive.controls.api.events.EventSet;
+import org.apache.beehive.controls.api.packaging.FeatureAttribute;
+import org.apache.beehive.controls.api.packaging.FeatureInfo;
+import org.apache.beehive.controls.api.packaging.ManifestAttribute;
+import org.apache.beehive.controls.api.packaging.PropertyInfo;
+import org.apache.beehive.controls.api.properties.PropertySet;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * A simple test class that tests using JSR-175 annotations to inject BeanInfo attributes
+ * for a Control type.
+ */
+@ControlInterface
+/* THE B51 VANILLA APT PROCESSOR BARFS ON THIS RIGHT NOW
+@ManifestAttributes (value={
+    @ManifestAttribute(name="Attribute1", value="Value1"),
+    @ManifestAttribute(name="Attribute2", value="Value2"),
+    @ManifestAttribute(name="Attribute3", value="Value3")
+}) */
+@ManifestAttribute(name = "Attribute1", value = "Value1")
+@FeatureInfo(
+        name = "%org.apache.beehive.controls.test.controls.beaninfo.InfoTestBundle.name%",
+        displayName = "%org.apache.beehive.controls.test.controls.beaninfo.InfoTestBundle.displayName%",
+        attributes =
+                {
+                @FeatureAttribute(name = "fa1", value = "fv1"),
+                @FeatureAttribute(name = "fa2", value = "fv2")
+                        })
+public interface InfoTest {
+    @PropertySet
+    @Retention(RetentionPolicy.RUNTIME)
+    @Target({ElementType.TYPE, ElementType.FIELD})
+    public @interface TestProps {
+        @PropertyInfo(bound = true, constrained = false)
+        @FeatureInfo(
+                name = "%org.apache.beehive.controls.test.controls.beaninfo.InfoTestBundle.prop1.name%",
+                displayName = "InfoTest prop1")
+        public int prop1() default 0;
+
+        public boolean prop2() default false;
+    }
+
+    @EventSet(unicast = true)
+    public interface TestEvents {
+        @FeatureInfo(name = "InfoTest eventMethod1", displayName = "InfoTest eventMethod1",
+                     isHidden = true, isExpert = true)
+        public void eventMethod1();
+
+        public int eventMethod2(String stringArg);
+    }
+
+    @FeatureInfo(
+            name = "infoTestMethod name",
+            displayName = "%org.apache.beehive.controls.test.controls.beaninfo.InfoTestBundle.infoTestMethod.displayName%",
+            isHidden = true,
+            isExpert = true,
+            attributes =
+                    {
+                    @FeatureAttribute(name = "methodFA1", value = "methodFV2"),
+                    @FeatureAttribute(name = "methodFA2", value = "methodFV2")
+                            })
+    public void infoTestMethod(int anIntArg, Class aClassArg);
+}

Propchange: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/beaninfo/InfoTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/beaninfo/InfoTestBundle.java
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/beaninfo/InfoTestBundle.java?rev=419614&view=auto
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/beaninfo/InfoTestBundle.java (added)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/beaninfo/InfoTestBundle.java Thu Jul  6 09:45:19 2006
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+package org.apache.beehive.controls.test.controls.beaninfo;
+
+import java.util.ListResourceBundle;
+
+/**
+ * A resource bundle containing feature info strings.  This is used to test the '%<key>%'
+ * substitution syntax for bean info annotations.
+ */
+
+public class InfoTestBundle extends ListResourceBundle {
+    static final Object[][] contents =
+            {
+                    {"name", "InfoTest name"},
+                    {"displayName", "InfoTest display name"},
+                    {"prop1.name", "InfoTest prop1"},
+                    {"infoTestMethod.displayName", "infoTestMethod display name"}
+            };
+
+    public Object[][] getContents() {
+        return contents;
+    }
+
+}

Propchange: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/beaninfo/InfoTestBundle.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/beaninfo/InfoTestImpl.java
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/beaninfo/InfoTestImpl.java?rev=419614&view=auto
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/beaninfo/InfoTestImpl.java (added)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/beaninfo/InfoTestImpl.java Thu Jul  6 09:45:19 2006
@@ -0,0 +1,31 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+package org.apache.beehive.controls.test.controls.beaninfo;
+
+import org.apache.beehive.controls.api.bean.ControlImplementation;
+
+/**
+ * A simple test impl that tests using JSR-175 annotations to inject BeanInfo attributes
+ * for a Control type.
+ */
+@ControlImplementation(isTransient = true)
+public class InfoTestImpl implements InfoTest {
+    public void infoTestMethod(int anIntArg, Class aClassArg) {
+    }
+}

Propchange: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/beaninfo/InfoTestImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/Composer.java
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/Composer.java?rev=419614&view=auto
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/Composer.java (added)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/Composer.java Thu Jul  6 09:45:19 2006
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+package org.apache.beehive.controls.test.controls.composition;
+
+import org.apache.beehive.controls.api.bean.ControlInterface;
+
+import java.lang.annotation.Annotation;
+
+/**
+ * A simple control that tests control composition
+ */
+@ControlInterface
+public interface Composer
+{
+    //
+    // 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);
+
+    //
+    // Invokes nested controls
+    //
+    public void invokeNestedControls();
+
+    //
+    // returns recorded events
+    //
+    public String[] getEventLog();
+}

Propchange: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/Composer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/ComposerImpl.java
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/ComposerImpl.java?rev=419614&view=auto
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/ComposerImpl.java (added)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/ComposerImpl.java Thu Jul  6 09:45:19 2006
@@ -0,0 +1,166 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+package org.apache.beehive.controls.test.controls.composition;
+
+import org.apache.beehive.controls.api.bean.ControlImplementation;
+import org.apache.beehive.controls.api.bean.Control;
+import org.apache.beehive.controls.api.events.EventHandler;
+import org.apache.beehive.controls.test.controls.property.Props;
+import org.apache.beehive.controls.test.controls.property.PropsExtension;
+
+import java.lang.annotation.Annotation;
+import java.util.LinkedList;
+
+@ControlImplementation
+public class ComposerImpl implements Composer, java.io.Serializable {
+    static final long serialVersionUID = 1L;
+
+    @Control
+    @Props.SimpleProps(simpleString="A field annotation value")
+    Props propControl;
+
+    @Control
+    @PropsExtension.SimpleProps(simpleString="A different field annotation value")
+    private PropsExtension propExtControl;
+
+    @Nested.Index(1)
+    private @Control Nested nested1;
+
+    @Control
+    @Nested.Index(2)
+    /* package */ Nested nested2;
+
+    @Control
+    @Nested.Index(3)
+    protected Nested nested3;
+
+    @Control
+    @Nested.Index(4)
+    public Nested nested4;
+
+    private LinkedList<String> _events = new LinkedList<String>();
+
+    /**
+     * 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);
+    }
+
+    public void invokeNestedControls() {
+        nested1.fireEvent( "Return", "returnVoid" );
+        nested1.fireEvent( "Return", "returnInt" );
+        nested1.fireEvent( "Return", "returnString" );
+    }
+
+    //
+    // Define various event handlers for the nested controls
+    //
+    @EventHandler(field="nested1", eventSet=Nested.Return.class, eventName="returnVoid")
+    public void nested1ReturnVoid() {
+        _events.add( "nested1ReturnVoid" );
+    }
+
+    @EventHandler(field="nested1", eventSet=Nested.Return.class, eventName="returnString")
+    public String nested1ReturnString() {
+        _events.add( "nested1ReturnString" );
+        return "Hello";
+    }
+
+    @EventHandler(field="nested1", eventSet=Nested.Return.class, eventName="returnInt")
+    public int nested1ReturnInt() {
+        _events.add( "nested1ReturnInt" );
+        return 21;
+    }
+
+    @EventHandler(field="nested2", eventSet=Nested.Args.class, eventName="argsInt")
+    public int nested2ArgsInt(int value) {
+        _events.add( "nested2ArgsInt" );
+        return value;
+    }
+
+    @EventHandler(field="nested2", eventSet=Nested.Args.class, eventName="argsString")
+    public String nested2ArgsString(String value) {
+        _events.add( "nested2ArgsString" );
+        return value;
+    }
+
+    @EventHandler(field="nested2", eventSet=Nested.Args.class, eventName="argsMultiple")
+    public Object [] nested2ArgsMultiple(int val1, String val2) {
+        _events.add( "nested2ArgsMultiple" );
+        return new Object[] {val1,val2};
+    }
+
+    @EventHandler(field="nested3", eventSet=Nested.Except.class, eventName="exceptIO")
+    public void nested3ExceptIO()
+        throws java.io.IOException {
+        _events.add( "nested3ExceptIO" );
+        throw new java.io.IOException("Ouch");
+    }
+
+    @EventHandler(field="nested3", eventSet=Nested.Except.class, eventName="exceptRuntime")
+    public void nested3ExceptRuntime()
+        throws RuntimeException {
+        _events.add( "nested3ExceptRuntime" );
+        throw new RuntimeException("Crash");
+    }
+
+    @EventHandler(field="nested3", eventSet=Nested.Except.class, eventName="exceptLocal")
+    public void nested3ExceptLocal()
+        throws Nested.LocalException {
+        _events.add( "nested3ExceptLocal" );
+        throw new Nested.LocalException("Bang");
+    }
+
+    @EventHandler(field="nested3", eventSet=Nested.Except.class, eventName="exceptMultiple")
+    public void nested3ExceptMultiple()
+        throws java.io.IOException, RuntimeException {
+        _events.add( "nested3ExceptMultiple" );
+        throw new java.io.IOException("Play nice!");
+    }
+
+    @EventHandler(field="nested4", eventSet=Nested.Return.class, eventName="returnInt")
+    public int nested4ReturnInt() {
+        _events.add( "nested4ReturnInt" );
+        return 99;
+    }
+
+    @EventHandler(field="nested4", eventSet=Nested.Args.class, eventName="argsString")
+    public String nested4ArgsString(String value) {
+        _events.add( "nested4ArgsString" );
+        return value;
+    }
+
+    @EventHandler(field="nested4", eventSet=Nested.Except.class, eventName="exceptLocal")
+    public void nested4ExceptLocal()
+        throws Nested.LocalException {
+        _events.add( "nested4ExceptLocal" );
+        throw new Nested.LocalException("Bang");
+    }
+
+    public String[] getEventLog() {
+        String[] ret = new String[1];
+        return _events.toArray(ret);
+    }
+}

Propchange: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/ComposerImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/Nested.java
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/Nested.java?rev=419614&view=auto
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/Nested.java (added)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/Nested.java Thu Jul  6 09:45:19 2006
@@ -0,0 +1,75 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+package org.apache.beehive.controls.test.controls.composition;
+
+import org.apache.beehive.controls.api.bean.ControlInterface;
+import org.apache.beehive.controls.api.properties.PropertySet;
+import org.apache.beehive.controls.api.events.EventSet;
+
+import java.lang.annotation.Target;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+@ControlInterface
+public interface Nested {
+
+    public void fireEvent(String eventSet, String eventName);
+
+    @PropertySet
+    @Target( {ElementType.TYPE, ElementType.FIELD} )
+    @Retention(RetentionPolicy.RUNTIME)
+    public @interface Index {
+        int value() default -1;
+    }
+
+    @EventSet(unicast=true)
+    public interface Return {
+        void returnVoid();
+        String returnString();
+        int returnInt();
+    }
+
+    @EventSet(unicast=true)
+    public interface Args {
+        public int argsInt(int value);
+        public String argsString(String value);
+        public Object [] argsMultiple(int val1, String val2);
+    }
+
+    @EventSet
+    public interface Except {
+        void exceptIO() throws java.io.IOException;
+        void exceptRuntime() throws RuntimeException;
+        void exceptLocal() throws LocalException;
+        void exceptMultiple() throws java.io.IOException, RuntimeException;
+    }
+
+    public class LocalException
+        extends Exception
+    {
+        LocalException(String msg) {
+            super(msg);
+        }
+
+        LocalException(String msg, Throwable t) {
+            super(msg, t);
+        }
+    }
+}

Propchange: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/Nested.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/NestedAssembler.java
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/NestedAssembler.java?rev=419614&view=auto
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/NestedAssembler.java (added)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/NestedAssembler.java Thu Jul  6 09:45:19 2006
@@ -0,0 +1,33 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+package org.apache.beehive.controls.test.controls.composition;
+
+import org.apache.beehive.controls.api.assembly.ControlAssembler;
+import org.apache.beehive.controls.api.assembly.ControlAssemblyContext;
+
+public class NestedAssembler implements ControlAssembler {
+
+    public void assemble(ControlAssemblyContext cac) {
+        System.out.println( "NestedAssembler:" );
+        System.out.println( "    context type=" + cac.getClass().getName() );
+        System.out.println( "    module=" + cac.getModuleDir() );
+        System.out.println( "    control type=" + cac.getControlType() );
+        System.out.println( "    control default impl=" + cac.getDefaultImplClassName() );
+    }
+}

Propchange: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/NestedAssembler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/NestedImpl.java
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/NestedImpl.java?rev=419614&view=auto
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/NestedImpl.java (added)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/NestedImpl.java Thu Jul  6 09:45:19 2006
@@ -0,0 +1,76 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+package org.apache.beehive.controls.test.controls.composition;
+
+import org.apache.beehive.controls.api.bean.ControlImplementation;
+import org.apache.beehive.controls.api.events.Client;
+
+@ControlImplementation(assembler = NestedAssembler.class)
+public class NestedImpl implements Nested, java.io.Serializable {
+
+    @Client
+    Return returnClient;
+
+    @Client
+    Args argsClient;
+
+    @Client
+    Except exceptClient;
+
+    public void fireEvent(String set, String name) {
+        if (set.equals("Return")) {
+            if (name.equals("returnVoid"))
+                returnClient.returnVoid();
+
+            if (name.equals("returnInt"))
+                returnClient.returnInt();
+
+            if (name.equals("returnString"))
+                returnClient.returnString();
+
+        } else if (set.equals("Args")) {
+            if (name.equals("argsInt"))
+                argsClient.argsInt(1);
+
+            if (name.equals("argsString"))
+                argsClient.argsString("foo");
+
+            if (name.equals("argsMultiple"))
+                argsClient.argsMultiple(2, "bar");
+
+        } else if (set.equals("Except")) {
+            try {
+                if (name.equals("exceptIO"))
+                    exceptClient.exceptIO();
+
+                if (name.equals("exceptRuntime"))
+                    exceptClient.exceptRuntime();
+
+                if (name.equals("exceptLocal"))
+                    exceptClient.exceptLocal();
+
+                if (name.equals("exceptMultiple"))
+                    exceptClient.exceptMultiple();
+            }
+            catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+    }
+}

Propchange: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/composition/NestedImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/BaseContext.java
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/BaseContext.java?rev=419614&view=auto
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/BaseContext.java (added)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/BaseContext.java Thu Jul  6 09:45:19 2006
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+package org.apache.beehive.controls.test.controls.context;
+
+import org.apache.beehive.controls.api.bean.ControlInterface;
+
+@ControlInterface
+public interface BaseContext {
+    String hello(String name);
+    String[] getEventLog();
+
+}

Propchange: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/BaseContext.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/BaseContextImpl.java
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/BaseContextImpl.java?rev=419614&view=auto
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/BaseContextImpl.java (added)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/BaseContextImpl.java Thu Jul  6 09:45:19 2006
@@ -0,0 +1,81 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+package org.apache.beehive.controls.test.controls.context;
+
+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 java.io.IOException;
+import java.io.ObjectOutputStream;
+import java.util.LinkedList;
+
+@ControlImplementation
+public class BaseContextImpl implements BaseContext, java.io.Serializable {
+    @Context
+    private ControlBeanContext context;
+    @Context
+    private ResourceContext resourceContext;
+
+    private transient LinkedList<String> _events;
+
+    public String hello(String name) {
+        _events.add("BaseContextImpl.hello " + name);
+        return "Hello, " + name;
+    }
+
+    @EventHandler(field = "context", eventSet = LifeCycle.class, eventName = "onCreate")
+    public void onCreate() {
+        _events = new LinkedList<String>();
+        _events.add("BaseContextImpl.onCreate");
+    }
+
+    @EventHandler(field = "resourceContext", eventSet = ResourceEvents.class, eventName = "onAcquire")
+        /* package */ void onAcquire() {
+        _events.add("BaseContextImpl.onAcquire");
+    }
+
+    @EventHandler(field = "resourceContext", eventSet = ResourceEvents.class, eventName = "onRelease")
+    protected void onRelease() {
+        _events.add("BaseContextImpl.onRelease");
+    }
+
+    //
+    // Implement the serialization writeObject method.  By design, contextual services should
+    // never be serialized, and this is done by making sure that they are set to null prior
+    // to impl instance serialization.  This implementation of writeObject just verifies this,
+    // then uses the default algorithm
+    //
+    public void writeObject(ObjectOutputStream oos)
+            throws IOException, ClassNotFoundException {
+        if (context != null || resourceContext != null)
+            throw new RuntimeException("Contextual service(s) not reset prior to serialization");
+
+        oos.defaultWriteObject();
+    }
+
+    public String[] getEventLog() {
+        String[] ret = new String[1];
+        return _events.toArray(ret);
+    }
+}

Propchange: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/BaseContextImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/ContextParam.java
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/ContextParam.java?rev=419614&view=auto
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/ContextParam.java (added)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/ContextParam.java Thu Jul  6 09:45:19 2006
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+package org.apache.beehive.controls.test.controls.context;
+
+import org.apache.beehive.controls.api.bean.ControlInterface;
+import org.apache.beehive.controls.api.properties.PropertySet;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.reflect.Method;
+
+@ControlInterface
+public interface ContextParam {
+    @PropertySet
+    @Retention(RetentionPolicy.RUNTIME)
+    @Target(ElementType.PARAMETER)
+    public @interface Param {
+        String value();
+    }
+
+    //
+    // Returns the array of names for parameters of the referenced method
+    //
+    public String [] paramNameTest(Method m);
+
+    //
+    // Returns the array of @Param annotations for parameters for the referenced method
+    //
+    public Param [] paramAnnotTest(Method m);
+}

Propchange: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/ContextParam.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/ContextParamExt.java
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/ContextParamExt.java?rev=419614&view=auto
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/ContextParamExt.java (added)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/ContextParamExt.java Thu Jul  6 09:45:19 2006
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+package org.apache.beehive.controls.test.controls.context;
+
+import org.apache.beehive.controls.api.bean.ControlExtension;
+
+/**
+ * This is a test extension that declares various methods that can be used to test
+ * ControlBeanContext parameter access APIs
+ * <p/>
+ */
+@ControlExtension
+public interface ContextParamExt extends ContextParam {
+    public int valueTest(@Param("paramName") String paramName,
+                         @Param("firstArg") int firstArg,
+                         @Param("anotherArg") int anotherArg,
+                         /* No @Param */       int hasNoParam,
+                         @Param("lastArg") int lastArg);
+}

Propchange: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/ContextParamExt.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/ContextParamImpl.java
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/ContextParamImpl.java?rev=419614&view=auto
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/ContextParamImpl.java (added)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/ContextParamImpl.java Thu Jul  6 09:45:19 2006
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+package org.apache.beehive.controls.test.controls.context;
+
+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 java.lang.reflect.Method;
+
+@ControlImplementation(isTransient = true)
+public class ContextParamImpl implements ContextParam, Extensible {
+    @Context
+    ControlBeanContext context;
+
+    public String [] paramNameTest(Method m) {
+        return context.getParameterNames(m);
+    }
+
+    public Param [] paramAnnotTest(Method m) {
+        Param [] annots = new Param [m.getParameterTypes().length];
+        for (int i = 0; i < annots.length; i++)
+            annots[i] = context.getParameterPropertySet(m, i, Param.class);
+
+        return annots;
+    }
+
+    //
+    // The implementation of Extensible.invoke() for this class will echo back one of the
+    // named parameters of the invoked method.  
+    //
+    // JCX-defined methods *must* follow two simple rules:
+    //
+    //  1. the first method is expected to contain the name of one of the method parameters
+    //  2. the method return type must be assignment-compatible with the type of the request 
+    //     parameter
+    //
+    public Object invoke(Method m, Object [] params) {
+        return context.getParameterValue(m, (String) params[0], params);
+    }
+}

Propchange: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/ContextParamImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/ServiceGetter.java
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/ServiceGetter.java?rev=419614&view=auto
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/ServiceGetter.java (added)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/ServiceGetter.java Thu Jul  6 09:45:19 2006
@@ -0,0 +1,29 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+package org.apache.beehive.controls.test.controls.context;
+
+import org.apache.beehive.controls.api.bean.ControlInterface;
+
+/**
+ * A control interface to test control context service
+ */
+@ControlInterface
+public interface ServiceGetter {
+    public Object getService(Class theService, Object selector);
+}

Propchange: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/ServiceGetter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/ServiceGetterImpl.java
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/ServiceGetterImpl.java?rev=419614&view=auto
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/ServiceGetterImpl.java (added)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/ServiceGetterImpl.java Thu Jul  6 09:45:19 2006
@@ -0,0 +1,39 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+package org.apache.beehive.controls.test.controls.context;
+
+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 implementation that retrieves specific service via controlContext
+ */
+@ControlImplementation(isTransient = true)
+public class ServiceGetterImpl implements ServiceGetter {
+
+    @Context
+    ControlBeanContext context;
+
+    public Object getService(Class theService, Object selector) {
+
+        return context.getService(theService, selector);
+    }
+
+} 

Propchange: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/context/ServiceGetterImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/contextevent/BeanContextRecorder.java
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/contextevent/BeanContextRecorder.java?rev=419614&view=auto
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/contextevent/BeanContextRecorder.java (added)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/contextevent/BeanContextRecorder.java Thu Jul  6 09:45:19 2006
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+package org.apache.beehive.controls.test.controls.contextevent;
+
+import org.apache.beehive.controls.api.bean.ControlInterface;
+
+/**
+ * A control interface to test control context events.
+ * There are two sources of control context events: ControlBeanContext and
+ * ResouceContext.
+ * The implementation of this interface only listens to context events from ControlBeanContext.
+ */
+@ControlInterface
+public interface BeanContextRecorder {
+    public String getRecord();
+}

Propchange: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/contextevent/BeanContextRecorder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/contextevent/BeanContextRecorderImpl.java
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/contextevent/BeanContextRecorderImpl.java?rev=419614&view=auto
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/contextevent/BeanContextRecorderImpl.java (added)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/contextevent/BeanContextRecorderImpl.java Thu Jul  6 09:45:19 2006
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+package org.apache.beehive.controls.test.controls.contextevent;
+
+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.events.EventHandler;
+
+/**
+ * A control impl that listens to and records its lifecycle events
+ * This impl listens to context event by declaring EventHandler
+ * <p/>
+ * There are two sources of control context events: ControlBeanContext and
+ * ResouceContext.
+ * This class only listens to context events from ControlBeanContext.
+ */
+
+@ControlImplementation
+public class BeanContextRecorderImpl implements BeanContextRecorder, java.io.Serializable {
+
+    private String event_log = "init";
+
+    @Context
+    ControlBeanContext context;
+
+    /*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 invoked on BeanContextRecorderImpl");
+//        System.out.println("++++++++++++++++++++++++++++++++++++++++++++++");
+
+        event_log = event_log + "onCreate";
+    }
+
+
+    /*Returns the event log*/
+    public String getRecord() {
+//        System.out.println("++++++++++++++++++++++++++++++++++++++++++++++++");
+//        System.out.println("getRecord on BeanContextRecorderImpl invoked");
+//        System.out.println("++++++++++++++++++++++++++++++++++++++++++++++++");
+
+        return event_log;
+    }
+}

Propchange: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/contextevent/BeanContextRecorderImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/contextevent/Recorder.java
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/contextevent/Recorder.java?rev=419614&view=auto
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/contextevent/Recorder.java (added)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/contextevent/Recorder.java Thu Jul  6 09:45:19 2006
@@ -0,0 +1,32 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+package org.apache.beehive.controls.test.controls.contextevent;
+
+import org.apache.beehive.controls.api.bean.ControlInterface;
+
+/**
+ * A control interface to test control context events.
+ * There are two sources of control context events: ControlBeanContext and
+ * ResouceContext.
+ * The implementation of this interface listens to context events from both sources.
+ */
+@ControlInterface
+public interface Recorder {
+    public String getRecord();
+}

Propchange: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/contextevent/Recorder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/contextevent/RecorderImpl.java
URL: http://svn.apache.org/viewvc/beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/contextevent/RecorderImpl.java?rev=419614&view=auto
==============================================================================
--- beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/contextevent/RecorderImpl.java (added)
+++ beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/contextevent/RecorderImpl.java Thu Jul  6 09:45:19 2006
@@ -0,0 +1,83 @@
+/*
+ * Copyright 2004 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * $Header:$
+ */
+
+package org.apache.beehive.controls.test.controls.contextevent;
+
+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.ResourceContext;
+import org.apache.beehive.controls.api.events.EventHandler;
+
+/**
+ * A control impl that listens to and records _context events
+ * This impl listens to _context events by declaring EventHandler.
+ * <p/>
+ * There are two sources of control _context events: ControlBeanContext and
+ * ResouceContext.
+ * This class listens to _context events from both sources.
+ */
+
+@ControlImplementation
+public class RecorderImpl implements Recorder, java.io.Serializable {
+
+    private String event_log = "init";
+
+    @Context
+    private ControlBeanContext _context;
+    @Context
+    private 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 invoked on RecorderImpl");
+//        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 invoked on RecorderImpl");
+//        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 invoked on RecorderImpl");
+//        System.out.println("++++++++++++++++++++++++++++++++++++++++++");
+
+        event_log = event_log + "onRelease";
+    }
+
+    /*Returns the event log*/
+    public String getRecord() {
+//        System.out.println("++++++++++++++++++++++++++++++++++++++++++++++");
+//        System.out.println("getRecord method invoked on RecorderImpl");
+//        System.out.println("++++++++++++++++++++++++++++++++++++++++++++++");
+
+        return event_log;
+    }
+}

Propchange: beehive/trunk/controls/test/src/junit-controls/org/apache/beehive/controls/test/controls/contextevent/RecorderImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native