[overlord-commits] Overlord SVN: r137 - in sam/trunk: src/main/java/org/jboss/sam/simulation and 7 other directories.

overlord-commits at lists.jboss.org overlord-commits at lists.jboss.org
Thu Jul 10 15:34:32 EDT 2008


Author: heiko.braun at jboss.com
Date: 2008-07-10 15:34:32 -0400 (Thu, 10 Jul 2008)
New Revision: 137

Added:
   sam/trunk/src/test/java/org/jboss/test/sam/samples/
   sam/trunk/src/test/java/org/jboss/test/sam/samples/pattern/
   sam/trunk/src/test/java/org/jboss/test/sam/samples/pattern/LightSwitch.java
   sam/trunk/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java
   sam/trunk/src/test/resources/samples/
   sam/trunk/src/test/resources/samples/pattern/
   sam/trunk/src/test/resources/samples/pattern/esper-cfg.xml
Modified:
   sam/trunk/SAM.ipr
   sam/trunk/SAM.iws
   sam/trunk/pom.xml
   sam/trunk/sam-trunk.iml
   sam/trunk/src/main/java/org/jboss/sam/simulation/EventSimulation.java
   sam/trunk/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java
   sam/trunk/src/main/java/org/jboss/sam/simulation/Measurement.java
   sam/trunk/src/main/java/org/jboss/sam/simulation/SimulationContext.java
   sam/trunk/src/test/java/org/jboss/test/sam/simulation/SensorMessageFactory.java
Log:
Move to org.javasim

Modified: sam/trunk/SAM.ipr
===================================================================
--- sam/trunk/SAM.ipr	2008-07-10 14:10:35 UTC (rev 136)
+++ sam/trunk/SAM.ipr	2008-07-10 19:34:32 UTC (rev 137)
@@ -292,8 +292,7 @@
   <component name="ProjectModuleManager">
     <modules>
       <module fileurl="file:///home/hbraun/dev/prj/esper-2.1.0-src/trunk/esper/esper-2.1.0-src.iml" filepath="/home/hbraun/dev/prj/esper-2.1.0-src/trunk/esper/esper-2.1.0-src.iml" />
-      <module fileurl="file:///home/hbraun/dev/env/JavaSim/core/javasim-core.iml" filepath="/home/hbraun/dev/env/JavaSim/core/javasim-core.iml" group="javasim" />
-      <module fileurl="file:///home/hbraun/dev/env/JavaSim/samples/javasim-samples.iml" filepath="/home/hbraun/dev/env/JavaSim/samples/javasim-samples.iml" group="javasim" />
+      <module fileurl="file:///home/hbraun/dev/prj/javasim/JavaSim/trunk/javasim-trunk.iml" filepath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/javasim-trunk.iml" group="javasim" />
       <module fileurl="file://$PROJECT_DIR$/sam-trunk.iml" filepath="$PROJECT_DIR$/sam-trunk.iml" />
     </modules>
   </component>

Modified: sam/trunk/SAM.iws
===================================================================
--- sam/trunk/SAM.iws	2008-07-10 14:10:35 UTC (rev 136)
+++ sam/trunk/SAM.iws	2008-07-10 19:34:32 UTC (rev 137)
@@ -17,10 +17,22 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" name="Default" comment="">
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/resources/samples" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/pattern" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/resources/samples/pattern" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation/Measurement.java" afterPath="$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation/Measurement.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation/EventSimulation.java" afterPath="$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation/EventSimulation.java" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/resources/samples/pattern/esper-cfg.xml" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java" afterPath="$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java" />
       <change type="MODIFICATION" beforePath="$PROJECT_DIR$/SAM.iws" afterPath="$PROJECT_DIR$/SAM.iws" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/jboss/test/sam/simulation/SimulationMain.java" afterPath="$PROJECT_DIR$/src/test/java/org/jboss/test/sam/simulation/SimulationMain.java" />
-      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/jboss/test/sam/simulation/SensorEventMessage.java" afterPath="$PROJECT_DIR$/src/test/java/org/jboss/test/sam/simulation/SensorEventMessage.java" />
-      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/java/org/jboss/test/sam/simulation/SimulationTestCase.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation/SimulationContext.java" afterPath="$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation/SimulationContext.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/src/test/java/org/jboss/test/sam/simulation/SensorMessageFactory.java" afterPath="$PROJECT_DIR$/src/test/java/org/jboss/test/sam/simulation/SensorMessageFactory.java" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/SAM.ipr" afterPath="$PROJECT_DIR$/SAM.ipr" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/sam-trunk.iml" afterPath="$PROJECT_DIR$/sam-trunk.iml" />
+      <change type="MODIFICATION" beforePath="$PROJECT_DIR$/pom.xml" afterPath="$PROJECT_DIR$/pom.xml" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/pattern/LightSwitch.java" />
+      <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples" />
     </list>
   </component>
   <component name="ChangeListSynchronizer" />
@@ -91,6 +103,86 @@
     <disable_hints />
   </component>
   <component name="DebuggerManager">
+    <line_breakpoints>
+      <breakpoint url="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java" line="127" class="org.jboss.test.sam.samples.pattern.PatternTestCase" package="org.jboss.test.sam.samples.pattern">
+        <option name="ENABLED" value="true" />
+        <option name="SUSPEND_POLICY" value="SuspendAll" />
+        <option name="LOG_ENABLED" value="false" />
+        <option name="LOG_EXPRESSION_ENABLED" value="false" />
+        <option name="COUNT_FILTER_ENABLED" value="false" />
+        <option name="COUNT_FILTER" value="0" />
+        <option name="CONDITION_ENABLED" value="false" />
+        <option name="CLASS_FILTERS_ENABLED" value="false" />
+        <option name="INSTANCE_FILTERS_ENABLED" value="false" />
+        <option name="CONDITION" value="" />
+        <option name="LOG_MESSAGE" value="" />
+      </breakpoint>
+      <breakpoint url="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java" line="73" class="org.jboss.test.sam.samples.pattern.PatternTestCase" package="org.jboss.test.sam.samples.pattern">
+        <option name="ENABLED" value="true" />
+        <option name="SUSPEND_POLICY" value="SuspendAll" />
+        <option name="LOG_ENABLED" value="false" />
+        <option name="LOG_EXPRESSION_ENABLED" value="false" />
+        <option name="COUNT_FILTER_ENABLED" value="false" />
+        <option name="COUNT_FILTER" value="0" />
+        <option name="CONDITION_ENABLED" value="false" />
+        <option name="CLASS_FILTERS_ENABLED" value="false" />
+        <option name="INSTANCE_FILTERS_ENABLED" value="false" />
+        <option name="CONDITION" value="" />
+        <option name="LOG_MESSAGE" value="" />
+      </breakpoint>
+      <breakpoint url="file://$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java" line="146" class="org.jboss.sam.simulation.EventSourceEntity" package="org.jboss.sam.simulation">
+        <option name="ENABLED" value="true" />
+        <option name="SUSPEND_POLICY" value="SuspendAll" />
+        <option name="LOG_ENABLED" value="false" />
+        <option name="LOG_EXPRESSION_ENABLED" value="false" />
+        <option name="COUNT_FILTER_ENABLED" value="false" />
+        <option name="COUNT_FILTER" value="0" />
+        <option name="CONDITION_ENABLED" value="false" />
+        <option name="CLASS_FILTERS_ENABLED" value="false" />
+        <option name="INSTANCE_FILTERS_ENABLED" value="false" />
+        <option name="CONDITION" value="" />
+        <option name="LOG_MESSAGE" value="" />
+      </breakpoint>
+      <breakpoint url="file://$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation/EventSimulation.java" line="198" class="org.jboss.sam.simulation.EventSimulation" package="org.jboss.sam.simulation">
+        <option name="ENABLED" value="true" />
+        <option name="SUSPEND_POLICY" value="SuspendAll" />
+        <option name="LOG_ENABLED" value="false" />
+        <option name="LOG_EXPRESSION_ENABLED" value="false" />
+        <option name="COUNT_FILTER_ENABLED" value="false" />
+        <option name="COUNT_FILTER" value="0" />
+        <option name="CONDITION_ENABLED" value="false" />
+        <option name="CLASS_FILTERS_ENABLED" value="false" />
+        <option name="INSTANCE_FILTERS_ENABLED" value="false" />
+        <option name="CONDITION" value="" />
+        <option name="LOG_MESSAGE" value="" />
+      </breakpoint>
+      <breakpoint url="file://$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java" line="101" class="org.jboss.sam.simulation.EventSourceEntity" package="org.jboss.sam.simulation">
+        <option name="ENABLED" value="true" />
+        <option name="SUSPEND_POLICY" value="SuspendAll" />
+        <option name="LOG_ENABLED" value="false" />
+        <option name="LOG_EXPRESSION_ENABLED" value="false" />
+        <option name="COUNT_FILTER_ENABLED" value="false" />
+        <option name="COUNT_FILTER" value="0" />
+        <option name="CONDITION_ENABLED" value="false" />
+        <option name="CLASS_FILTERS_ENABLED" value="false" />
+        <option name="INSTANCE_FILTERS_ENABLED" value="false" />
+        <option name="CONDITION" value="" />
+        <option name="LOG_MESSAGE" value="" />
+      </breakpoint>
+      <breakpoint url="file://$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation/EventSimulation.java" line="205" class="org.jboss.sam.simulation.EventSimulation" package="org.jboss.sam.simulation">
+        <option name="ENABLED" value="true" />
+        <option name="SUSPEND_POLICY" value="SuspendAll" />
+        <option name="LOG_ENABLED" value="false" />
+        <option name="LOG_EXPRESSION_ENABLED" value="false" />
+        <option name="COUNT_FILTER_ENABLED" value="false" />
+        <option name="COUNT_FILTER" value="0" />
+        <option name="CONDITION_ENABLED" value="false" />
+        <option name="CLASS_FILTERS_ENABLED" value="false" />
+        <option name="INSTANCE_FILTERS_ENABLED" value="false" />
+        <option name="CONDITION" value="" />
+        <option name="LOG_MESSAGE" value="" />
+      </breakpoint>
+    </line_breakpoints>
     <breakpoint_any>
       <breakpoint>
         <option name="NOTIFY_CAUGHT" value="true" />
@@ -162,35 +254,81 @@
   </component>
   <component name="FileEditorManager">
     <leaf>
-      <file leaf-file-name="SimulationMain.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/simulation/SimulationMain.java">
+      <file leaf-file-name="PatternTestCase.java" pinned="false" current="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java">
           <provider selected="true" editor-type-id="text-editor">
-            <state line="87" column="40" selection-start="1389" selection-end="3318" vertical-scroll-proportion="0.86540735">
+            <state line="127" column="0" selection-start="3924" selection-end="3924" vertical-scroll-proportion="1.7125307">
               <folding />
             </state>
           </provider>
         </entry>
       </file>
-      <file leaf-file-name="SimulationTestCase.java" pinned="false" current="true" current-in-tab="true">
-        <entry file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/simulation/SimulationTestCase.java">
+      <file leaf-file-name="pom.xml" pinned="false" current="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/pom.xml">
           <provider selected="true" editor-type-id="text-editor">
-            <state line="91" column="30" selection-start="3145" selection-end="3145" vertical-scroll-proportion="0.95513576">
+            <state line="138" column="32" selection-start="4479" selection-end="4479" vertical-scroll-proportion="0.7039312">
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="EventSourceEntity.java" pinned="false" current="false" current-in-tab="false">
+        <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state line="146" column="18" selection-start="4214" selection-end="4214" vertical-scroll-proportion="0.76960194">
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="SimulationEntity.java" pinned="false" current="false" current-in-tab="false">
+        <entry file="file:///home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/SimulationEntity.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state line="82" column="34" selection-start="2755" selection-end="2755" vertical-scroll-proportion="0.048250906">
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="SimulationProcess.java" pinned="false" current="false" current-in-tab="false">
+        <entry file="file:///home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/SimulationProcess.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state line="484" column="70" selection-start="12623" selection-end="12623" vertical-scroll-proportion="0.2110977">
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
+      <file leaf-file-name="EventSimulation.java" pinned="false" current="true" current-in-tab="true">
+        <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation/EventSimulation.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state line="207" column="49" selection-start="6311" selection-end="6311" vertical-scroll-proportion="0.0060313633">
               <folding>
                 <element signature="imports" expanded="true" />
+                <element signature="method#begin#0;class#EventSimulation#0" expanded="false" />
               </folding>
             </state>
           </provider>
         </entry>
       </file>
-      <file leaf-file-name="SensorEventMessage.java" pinned="false" current="false" current-in-tab="false">
-        <entry file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/simulation/SensorEventMessage.java">
+      <file leaf-file-name="Scheduler.java" pinned="false" current="false" current-in-tab="false">
+        <entry file="file:///home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/Scheduler.java">
           <provider selected="true" editor-type-id="text-editor">
-            <state line="32" column="62" selection-start="1308" selection-end="1308" vertical-scroll-proportion="0.26918536">
+            <state line="278" column="40" selection-start="7427" selection-end="7427" vertical-scroll-proportion="5.59228">
               <folding />
             </state>
           </provider>
         </entry>
       </file>
+      <file leaf-file-name="SimulationProcessList.java" pinned="false" current="false" current-in-tab="false">
+        <entry file="file:///home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/internal/SimulationProcessList.java">
+          <provider selected="true" editor-type-id="text-editor">
+            <state line="28" column="26" selection-start="1197" selection-end="1197" vertical-scroll-proportion="0.13751508">
+              <folding />
+            </state>
+          </provider>
+        </entry>
+      </file>
     </leaf>
   </component>
   <component name="FindManager">
@@ -232,7 +370,137 @@
           <option name="myItemId" value="SAM.ipr" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
         </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="sam-trunk" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" />
+        </PATH_ELEMENT>
       </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="SAM.ipr" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="sam-trunk" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="samples.pattern" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="SAM.ipr" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="sam-trunk" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="org.jboss.test.sam" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="SAM.ipr" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="sam-trunk" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="org.jboss.test.sam" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="simulation" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="SAM.ipr" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="sam-trunk" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="org.jboss.test.sam" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="samples.pattern" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="SAM.ipr" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="sam-trunk" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="org.jboss.sam" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="SAM.ipr" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="sam-trunk" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="org.jboss.sam" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="simulation" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="SAM.ipr" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="SAM.ipr" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="javasim" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleGroupNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="javasim-samples" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="SAM.ipr" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="javasim" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleGroupNode" />
+        </PATH_ELEMENT>
+      </PATH>
     </subPane>
   </component>
   <component name="PerforceChangeBrowserSettings">
@@ -322,10 +590,6 @@
           <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
-        <PATH_ELEMENT>
-          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/resources" />
-          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-        </PATH_ELEMENT>
       </PATH>
       <PATH>
         <PATH_ELEMENT>
@@ -349,13 +613,25 @@
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
         <PATH_ELEMENT>
-          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/resources" />
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/java" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
         <PATH_ELEMENT>
-          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/resources/simulation" />
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/java/org" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/java/org/jboss" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/java/org/jboss/test" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/java/org/jboss/test/sam" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
       </PATH>
       <PATH>
         <PATH_ELEMENT>
@@ -383,43 +659,29 @@
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
         <PATH_ELEMENT>
-          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/java/org/jboss/test/sam" />
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/java/org" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
-      </PATH>
-      <PATH>
         <PATH_ELEMENT>
-          <option name="myItemId" value="SAM.ipr" />
-          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
-        </PATH_ELEMENT>
-        <PATH_ELEMENT>
-          <option name="myItemId" value="sam-trunk" />
-          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
-        </PATH_ELEMENT>
-        <PATH_ELEMENT>
-          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$" />
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/java/org/jboss" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
         <PATH_ELEMENT>
-          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src" />
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/java/org/jboss/test" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
         <PATH_ELEMENT>
-          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/java/org/jboss/test/sam" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
         <PATH_ELEMENT>
-          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/java" />
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
         <PATH_ELEMENT>
-          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/java/org/jboss/test/sam" />
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/pattern" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
-        <PATH_ELEMENT>
-          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test/java/org/jboss/test/sam/simulation" />
-          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
-        </PATH_ELEMENT>
       </PATH>
       <PATH>
         <PATH_ELEMENT>
@@ -439,7 +701,7 @@
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
         <PATH_ELEMENT>
-          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/test" />
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
       </PATH>
@@ -464,6 +726,22 @@
           <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java/org" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java/org/jboss" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java/org/jboss/sam" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
       </PATH>
       <PATH>
         <PATH_ELEMENT>
@@ -491,9 +769,21 @@
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
         <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java/org" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java/org/jboss" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
           <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java/org/jboss/sam" />
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
         </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
       </PATH>
       <PATH>
         <PATH_ELEMENT>
@@ -501,6 +791,38 @@
           <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
         </PATH_ELEMENT>
       </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="SAM.ipr" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="javasim" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleGroupNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="javasim-trunk" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+        </PATH_ELEMENT>
+      </PATH>
+      <PATH>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="SAM.ipr" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="javasim" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleGroupNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="javasim-trunk" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+        </PATH_ELEMENT>
+        <PATH_ELEMENT>
+          <option name="myItemId" value="PsiDirectory:/home/hbraun/dev/prj/javasim/JavaSim/trunk" />
+          <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+        </PATH_ELEMENT>
+      </PATH>
     </subPane>
   </component>
   <component name="ProjectReloadState">
@@ -512,27 +834,43 @@
       <showMembers />
       <showModules />
       <showLibraryContents />
-      <hideEmptyPackages />
+      <hideEmptyPackages ProjectPane="false" />
       <abbreviatePackageNames />
-      <showStructure ProjectPane="false" PackagesPane="false" Scope="false" Favorites="false" />
+      <showStructure Scope="false" ProjectPane="false" PackagesPane="false" Favorites="false" />
       <autoscrollToSource />
       <autoscrollFromSource />
       <sortByType />
     </navigator>
   </component>
   <component name="PropertiesComponent">
-    <property name="GenerateAntBuildDialog.enableUiFormCompile" value="true" />
-    <property name="GoToFile.includeJavaFiles" value="false" />
-    <property name="GoToClass.toSaveIncludeLibraries" value="false" />
-    <property name="RunManagerConfig.compileBeforeRunning" value="false" />
+    <property name="cvs_file_history_treeOrder2" value="2" />
+    <property name="cvs_file_history_treeOrder1" value="1" />
     <property name="RunManagerConfig.showSettingsBeforeRunnig" value="false" />
+    <property name="cvs_file_history_treeOrder3" value="3" />
     <property name="GenerateAntBuildDialog.generateSingleFile" value="false" />
     <property name="MemberChooser.sorted" value="false" />
+    <property name="GenerateAntBuildDialog.enableUiFormCompile" value="true" />
+    <property name="GoToClass.toSaveIncludeLibraries" value="false" />
+    <property name="cvs_file_history_treeWidth0" value="398" />
+    <property name="cvs_file_history_treeWidth1" value="397" />
+    <property name="cvs_file_history_treeWidth2" value="398" />
+    <property name="cvs_file_history_treeWidth3" value="397" />
+    <property name="cvs_file_history_flatWidth2" value="398" />
     <property name="MemberChooser.showClasses" value="true" />
-    <property name="GenerateAntBuildDialog.backupFiles" value="true" />
+    <property name="cvs_file_history_flatWidth3" value="397" />
+    <property name="cvs_file_history_treeOrder0" value="0" />
+    <property name="cvs_file_history_flatWidth0" value="398" />
+    <property name="GoToClass.includeLibraries" value="false" />
+    <property name="cvs_file_history_flatWidth1" value="397" />
+    <property name="GoToFile.includeJavaFiles" value="false" />
+    <property name="RunManagerConfig.compileBeforeRunning" value="false" />
+    <property name="cvs_file_history_flatOrder2" value="2" />
+    <property name="cvs_file_history_flatOrder3" value="3" />
+    <property name="cvs_file_history_flatOrder0" value="0" />
+    <property name="cvs_file_history_flatOrder1" value="1" />
     <property name="GenerateAntBuildDialog.forceTargetJdk" value="true" />
-    <property name="GoToClass.includeLibraries" value="false" />
     <property name="MemberChooser.copyJavadoc" value="false" />
+    <property name="GenerateAntBuildDialog.backupFiles" value="true" />
   </component>
   <component name="ReadonlyStatusHandler">
     <option name="SHOW_DIALOG" value="true" />
@@ -553,26 +891,27 @@
     </key>
   </component>
   <component name="RestoreUpdateTree" />
-  <component name="RunManager" selected="Application.SimulationMain">
-    <tempConfiguration default="false" name="SimulationMain" type="Application" factoryName="Application" enabled="false" merge="false">
-      <option name="MAIN_CLASS_NAME" value="org.jboss.test.sam.simulation.SimulationMain" />
+  <component name="RunManager" selected="JUnit.PatternTestCase">
+    <tempConfiguration default="false" name="PatternTestCase" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
+      <pattern value="org.jboss.test.sam.samples.pattern.*" />
+      <module name="sam-trunk" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" />
+      <option name="PACKAGE_NAME" value="org.jboss.test.sam.samples.pattern" />
+      <option name="MAIN_CLASS_NAME" value="org.jboss.test.sam.samples.pattern.PatternTestCase" />
+      <option name="METHOD_NAME" />
+      <option name="TEST_OBJECT" value="class" />
       <option name="VM_PARAMETERS" />
-      <option name="PROGRAM_PARAMETERS" />
+      <option name="PARAMETERS" />
       <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
-      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
-      <option name="ALTERNATIVE_JRE_PATH" />
-      <option name="ENABLE_SWING_INSPECTOR" value="false" />
-      <module name="sam-trunk" />
-      <RunnerSettings RunnerId="Debug">
-        <option name="DEBUG_PORT" value="32888" />
-        <option name="TRANSPORT" value="0" />
-        <option name="LOCAL" value="true" />
-      </RunnerSettings>
+      <option name="ADDITIONAL_CLASS_PATH" />
+      <option name="TEST_SEARCH_SCOPE">
+        <value defaultName="wholeProject" />
+      </option>
       <RunnerSettings RunnerId="Run" />
-      <ConfigurationWrapper RunnerId="Debug" />
       <ConfigurationWrapper RunnerId="Run" />
       <method>
-        <option name="Make" value="true" />
+        <option name="Make" value="false" />
       </method>
     </tempConfiguration>
     <configuration default="true" type="Applet" factoryName="Applet">
@@ -587,6 +926,13 @@
       <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
       <option name="ALTERNATIVE_JRE_PATH" />
     </configuration>
+    <configuration default="true" type="Remote" factoryName="Remote">
+      <option name="USE_SOCKET_TRANSPORT" value="true" />
+      <option name="SERVER_MODE" value="false" />
+      <option name="SHMEM_ADDRESS" value="javadebug" />
+      <option name="HOST" value="localhost" />
+      <option name="PORT" value="5005" />
+    </configuration>
     <configuration default="true" type="Application" factoryName="Application" enabled="false" merge="false">
       <option name="MAIN_CLASS_NAME" />
       <option name="VM_PARAMETERS" />
@@ -600,13 +946,6 @@
         <option name="Make" value="true" />
       </method>
     </configuration>
-    <configuration default="true" type="Remote" factoryName="Remote">
-      <option name="USE_SOCKET_TRANSPORT" value="true" />
-      <option name="SERVER_MODE" value="false" />
-      <option name="SHMEM_ADDRESS" value="javadebug" />
-      <option name="HOST" value="localhost" />
-      <option name="PORT" value="5005" />
-    </configuration>
     <configuration default="true" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
       <module name="" />
       <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
@@ -623,7 +962,7 @@
         <value defaultName="wholeProject" />
       </option>
       <method>
-        <option name="Make" value="true" />
+        <option name="Make" value="false" />
       </method>
     </configuration>
     <configuration default="false" name="client" type="Remote" factoryName="Remote">
@@ -642,6 +981,34 @@
         <option name="Make" value="true" />
       </method>
     </configuration>
+    <configuration default="false" name="PatternTestCase.testDetectLightSwitchFailure" type="JUnit" factoryName="JUnit" enabled="false" merge="false">
+      <pattern value="org.jboss.test.sam.samples.pattern.*" />
+      <module name="sam-trunk" />
+      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
+      <option name="ALTERNATIVE_JRE_PATH" value="" />
+      <option name="PACKAGE_NAME" value="org.jboss.test.sam.samples.pattern" />
+      <option name="MAIN_CLASS_NAME" value="org.jboss.test.sam.samples.pattern.PatternTestCase" />
+      <option name="METHOD_NAME" value="testDetectLightSwitchFailure" />
+      <option name="TEST_OBJECT" value="method" />
+      <option name="VM_PARAMETERS" value="" />
+      <option name="PARAMETERS" value="" />
+      <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
+      <option name="ADDITIONAL_CLASS_PATH" />
+      <option name="TEST_SEARCH_SCOPE">
+        <value defaultName="wholeProject" />
+      </option>
+      <RunnerSettings RunnerId="Debug">
+        <option name="DEBUG_PORT" value="33254" />
+        <option name="TRANSPORT" value="0" />
+        <option name="LOCAL" value="true" />
+      </RunnerSettings>
+      <RunnerSettings RunnerId="Run" />
+      <ConfigurationWrapper RunnerId="Debug" />
+      <ConfigurationWrapper RunnerId="Run" />
+      <method>
+        <option name="Make" value="false" />
+      </method>
+    </configuration>
     <configuration name="&lt;template&gt;" type="WebApp" default="true" selected="false">
       <Host>localhost</Host>
       <Port>5050</Port>
@@ -722,18 +1089,18 @@
     </todo-panel>
   </component>
   <component name="ToolWindowManager">
-    <frame x="-3" y="25" width="1686" height="1003" extended-state="6" />
+    <frame x="0" y="25" width="1680" height="1000" extended-state="6" />
     <editor active="true" />
     <layout>
       <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
       <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
       <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
       <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="1" />
-      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.55580866" order="1" />
+      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.55125284" order="1" />
       <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39749432" order="3" />
       <window_info id="IDEtalk Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
       <window_info id="IDEtalk" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
-      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
+      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32915717" order="8" />
       <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32915717" order="8" />
       <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="7" />
       <window_info id="Maven" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
@@ -743,10 +1110,10 @@
       <window_info id="Module Dependencies" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
       <window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
       <window_info id="File View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="3" />
-      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.27774373" order="0" />
+      <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.27651748" order="0" />
       <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.15757205" order="2" />
       <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="6" />
-      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4692483" order="2" />
+      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.46810934" order="2" />
       <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="5" />
       <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="0" />
       <window_info id="Web" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="2" />
@@ -767,7 +1134,7 @@
     <option name="PERFORM_COMMIT_IN_BACKGROUND" value="false" />
     <option name="PUT_FOCUS_INTO_COMMENT" value="false" />
     <option name="FORCE_NON_EMPTY_COMMENT" value="false" />
-    <option name="LAST_COMMIT_MESSAGE" />
+    <option name="LAST_COMMIT_MESSAGE" value="javadocs" />
     <option name="SAVE_LAST_COMMIT_MESSAGE" value="true" />
     <option name="CHECKIN_DIALOG_SPLITTER_PROPORTION" value="0.8" />
     <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
@@ -780,6 +1147,9 @@
     <option name="UPDATE_GROUP_BY_PACKAGES" value="false" />
     <option name="SHOW_FILE_HISTORY_AS_TREE" value="false" />
     <option name="FILE_HISTORY_SPLITTER_PROPORTION" value="0.6" />
+    <MESSAGE value="fix ratio nonsense" />
+    <MESSAGE value="Added ratio constraint assertion" />
+    <MESSAGE value="javadocs" />
   </component>
   <component name="VssConfiguration">
     <option name="CLIENT_PATH" value="" />
@@ -825,123 +1195,172 @@
   <component name="com.intellij.ide.util.scopeChooser.ScopeChooserConfigurable" proportions="" version="1">
     <option name="myLastEditedConfigurable" />
   </component>
-  <component name="com.intellij.openapi.roots.ui.configuration.projectRoot.ProjectRootMasterDetailsConfigurable" proportions="0.16666667" version="1">
+  <component name="com.intellij.openapi.roots.ui.configuration.projectRoot.ProjectRootMasterDetailsConfigurable" proportions="0.16666667,0.5" version="1">
     <option name="myPlainMode" value="false" />
-    <option name="myLastEditedConfigurable" value="Modules" />
+    <option name="myLastEditedConfigurable" value="sam-trunk" />
   </component>
   <component name="com.intellij.profile.ui.ErrorOptionsConfigurable" proportions="0.16666667" version="1">
     <option name="myLastEditedConfigurable" value="IDE Profiles" />
   </component>
   <component name="editorHistoryManager">
-    <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation/EventSinkEntity.java">
+    <entry file="file:///home/hbraun/dev/env/JavaSim/core/src/java/arjuna/JavaSim/Simulation/SimulationProcess.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="59" column="13" selection-start="2120" selection-end="2120" vertical-scroll-proportion="0.33293125">
-          <folding />
+        <state line="337" column="0" selection-start="8768" selection-end="8768" vertical-scroll-proportion="0.1893848">
+          <folding>
+            <marker date="1214414865000" expanded="false" signature="0:201" placeholder="/.../" />
+            <marker date="1214414865000" expanded="true" signature="424:943" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="948:1000" placeholder="/**...*/" />
+            <marker date="1214414865000" expanded="true" signature="1035:1087" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="1092:1159" placeholder="/**...*/" />
+            <marker date="1214414865000" expanded="true" signature="1266:1435" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="1440:1515" placeholder="/**...*/" />
+            <marker date="1214414865000" expanded="true" signature="1552:1583" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="1588:1713" placeholder="/**...*/" />
+            <marker date="1214414865000" expanded="true" signature="1814:2068" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="2073:2197" placeholder="/**...*/" />
+            <marker date="1214414865000" expanded="true" signature="2297:2549" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="2554:2913" placeholder="/**...*/" />
+            <marker date="1214414865000" expanded="true" signature="3019:3287" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="3292:3510" placeholder="/**...*/" />
+            <marker date="1214414865000" expanded="true" signature="3601:3640" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="3645:3995" placeholder="/**...*/" />
+            <marker date="1214414865000" expanded="true" signature="4103:4378" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="4383:4592" placeholder="/**...*/" />
+            <marker date="1214414865000" expanded="true" signature="4685:4726" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="4731:4868" placeholder="/**...*/" />
+            <marker date="1214414865000" expanded="true" signature="4944:5099" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="5104:5164" placeholder="/**...*/" />
+            <marker date="1214414865000" expanded="true" signature="5267:5420" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="5425:5484" placeholder="/**...*/" />
+            <marker date="1214414865000" expanded="true" signature="5586:5738" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="5743:5982" placeholder="/**...*/" />
+            <marker date="1214414865000" expanded="true" signature="6090:6268" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="6273:6377" placeholder="/**...*/" />
+            <marker date="1214414865000" expanded="true" signature="6470:6511" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="6516:6737" placeholder="/**...*/" />
+            <marker date="1214414865000" expanded="true" signature="6847:7010" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="7015:7095" placeholder="/**...*/" />
+            <marker date="1214414865000" expanded="true" signature="7190:7233" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="7238:7310" placeholder="/**...*/" />
+            <marker date="1214414865000" expanded="true" signature="7388:7534" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="7539:7609" placeholder="/**...*/" />
+            <marker date="1214414865000" expanded="true" signature="7662:8239" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="8244:8299" placeholder="/**...*/" />
+            <marker date="1214414865000" expanded="true" signature="8331:8772" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="8777:8814" placeholder="/**...*/" />
+            <marker date="1214414865000" expanded="true" signature="8857:8976" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="8981:9030" placeholder="/**...*/" />
+            <marker date="1214414865000" expanded="true" signature="9066:9097" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="9102:9151" placeholder="/**...*/" />
+            <marker date="1214414865000" expanded="true" signature="9187:9218" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="9223:9287" placeholder="/**...*/" />
+            <marker date="1214414865000" expanded="true" signature="9364:9516" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="9521:9573" placeholder="/**...*/" />
+            <marker date="1214414865000" expanded="true" signature="9616:9660" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="9665:9706" placeholder="/**...*/" />
+            <marker date="1214414865000" expanded="true" signature="9747:9860" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="9865:9905" placeholder="/**...*/" />
+            <marker date="1214414865000" expanded="true" signature="9972:10130" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="10168:10344" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="10418:10710" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="10715:10801" placeholder="/**...*/" />
+            <marker date="1214414865000" expanded="true" signature="10884:11174" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="11233:11320" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="11325:11430" placeholder="/**...*/" />
+            <marker date="1214414865000" expanded="true" signature="11487:12034" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="12039:12269" placeholder="/**...*/" />
+            <marker date="1214414865000" expanded="true" signature="12301:12878" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="12925:13008" placeholder="{...}" />
+            <marker date="1214414865000" expanded="true" signature="13033:13108" placeholder="{...}" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/simulation/ChartGenerationHandler.java">
+    <entry file="jar:///usr/lib/jdk/32/jdk1.5.0_13/src.zip!/java/lang/Thread.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="50" column="6" selection-start="1949" selection-end="1949" vertical-scroll-proportion="0.4571773">
+        <state line="685" column="22" selection-start="27497" selection-end="27497" vertical-scroll-proportion="0.33293125">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation/ContextAwareEntity.java">
+    <entry file="file:///home/hbraun/dev/prj/javasim/JavaSim/trunk/pom.xml">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="28" column="17" selection-start="1180" selection-end="1180" vertical-scroll-proportion="0.1794569">
+        <state line="6" column="21" selection-start="386" selection-end="386" vertical-scroll-proportion="0.14004914">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation/EventSinkHandler.java">
+    <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation/SimulationContext.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="34" column="0" selection-start="1360" selection-end="1360" vertical-scroll-proportion="0.32086852">
+        <state line="84" column="36" selection-start="2692" selection-end="2692" vertical-scroll-proportion="0.8154403">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation/EventMessageFactory.java">
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/simulation/SensorMessageFactory.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="32" column="0" selection-start="1309" selection-end="1309" vertical-scroll-proportion="0.27503017">
-          <folding />
+        <state line="25" column="101" selection-start="1221" selection-end="1221" vertical-scroll-proportion="0.1145959">
+          <folding>
+            <element signature="imports" expanded="true" />
+          </folding>
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/sam/internal/stream/InVMDispatcher.java">
+    <entry file="file:///home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/internal/SimulationProcessList.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="31" column="3" selection-start="1272" selection-end="1272" vertical-scroll-proportion="0.252111">
+        <state line="28" column="26" selection-start="1197" selection-end="1197" vertical-scroll-proportion="0.13751508">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation/Measurement.java">
+    <entry file="file:///home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/Scheduler.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="27" column="37" selection-start="1160" selection-end="1160" vertical-scroll-proportion="0.16043426">
+        <state line="278" column="40" selection-start="7427" selection-end="7427" vertical-scroll-proportion="5.59228">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation/SimulationContext.java">
+    <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="53" column="19" selection-start="1941" selection-end="1941" vertical-scroll-proportion="0.13027744">
+        <state line="146" column="18" selection-start="4214" selection-end="4214" vertical-scroll-proportion="0.76960194">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java">
+    <entry file="file:///home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/SimulationProcess.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="119" column="45" selection-start="3754" selection-end="3754" vertical-scroll-proportion="0.15199035">
-          <folding>
-            <element signature="imports" expanded="true" />
-          </folding>
+        <state line="484" column="70" selection-start="12623" selection-end="12623" vertical-scroll-proportion="0.2110977">
+          <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/simulation/SensorMessageFactory.java">
+    <entry file="file:///home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/SimulationEntity.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="32" column="13" selection-start="1329" selection-end="1329" vertical-scroll-proportion="0.27503017">
-          <folding>
-            <element signature="imports" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation/EventSimulation.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="57" column="28" selection-start="2531" selection-end="2531" vertical-scroll-proportion="0.5041322">
-          <folding>
-            <element signature="imports" expanded="true" />
-          </folding>
-        </state>
-      </provider>
-    </entry>
-    <entry file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/simulation/SimulationMain.java">
-      <provider selected="true" editor-type-id="text-editor">
-        <state line="87" column="40" selection-start="1389" selection-end="3318" vertical-scroll-proportion="0.86540735">
+        <state line="82" column="34" selection-start="2755" selection-end="2755" vertical-scroll-proportion="0.048250906">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/simulation/SensorEventMessage.java">
+    <entry file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="32" column="62" selection-start="1308" selection-end="1308" vertical-scroll-proportion="0.26918536">
+        <state line="127" column="0" selection-start="3924" selection-end="3924" vertical-scroll-proportion="1.7125307">
           <folding />
         </state>
       </provider>
     </entry>
     <entry file="file://$PROJECT_DIR$/pom.xml">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="37" column="73" selection-start="1380" selection-end="1380" vertical-scroll-proportion="0.52884614">
+        <state line="138" column="32" selection-start="4479" selection-end="4479" vertical-scroll-proportion="0.7039312">
           <folding />
         </state>
       </provider>
     </entry>
-    <entry file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/simulation/SimulationTestCase.java">
+    <entry file="file://$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation/EventSimulation.java">
       <provider selected="true" editor-type-id="text-editor">
-        <state line="91" column="30" selection-start="3145" selection-end="3145" vertical-scroll-proportion="0.95513576">
+        <state line="207" column="49" selection-start="6311" selection-end="6311" vertical-scroll-proportion="0.0060313633">
           <folding>
             <element signature="imports" expanded="true" />
+            <element signature="method#begin#0;class#EventSimulation#0" expanded="false" />
           </folding>
         </state>
       </provider>

Modified: sam/trunk/pom.xml
===================================================================
--- sam/trunk/pom.xml	2008-07-10 14:10:35 UTC (rev 136)
+++ sam/trunk/pom.xml	2008-07-10 19:34:32 UTC (rev 137)
@@ -21,7 +21,7 @@
       <antlr.version>3.0.1</antlr.version>
       <jfree.version>1.0.0</jfree.version>
       <hsqldb.version>1.8.0.7</hsqldb.version>
-      <javasim.version>1.0</javasim.version>
+      <javasim.version>2.0-hbraun</javasim.version>
    </properties>
 
    <!-- Dependencies -->
@@ -65,7 +65,7 @@
 
       <dependency>
          <groupId>javasim</groupId>
-         <artifactId>javasim-core</artifactId>
+         <artifactId>javasim</artifactId>
          <version>${javasim.version}</version>
       </dependency>
 
@@ -136,6 +136,7 @@
          <plugin>
             <artifactId>maven-surefire-plugin</artifactId>
             <configuration>
+               <forkMode>pertest</forkMode>
                <argLine>${surefire.jvm.args}</argLine>
             </configuration>
          </plugin>

Modified: sam/trunk/sam-trunk.iml
===================================================================
--- sam/trunk/sam-trunk.iml	2008-07-10 14:10:35 UTC (rev 136)
+++ sam/trunk/sam-trunk.iml	2008-07-10 19:34:32 UTC (rev 137)
@@ -11,6 +11,7 @@
     </content>
     <orderEntry type="inheritedJdk" />
     <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module" module-name="javasim-trunk" />
     <orderEntry type="module-library">
       <library name="M2 Dep: jfree:jfreechart:jar:1.0.0:compile">
         <CLASSES>
@@ -84,9 +85,9 @@
       </library>
     </orderEntry>
     <orderEntry type="module-library">
-      <library name="M2 Dep: javasim:javasim-core:jar:1.0:compile">
+      <library name="M2 Dep: javasim:javasim:jar:2.0-hbraun:compile">
         <CLASSES>
-          <root url="jar://$MODULE_DIR$/../../../../.m2/repository/javasim/javasim-core/1.0/javasim-core-1.0.jar!/" />
+          <root url="jar://$MODULE_DIR$/../../../../.m2/repository/javasim/javasim/2.0-hbraun/javasim-2.0-hbraun.jar!/" />
         </CLASSES>
         <JAVADOC />
         <SOURCES />

Modified: sam/trunk/src/main/java/org/jboss/sam/simulation/EventSimulation.java
===================================================================
--- sam/trunk/src/main/java/org/jboss/sam/simulation/EventSimulation.java	2008-07-10 14:10:35 UTC (rev 136)
+++ sam/trunk/src/main/java/org/jboss/sam/simulation/EventSimulation.java	2008-07-10 19:34:32 UTC (rev 137)
@@ -21,8 +21,7 @@
  */
 package org.jboss.sam.simulation;
 
-import arjuna.JavaSim.Simulation.Scheduler;
-import arjuna.JavaSim.Simulation.SimulationProcess;
+import org.javasim.*;
 import com.espertech.esper.client.UnmatchedListener;
 import com.espertech.esper.event.EventBean;
 import org.jboss.sam.EventProcessor;
@@ -31,6 +30,7 @@
 import org.jboss.sam.internal.esper.EsperRuntimeImpl;
 import org.jboss.sam.internal.stream.InVMStreamInput;
 import org.jboss.sam.internal.stream.InVMDispatcher;
+import org.javasim.Scheduler;
 
 import java.net.URL;
 import java.util.ArrayList;
@@ -142,8 +142,20 @@
    {
       takeControl();
    }
+
+   public void done()
+   {
+      this.terminate();
+      try
+      {
+         Scheduler.reset();
+      } catch (SimulationException e)
+      {
+         e.printStackTrace();  
+      }
+   }
    
-   public void begin()
+   private void begin()
    {      
       for(EventSinkEntity sink : eventSinks)
       {
@@ -151,12 +163,12 @@
       }
 
       for(EventSourceEntity source : eventSources)
-      {
+      {         
          source.begin();
       }
    }
 
-   public void end()
+   private void end()
    {
       for(EventSinkEntity sink : eventSinks)
       {
@@ -186,11 +198,9 @@
          // begin
          begin();
          Scheduler.startSimulation();
-
+   
          Double totalSimTime = (Double) context.getConfig(EventSimulation.TOTAL_SIM_TIME);
-         double end = Scheduler.CurrentTime()+ totalSimTime;
-         while(Scheduler.CurrentTime()<end)
-            Hold(totalSimTime+1);
+         hold(totalSimTime);
 
          // cleanup
          Scheduler.stopSimulation();
@@ -211,7 +221,7 @@
     */
    private void takeControl()
    {
-      this.Resume();
+      this.resumeProcess();
       SimulationProcess.mainSuspend();
    }
 
@@ -223,7 +233,7 @@
       try
       {
          SimulationProcess.mainResume();
-         Suspend();
+         this.suspendProcess();
       } catch (Exception e)
       {
          e.printStackTrace();

Modified: sam/trunk/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java
===================================================================
--- sam/trunk/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java	2008-07-10 14:10:35 UTC (rev 136)
+++ sam/trunk/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java	2008-07-10 19:34:32 UTC (rev 137)
@@ -21,9 +21,9 @@
  */
 package org.jboss.sam.simulation;
 
-import arjuna.JavaSim.Simulation.RestartException;
-import arjuna.JavaSim.Simulation.SimulationException;
-import arjuna.JavaSim.Simulation.SimulationEntity;
+import org.javasim.RestartException;
+import org.javasim.SimulationException;
+import org.javasim.SimulationEntity;
 import org.jboss.sam.internal.stream.InVMDispatcher;
 
 /**
@@ -101,7 +101,7 @@
          {
             double totalSim = (Double) context.getConfig(EventSimulation.TOTAL_SIM_TIME);
             double holdTime = (totalSim*eventRatio);
-            Wait(holdTime);
+            hold(holdTime);
          }
          catch (SimulationException e)
          {
@@ -109,8 +109,6 @@
          catch (RestartException e)
          {
          }
-         catch(InterruptedException e)
-         {}
          
 
          if(null==context)
@@ -128,12 +126,12 @@
 
       }
    }
-
+   
    public void begin()
    {
       try
       {
-         super.Activate();
+         this.activate();
       } catch (SimulationException e)
       {
          e.printStackTrace();
@@ -146,7 +144,7 @@
 
    public void end()
    {
-      super.terminate();      
+      this.terminate();
    }
 
 

Modified: sam/trunk/src/main/java/org/jboss/sam/simulation/Measurement.java
===================================================================
--- sam/trunk/src/main/java/org/jboss/sam/simulation/Measurement.java	2008-07-10 14:10:35 UTC (rev 136)
+++ sam/trunk/src/main/java/org/jboss/sam/simulation/Measurement.java	2008-07-10 19:34:32 UTC (rev 137)
@@ -64,4 +64,10 @@
       this.current -= 1;
       return this.current;
    }
+
+
+   public String toString()
+   {
+      return String.valueOf(getCurrent());
+   }
 }

Modified: sam/trunk/src/main/java/org/jboss/sam/simulation/SimulationContext.java
===================================================================
--- sam/trunk/src/main/java/org/jboss/sam/simulation/SimulationContext.java	2008-07-10 14:10:35 UTC (rev 136)
+++ sam/trunk/src/main/java/org/jboss/sam/simulation/SimulationContext.java	2008-07-10 19:34:32 UTC (rev 137)
@@ -21,7 +21,7 @@
  */
 package org.jboss.sam.simulation;
 
-import arjuna.JavaSim.Simulation.Scheduler;
+import org.javasim.Scheduler;
 
 import java.util.HashMap;
 import java.util.Map;
@@ -82,6 +82,6 @@
 
    public double getCurrentSimulationTime()
    {
-      return Scheduler.CurrentTime();
+      return Scheduler.currentTime();
    }
 }

Added: sam/trunk/src/test/java/org/jboss/test/sam/samples/pattern/LightSwitch.java
===================================================================
--- sam/trunk/src/test/java/org/jboss/test/sam/samples/pattern/LightSwitch.java	                        (rev 0)
+++ sam/trunk/src/test/java/org/jboss/test/sam/samples/pattern/LightSwitch.java	2008-07-10 19:34:32 UTC (rev 137)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.sam.samples.pattern;
+
+/**
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public final class LightSwitch
+{
+   boolean enabled;
+
+   public LightSwitch(boolean enabled)
+   {
+      this.enabled = enabled;
+   }
+
+   public boolean getEnabled()
+   {
+      return enabled;
+   }
+
+
+   public String toString()
+   {
+      return "LightSwitch{enabled="+this.enabled+"}";
+   }
+}


Property changes on: sam/trunk/src/test/java/org/jboss/test/sam/samples/pattern/LightSwitch.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Added: sam/trunk/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java
===================================================================
--- sam/trunk/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java	                        (rev 0)
+++ sam/trunk/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java	2008-07-10 19:34:32 UTC (rev 137)
@@ -0,0 +1,188 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.sam.samples.pattern;
+
+import junit.framework.TestCase;
+import org.jboss.sam.EventMessage;
+import org.jboss.sam.simulation.*;
+
+import java.util.Properties;
+
+/**
+ * Use the simulation API to test pattern detection
+ * 
+ * @author Heiko.Braun <heiko.braun at jboss.com>
+ */
+public class PatternTestCase extends TestCase
+{
+
+   EventSimulation simulation;
+   SimulationContext context;
+
+   EventSourceEntity source;
+   EventSinkEntity sink;
+
+   protected void setUp() throws Exception
+   {      
+      // config
+      Properties config = new Properties();
+      config.put(EventSimulation.TOTAL_SIM_TIME, 60.00);
+
+      // init
+      simulation = EventSimulation.bootstrap(
+        config,
+        Thread.currentThread().getContextClassLoader().getResource("samples/pattern/esper-cfg.xml")
+      );
+
+      // shared between all entities
+      context = simulation.getContext();
+
+      // create an event source and sink
+      source = new EventSourceEntity("LightSwitch", 0.10);
+      sink = new EventSinkEntity("LightMonitor");
+
+   }
+
+   protected void tearDown() throws Exception
+   {
+      simulation.done();
+      System.out.println("Done");
+   }
+
+   public void testRegularLightSwitch()
+   {
+      // associate a source factory
+      source.setEventMessageFactory(
+        new EventMessageFactory()
+        {
+           private boolean lastState;
+
+           public Object createEventMessage(SimulationContext context)
+           {
+              context.getMeasurement("dispatched").increment();
+              LightSwitch message = new LightSwitch(lastState);
+              lastState = !lastState;
+              return message;
+           }
+        }
+      );
+
+      // associate a sink handler
+      sink.setEventHandler(
+        new EventSinkHandler()
+        {
+           public void handle(EventMessage[] events, SimulationContext context)
+           {
+              context.getMeasurement("processed").increment();
+              context.addAttachment(EventMessage.class, events[0]);
+           }
+        }
+      );
+
+      simulation.addSource(source);
+      simulation.addSink(sink);
+
+      // forward single event messages
+      simulation.bindStatement("select B.* from pattern [every (A=LightSwitch(enabled=true) -> B=LightSwitch(enabled=false))]", sink);
+
+      // start simulation
+      simulation.singleRun();
+
+      // display status
+      printStatus();
+
+      // evaluate results
+      EventMessage lastEventMessage = context.getAttachment(EventMessage.class);
+      assertNotNull(lastEventMessage);
+      assertEquals(false, lastEventMessage.getProperty("enabled"));
+   }
+
+   private void printStatus()
+   {
+      System.out.println("Dispatched: "+context.getMeasurement("dispatched"));
+      System.out.println("Processed: "+context.getMeasurement("processed"));
+   }
+
+   public void testDetectLightSwitchFailure()
+   {
+      // associate a source factory 
+      source.setEventMessageFactory(
+        new EventMessageFactory()
+        {
+           private boolean lastState;
+
+           public Object createEventMessage(SimulationContext context)
+           {
+              LightSwitch message = null;
+
+              double d = context.getMeasurement("dispatched").getCurrent();
+              if(d!=3)
+              {
+                 // create a regular light switch condition
+                 message = new LightSwitch(lastState);
+              }
+              else
+              {
+                 // create an error condition: two times same enabled value
+                 message = new LightSwitch(!lastState);
+              }
+
+              lastState = !lastState;
+              context.getMeasurement("dispatched").increment();
+              return message;
+           }
+        }
+      );
+
+      // associate a sink handler
+      sink.setEventHandler(
+        new EventSinkHandler()
+        {
+           public void handle(EventMessage[] events, SimulationContext context)
+           {
+              context.getMeasurement("processed").increment();
+              context.addAttachment(EventMessage.class, events[0]);
+           }
+        }
+      );
+
+      simulation.addSource(source);
+      simulation.addSink(sink);
+
+      // forward single event messages
+      simulation.bindStatement("select A.enabled as firstEnabled, B.enabled as secondEnabled "+
+        "from pattern [every (A=LightSwitch(enabled=false) -> B=LightSwitch(enabled=false))]", sink);
+
+      // start simulation
+      simulation.singleRun();
+
+      // display status
+      printStatus();
+
+      // evaluate results
+      EventMessage lastEventMessage = context.getAttachment(EventMessage.class);
+      assertNotNull(lastEventMessage);
+      assertEquals(false, lastEventMessage.getProperty("firstEnabled"));
+      assertEquals(false, lastEventMessage.getProperty("secondEnabled"));
+
+   }
+}


Property changes on: sam/trunk/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Modified: sam/trunk/src/test/java/org/jboss/test/sam/simulation/SensorMessageFactory.java
===================================================================
--- sam/trunk/src/test/java/org/jboss/test/sam/simulation/SensorMessageFactory.java	2008-07-10 14:10:35 UTC (rev 136)
+++ sam/trunk/src/test/java/org/jboss/test/sam/simulation/SensorMessageFactory.java	2008-07-10 19:34:32 UTC (rev 137)
@@ -21,9 +21,9 @@
  */
 package org.jboss.test.sam.simulation;
 
-import arjuna.JavaSim.Distributions.ExponentialStream;
 import org.jboss.sam.simulation.EventMessageFactory;
 import org.jboss.sam.simulation.SimulationContext;
+import org.javasim.streams.ExponentialStream;
 
 import java.io.IOException;
 

Added: sam/trunk/src/test/resources/samples/pattern/esper-cfg.xml
===================================================================
--- sam/trunk/src/test/resources/samples/pattern/esper-cfg.xml	                        (rev 0)
+++ sam/trunk/src/test/resources/samples/pattern/esper-cfg.xml	2008-07-10 19:34:32 UTC (rev 137)
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+	Sample configuration file.
+-->
+<esper-configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+                     xmlns="http://www.espertech.com/schema/esper"
+                     xsi:noNamespaceSchemaLocation="esper-configuration-2-0.xsd">
+
+   <!--
+   Adds a Java package name of a package that Java event classes reside in.
+   This setting allows an application to place all it's events into one or more Java packages
+   and then declare these packages.
+   The engine attempts to resolve an event type alias to a Java class residing in each declared package.
+   -->
+   <event-type-auto-alias package-name="org.jboss.test.sam.samples.pattern"/>
+
+   <!--
+      Sample engine settings
+   -->
+   <engine-settings>
+      <defaults>
+         <threading>
+            <!--
+            In multithreaded environments, this setting controls whether dispatches to listeners
+            preserve the ordering in which the statement processes events
+            -->
+            <listener-dispatch preserve-order="true" timeout-msec="1000" locking="spin"/>
+            <!--
+            In multithreaded environments, this setting controls whether insert-into streams
+            preserve the order of events inserted into them by one or more statements,
+            allowing statements that consume other statement's events to behave deterministic.
+            -->
+            <insert-into-dispatch preserve-order="true" timeout-msec="100" locking="spin"/>
+            <!-- These settings define the resolution of the internal timer thread,
+            and can disable the timer  to indicate that the application supplies the timer events
+            -->
+            <internal-timer enabled="true" msec-resolution="100"/>
+         </threading>
+         <event-meta>
+            <!--
+            Lets configure the engine to use case-insensitive resolution for event properties
+            -->
+            <class-property-resolution style="distinct_case_insensitive"/>
+         </event-meta>
+         <view-resources>
+            <!--
+            Lets configure the engine to reuse views, which is the default but can introduce additional locking
+            -->
+            <share-views enabled="true"/>
+         </view-resources>
+         <logging>
+            <!--
+            By default the engine does not generate logging through Log4j of the event processing execution path.
+            To get debug output, set this flag to true. This setting translates into a static boolean flag
+            and thus may apply to multiple engine instances within a given VM.
+            -->
+            <execution-path enabled="false" />
+         </logging>
+         <stream-selection>
+            <!--
+            By default the engine generates output for the insert stream only, and not for the remove stream.
+            To obtain output for remove stream only, or for insert stream and remove stream,
+            there are keywords "rstream" and "irstream" for use in the select clause.
+            This  setting controls the default behavior, if no keyword is specified in the select-clause by statements.
+            -->
+            <stream-selector value="irstream" />
+         </stream-selection>
+         <time-source>
+            <!--
+            By default the time source is System.currentTimeMillis.
+            This sample configures the nano-second time call System.nanoTime() as the time source,
+            which Esper adjusts for wall clock time.
+            -->
+            <time-source-type value="nano" />
+         </time-source>
+      </defaults>
+   </engine-settings>
+
+</esper-configuration>


Property changes on: sam/trunk/src/test/resources/samples/pattern/esper-cfg.xml
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF




More information about the overlord-commits mailing list