Author: heiko.braun(a)jboss.com
Date: 2008-07-14 13:04:28 -0400 (Mon, 14 Jul 2008)
New Revision: 163
Added:
sam/trunk/src/test/java/org/jboss/test/sam/samples/aggregation/
sam/trunk/src/test/java/org/jboss/test/sam/samples/aggregation/AggregationTestCase.java
sam/trunk/src/test/java/org/jboss/test/sam/samples/aggregation/SalesEventMessage.java
Modified:
sam/trunk/SAM.iws
sam/trunk/sam-trunk.iml
Log:
Added aggregation sample
Modified: sam/trunk/SAM.iws
===================================================================
--- sam/trunk/SAM.iws 2008-07-14 17:04:03 UTC (rev 162)
+++ sam/trunk/SAM.iws 2008-07-14 17:04:28 UTC (rev 163)
@@ -21,16 +21,20 @@
<list default="true" name="Default" comment="">
<change type="MODIFICATION"
beforePath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/internal/SimulationProcessList.java"
afterPath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/internal/SimulationProcessList.java"
/>
<change type="MODIFICATION"
beforePath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/Scheduler.java"
afterPath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/Scheduler.java"
/>
+ <change type="NEW" beforePath=""
afterPath="$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/aggregation"
/>
<change type="MODIFICATION"
beforePath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/stats/Histogram.java"
afterPath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/stats/Histogram.java"
/>
<change type="MODIFICATION"
beforePath="$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/filtering/FilteringTestCase.java"
afterPath="$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/filtering/FilteringTestCase.java"
/>
+ <change type="NEW" beforePath=""
afterPath="$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/aggregation/AggregationTestCase.java"
/>
<change type="NEW" beforePath=""
afterPath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/util"
/>
<change type="MODIFICATION"
beforePath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/stats/SimpleHistogram.java"
afterPath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/stats/SimpleHistogram.java"
/>
<change type="NEW" beforePath=""
afterPath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/util/ThreadUtil.java"
/>
<change type="MODIFICATION"
beforePath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/pom.xml"
afterPath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/pom.xml" />
<change type="MODIFICATION"
beforePath="$PROJECT_DIR$/SAM.iws" afterPath="$PROJECT_DIR$/SAM.iws"
/>
+ <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="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/stats/Variance.java"
afterPath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/stats/Variance.java"
/>
- <change type="MODIFICATION"
beforePath="$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/filtering/OrderEventMessage.java"
afterPath="$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/filtering/OrderEventMessage.java"
/>
+ <change type="MODIFICATION"
beforePath="$PROJECT_DIR$/sam-trunk.iml"
afterPath="$PROJECT_DIR$/sam-trunk.iml" />
<change type="MODIFICATION"
beforePath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/stats/Mean.java"
afterPath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/stats/Mean.java"
/>
+ <change type="NEW" beforePath=""
afterPath="$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/aggregation/SalesEventMessage.java"
/>
<change type="MODIFICATION"
beforePath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/SimulationProcess.java"
afterPath="/home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/SimulationProcess.java"
/>
</list>
</component>
@@ -116,6 +120,32 @@
<option name="CONDITION" value="" />
<option name="LOG_MESSAGE" value="" />
</breakpoint>
+ <breakpoint
url="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/aggregation/AggregationTestCase.java"
line="160"
class="org.jboss.test.sam.samples.aggregation.AggregationTestCase"
package="org.jboss.test.sam.samples.aggregation">
+ <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/aggregation/AggregationTestCase.java"
line="129" class="Class at AggregationTestCase.java:129"
package="org.jboss.test.sam.samples.aggregation">
+ <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>
@@ -164,8 +194,8 @@
<property name="field_breakpoints_groupByClasses"
value="true" />
<property name="method_breakpoints_groupByClasses"
value="true" />
<property name="exception_breakpoints_viewId" value="TABLE"
/>
- <property name="field_breakpoints_viewId" value="TABLE"
/>
<property name="exception_breakpoints_groupByClasses"
value="true" />
+ <property name="field_breakpoints_viewId" value="TABLE"
/>
<property name="method_breakpoints_groupByMethods"
value="false" />
</ui_properties>
</component>
@@ -188,11 +218,13 @@
</component>
<component name="FileEditorManager">
<leaf>
- <file leaf-file-name="FilteringTestCase.java" pinned="false"
current="true" current-in-tab="true">
- <entry
file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/filtering/FilteringTestCase.java">
+ <file leaf-file-name="AggregationTestCase.java"
pinned="false" current="true" current-in-tab="true">
+ <entry
file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/aggregation/AggregationTestCase.java">
<provider selected="true"
editor-type-id="text-editor">
- <state line="132" column="59"
selection-start="4252" selection-end="4252"
vertical-scroll-proportion="0.60566705">
- <folding />
+ <state line="139" column="45"
selection-start="4279" selection-end="4279"
vertical-scroll-proportion="0.41086188">
+ <folding>
+ <element signature="imports" expanded="true"
/>
+ </folding>
</state>
</provider>
</entry>
@@ -210,8 +242,8 @@
<option name="HIDE_CLASSES_WHERE_METHOD_NOT_IMPLEMENTED"
value="false" />
</component>
<component name="HighlightingSettingsPerFile">
- <setting
file="file://$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java"
root0="SKIP_INSPECTION" />
<setting
file="file:///home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/SimulationProcess.java"
root0="SKIP_INSPECTION" />
+ <setting
file="file://$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java"
root0="SKIP_INSPECTION" />
</component>
<component name="InspectionManager">
<option name="AUTOSCROLL_TO_SOURCE" value="false" />
@@ -254,20 +286,6 @@
<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>
@@ -300,24 +318,6 @@
<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>
@@ -449,10 +449,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>
@@ -538,59 +534,9 @@
<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>
- <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="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/src" />
- <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="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="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <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_ELEMENT>
<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/samples/pattern"
/>
- <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -660,28 +606,6 @@
<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="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="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/src" />
- <option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
<option name="myItemId"
value="PsiDirectory:$PROJECT_DIR$/src/main" />
<option name="myItemType"
value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
@@ -781,7 +705,29 @@
<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">
@@ -795,7 +741,7 @@
<showLibraryContents />
<hideEmptyPackages ProjectPane="false" />
<abbreviatePackageNames />
- <showStructure PackagesPane="false" ProjectPane="false"
Scope="false" Favorites="false" />
+ <showStructure Favorites="false" PackagesPane="false"
Scope="false" ProjectPane="false" />
<autoscrollToSource />
<autoscrollFromSource />
<sortByType />
@@ -826,8 +772,8 @@
<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="GenerateAntBuildDialog.forceTargetJdk"
value="true" />
<property name="cvs_file_history_flatOrder1" value="1" />
+ <property name="GenerateAntBuildDialog.forceTargetJdk"
value="true" />
<property name="MemberChooser.copyJavadoc" value="false"
/>
<property name="GenerateAntBuildDialog.backupFiles"
value="true" />
</component>
@@ -850,14 +796,14 @@
</key>
</component>
<component name="RestoreUpdateTree" />
- <component name="RunManager" selected="Remote.client">
- <tempConfiguration default="false" name="SimulationTestCase"
type="JUnit" factoryName="JUnit" enabled="false"
merge="false">
- <pattern value="org.jboss.test.sam.simulation.*" />
+ <component name="RunManager"
selected="JUnit.AggregationTestCase">
+ <tempConfiguration default="false" name="AggregationTestCase"
type="JUnit" factoryName="JUnit" enabled="false"
merge="false">
+ <pattern value="org.jboss.test.sam.samples.aggregation.*" />
<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.simulation" />
- <option name="MAIN_CLASS_NAME"
value="org.jboss.test.sam.simulation.SimulationTestCase" />
+ <option name="PACKAGE_NAME"
value="org.jboss.test.sam.samples.aggregation" />
+ <option name="MAIN_CLASS_NAME"
value="org.jboss.test.sam.samples.aggregation.AggregationTestCase" />
<option name="METHOD_NAME" />
<option name="TEST_OBJECT" value="class" />
<option name="VM_PARAMETERS" />
@@ -868,7 +814,7 @@
<value defaultName="wholeProject" />
</option>
<RunnerSettings RunnerId="Debug">
- <option name="DEBUG_PORT" value="60790" />
+ <option name="DEBUG_PORT" value="44090" />
<option name="TRANSPORT" value="0" />
<option name="LOCAL" value="true" />
</RunnerSettings>
@@ -879,13 +825,6 @@
<option name="Make" value="false" />
</method>
</tempConfiguration>
- <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"
/>
@@ -905,18 +844,6 @@
<option name="Make" value="false" />
</method>
</configuration>
- <configuration default="true" type="Applet"
factoryName="Applet">
- <module name="" />
- <option name="MAIN_CLASS_NAME" />
- <option name="HTML_FILE_NAME" />
- <option name="HTML_USED" value="false" />
- <option name="WIDTH" value="400" />
- <option name="HEIGHT" value="300" />
- <option name="POLICY_FILE"
value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
- <option name="VM_PARAMETERS" />
- <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false"
/>
- <option name="ALTERNATIVE_JRE_PATH" />
- </configuration>
<configuration default="true" type="Application"
factoryName="Application" enabled="false" merge="false">
<option name="MAIN_CLASS_NAME" />
<option name="VM_PARAMETERS" />
@@ -930,6 +857,25 @@
<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="Applet"
factoryName="Applet">
+ <module name="" />
+ <option name="MAIN_CLASS_NAME" />
+ <option name="HTML_FILE_NAME" />
+ <option name="HTML_USED" value="false" />
+ <option name="WIDTH" value="400" />
+ <option name="HEIGHT" value="300" />
+ <option name="POLICY_FILE"
value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
+ <option name="VM_PARAMETERS" />
+ <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false"
/>
+ <option name="ALTERNATIVE_JRE_PATH" />
+ </configuration>
<configuration default="false" name="client"
type="Remote" factoryName="Remote">
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
@@ -1054,7 +1000,7 @@
</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" />
@@ -1162,7 +1108,7 @@
<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,0.5" version="1">
+ <component
name="com.intellij.openapi.roots.ui.configuration.projectRoot.ProjectRootMasterDetailsConfigurable"
proportions="0.26602086" version="1">
<option name="myPlainMode" value="false" />
<option name="myLastEditedConfigurable" value="sam-trunk"
/>
</component>
@@ -1170,108 +1116,110 @@
<option name="myLastEditedConfigurable" value="IDE Profiles"
/>
</component>
<component name="editorHistoryManager">
- <entry
file="file:///home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/stats/Quantile.java">
+ <entry
file="file://$PROJECT_DIR$/src/main/java/org/jboss/sam/internal/esper/EventAdapter.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="90" column="8"
selection-start="2393" selection-end="2393"
vertical-scroll-proportion="0.6635183">
+ <state line="101" column="50"
selection-start="2690" selection-end="2690"
vertical-scroll-proportion="0.6875754">
<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/simulation/SensorMessageFactory.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="21" column="37"
selection-start="1040" selection-end="1069"
vertical-scroll-proportion="0.022432113">
+ <state line="52" column="4"
selection-start="1680" selection-end="1846"
vertical-scroll-proportion="0.64173704">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/pom.xml">
+ <entry
file="file://$PROJECT_DIR$/src/main/java/org/jboss/sam/internal/esper/EsperRuntimeImpl.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="140" column="16"
selection-start="4601" selection-end="4601"
vertical-scroll-proportion="0.58774036">
+ <state line="109" column="0"
selection-start="3486" selection-end="3486"
vertical-scroll-proportion="0.02291918">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/src/test/resources/samples/esper-default-cfg.xml">
+ <entry
file="file://$PROJECT_DIR$/src/main/java/org/jboss/sam/EventProcessorFactory.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="7" column="0" selection-start="300"
selection-end="300" vertical-scroll-proportion="0.1570248">
+ <state line="41" column="34"
selection-start="1429" selection-end="1429"
vertical-scroll-proportion="0.4354644">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/pattern/LightSwitchEventMessage.java">
+ <entry
file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/filtering/OrderEventMessage.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="26" column="27"
selection-start="1159" selection-end="1159"
vertical-scroll-proportion="0.13751508">
+ <state line="21" column="44"
selection-start="1076" selection-end="1076"
vertical-scroll-proportion="0.022432113">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/src/main/java/org/jboss/sam/internal/esper/EventAdapter.java">
+ <entry
file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/simulation/SimulationTestCase.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="101" column="50"
selection-start="2690" selection-end="2690"
vertical-scroll-proportion="0.6875754">
+ <state line="34" column="13"
selection-start="1340" selection-end="1340"
vertical-scroll-proportion="-0.32585597">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/simulation/SensorMessageFactory.java">
+ <entry
file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/aggregation/SalesEventMessage.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="52" column="4"
selection-start="1680" selection-end="1846"
vertical-scroll-proportion="0.64173704">
+ <state line="45" column="0"
selection-start="1528" selection-end="1528"
vertical-scroll-proportion="0.5608028">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/src/main/java/org/jboss/sam/internal/esper/EsperRuntimeImpl.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="109" column="0"
selection-start="3486" selection-end="3486"
vertical-scroll-proportion="0.02291918">
+ <state line="34" column="13"
selection-start="1312" selection-end="1312"
vertical-scroll-proportion="-1.1610577">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/src/main/java/org/jboss/sam/EventProcessorFactory.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="41" column="34"
selection-start="1429" selection-end="1429"
vertical-scroll-proportion="0.4354644">
+ <state line="57" column="36"
selection-start="1763" selection-end="1763"
vertical-scroll-proportion="0.5608028">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java">
+ <entry
file="file:///home/hbraun/dev/prj/javasim/JavaSim/trunk/pom.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="30" column="28"
selection-start="1243" selection-end="1243"
vertical-scroll-proportion="0.023341523">
+ <state line="6" column="21"
selection-start="376" selection-end="386"
vertical-scroll-proportion="0.13701923">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/simulation/SimulationTestCase.java">
+ <entry file="file://$PROJECT_DIR$/pom.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="49" column="60"
selection-start="1828" selection-end="1828"
vertical-scroll-proportion="0.112183355">
+ <state line="23" column="33"
selection-start="1055" selection-end="1055"
vertical-scroll-proportion="-1.2451923">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/src/main/java/org/jboss/sam/simulation/EventSimulation.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="224" column="36"
selection-start="6832" selection-end="6832"
vertical-scroll-proportion="0.08685163">
+ <state line="65" column="38"
selection-start="2279" selection-end="2279"
vertical-scroll-proportion="0.261343">
<folding />
</state>
</provider>
</entry>
- <entry
file="file:///home/hbraun/dev/prj/javasim/JavaSim/trunk/src/main/java/org/javasim/SimulationProcess.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="640" column="52"
selection-start="15820" selection-end="15820"
vertical-scroll-proportion="0.42702052">
+ <state line="224" column="0"
selection-start="6800" selection-end="6800"
vertical-scroll-proportion="-0.41322315">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/filtering/OrderEventMessage.java">
+ <entry
file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/filtering/FilteringTestCase.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="21" column="44"
selection-start="1076" selection-end="1076"
vertical-scroll-proportion="0.022432113">
+ <state line="77" column="39"
selection-start="2481" selection-end="2481"
vertical-scroll-proportion="0.21487603">
<folding />
</state>
</provider>
</entry>
- <entry
file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/filtering/FilteringTestCase.java">
+ <entry
file="file://$PROJECT_DIR$/src/test/java/org/jboss/test/sam/samples/aggregation/AggregationTestCase.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="132" column="59"
selection-start="4252" selection-end="4252"
vertical-scroll-proportion="0.60566705">
- <folding />
+ <state line="139" column="45"
selection-start="4279" selection-end="4279"
vertical-scroll-proportion="0.41086188">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
</state>
</provider>
</entry>
Modified: sam/trunk/sam-trunk.iml
===================================================================
--- sam/trunk/sam-trunk.iml 2008-07-14 17:04:03 UTC (rev 162)
+++ sam/trunk/sam-trunk.iml 2008-07-14 17:04:28 UTC (rev 163)
@@ -11,7 +11,6 @@
</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>
@@ -93,42 +92,6 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: cglib:cglib-nodep:jar:2.1_3:compile">
- <CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../.m2/repository/cglib/cglib-nodep/2.1_3/cglib-nodep-2.1_3.jar!/"
/>
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: log4j:log4j:jar:1.2.14:compile">
- <CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../.m2/repository/log4j/log4j/1.2.14/log4j-1.2.14.jar!/"
/>
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep:
mysql:mysql-connector-java:jar:3.1.14:compile">
- <CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../.m2/repository/mysql/mysql-connector-java/3.1.14/mysql-connector-java-3.1.14.jar!/"
/>
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep:
commons-logging:commons-logging:jar:1.1.1:compile">
- <CLASSES>
- <root
url="jar://$MODULE_DIR$/../../../../.m2/repository/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar!/"
/>
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
<orderEntryProperties />
</component>
<component name="VcsManagerConfiguration">
Added:
sam/trunk/src/test/java/org/jboss/test/sam/samples/aggregation/AggregationTestCase.java
===================================================================
---
sam/trunk/src/test/java/org/jboss/test/sam/samples/aggregation/AggregationTestCase.java
(rev 0)
+++
sam/trunk/src/test/java/org/jboss/test/sam/samples/aggregation/AggregationTestCase.java 2008-07-14
17:04:28 UTC (rev 163)
@@ -0,0 +1,165 @@
+/*
+ * 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.aggregation;
+
+import junit.framework.TestCase;
+import org.jboss.sam.simulation.*;
+import org.jboss.sam.EventMessage;
+import org.javasim.streams.UniformStream;
+
+import java.util.*;
+import java.io.IOException;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class AggregationTestCase 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, 150.00);
+
+ // init
+ simulation = EventSimulation.bootstrap(config);
+
+ // shared between all entities
+ context = simulation.getContext();
+
+ // create an event source and sink
+ source = new EventSourceEntity("RetailStoreEventSource", 0.05);
+ sink = new EventSinkEntity("SalesVolumeMonitor");
+
+ }
+
+ protected void tearDown() throws Exception
+ {
+ simulation.done();
+ }
+
+ @SuppressWarnings({"unchecked"})
+ public void testEventAggregation()
+ {
+ // associate a source factory
+ source.setEventMessageFactory(
+ new EventMessageFactory()
+ {
+ String[] stores = new String[] {"London", "Paris",
"Mailand"};
+
+ UniformStream rndStore = new UniformStream(1,3);
+ UniformStream salesVolume = new UniformStream(1,100);
+
+ public Object createEventMessage(SimulationContext context)
+ {
+ context.getMeasurement("dispatched").increment();
+
+ // we need at least a single match for the test case
+ String store = randomStore();
+ SalesEventMessage salesEvent = new SalesEventMessage(
+ store,
+ getVolumen(),
+ System.currentTimeMillis()
+ );
+
+ return salesEvent;
+ }
+
+ public String randomStore()
+ {
+ try
+ {
+ double value = Math.round(rndStore.getNumber());
+ int l = new Double(value).intValue();
+ return stores[l-1];
+ }
+ catch (IOException e)
+ {
+ return stores[0];
+ }
+ }
+
+ public double getVolumen()
+ {
+ try
+ {
+ return salesVolume.getNumber();
+ } catch (IOException e)
+ {
+ return 10.00;
+ }
+ }
+
+ }
+ );
+
+ // associate a sink handler
+ sink.setEventHandler(
+ new EventSinkHandler()
+ {
+ public void handle(EventMessage[] events, SimulationContext context)
+ {
+ if(null==context.getAttachment(List.class))
+ context.addAttachment(List.class, new ArrayList<EventMessage>());
+
+ context.getAttachment(List.class).addAll(Arrays.asList(events));
+ context.getMeasurement("processed").increment();
+ }
+ }
+ );
+
+ simulation.addSource(source);
+ simulation.addSink(sink);
+
+ // Filters high value orders with amount>5
+ simulation.createStatement("insert into AverageSalesVolume " +
+ "select s.store as location, sum(s.salesVolume) as avg " +
+ "from
org.jboss.test.sam.samples.aggregation.SalesEventMessage.win:length_batch(10) as s "
+
+ "group by s.store");
+
+ // Forward any highvalue order to the HighValueMonitor
+ simulation.bindStatement("select * from AverageSalesVolume", sink);
+
+ // start simulation
+ simulation.singleRun();
+
+ // display status
+ context.dump(System.out);
+
+ // evaluate results
+ List<EventMessage> eventMessages = context.getAttachment(List.class);
+ assertNotNull(eventMessages);
+ assertTrue(eventMessages.size()>=1);
+
+ for(EventMessage e : eventMessages)
+ {
+ System.out.println(e.getProperty("location")+", " +
e.getProperty("avg"));
+ }
+ }
+
+}
Property changes on:
sam/trunk/src/test/java/org/jboss/test/sam/samples/aggregation/AggregationTestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added:
sam/trunk/src/test/java/org/jboss/test/sam/samples/aggregation/SalesEventMessage.java
===================================================================
--- sam/trunk/src/test/java/org/jboss/test/sam/samples/aggregation/SalesEventMessage.java
(rev 0)
+++
sam/trunk/src/test/java/org/jboss/test/sam/samples/aggregation/SalesEventMessage.java 2008-07-14
17:04:28 UTC (rev 163)
@@ -0,0 +1,57 @@
+/*
+ * 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.aggregation;
+
+import java.util.Date;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public final class SalesEventMessage
+{
+ private String store;
+ private double salesVolume;
+ private long timestamp;
+
+ public SalesEventMessage(String store, double salesVolume, long timestamp)
+ {
+ this.store = store;
+ this.salesVolume = salesVolume;
+ this.timestamp = timestamp;
+ }
+
+ public String getStore()
+ {
+ return store;
+ }
+
+ public double getSalesVolume()
+ {
+ return salesVolume;
+ }
+
+ public long getTimestamp()
+ {
+ return timestamp;
+ }
+
+}
Property changes on:
sam/trunk/src/test/java/org/jboss/test/sam/samples/aggregation/SalesEventMessage.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF