Overlord SVN: r667 - in cdl/trunk/samples/jbossesb: brokerage/supplier and 2 other directories.
by overlord-commits@lists.jboss.org
Author: jeff.yuchang
Date: 2009-07-17 03:43:44 -0400 (Fri, 17 Jul 2009)
New Revision: 667
Removed:
cdl/trunk/samples/jbossesb/brokerage/broker/stateful/
cdl/trunk/samples/jbossesb/brokerage/supplier/stateful/
cdl/trunk/samples/jbossesb/common/creditAgency/stateful/
cdl/trunk/samples/jbossesb/purchasing/store/stateful/
Log:
[SOAG-110] remove stateful samples.
17 years
Overlord SVN: r666 - in sam/trunk: modules/core/src/test/java/org/jboss/test/sam/database and 2 other directories.
by overlord-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-07-15 07:58:01 -0400 (Wed, 15 Jul 2009)
New Revision: 666
Added:
sam/trunk/modules/core/src/test/java/org/jboss/test/sam/database/ResultCollection.java
sam/trunk/modules/core/src/test/resources/database/sql-join.drl
Removed:
sam/trunk/modules/core/src/test/resources/database/sampleJoin.drl
sam/trunk/modules/core/src/test/resources/database/triggerPull.drl
Modified:
sam/trunk/SAMM.iws
sam/trunk/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java
sam/trunk/modules/core/src/test/resources/database/sam-cfg.xml
sam/trunk/modules/sim/src/test/resources/simulation/sam-cfg.xml
Log:
Fix database test case
Modified: sam/trunk/SAMM.iws
===================================================================
--- sam/trunk/SAMM.iws 2009-07-15 10:24:59 UTC (rev 665)
+++ sam/trunk/SAMM.iws 2009-07-15 11:58:01 UTC (rev 666)
@@ -17,18 +17,14 @@
</component>
<component name="ChangeListManager">
<list default="true" name="Default" comment="">
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/resources/simulation/sam-cfg.xml" afterPath="$PROJECT_DIR$/modules/sim/src/test/resources/simulation/sam-cfg.xml" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/SAMM.iws" afterPath="$PROJECT_DIR$/SAMM.iws" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/test/resources/drools/sam-cfg.xml" afterPath="$PROJECT_DIR$/modules/core/src/test/resources/drools/sam-cfg.xml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/test/resources/adapter/invm/sam-cfg.xml" afterPath="$PROJECT_DIR$/modules/core/src/test/resources/adapter/invm/sam-cfg.xml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/test/resources/database/sampleJoin.drl" afterPath="$PROJECT_DIR$/modules/core/src/test/resources/database/sampleJoin.drl" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/ConfigurationDef.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/ConfigurationDef.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/pom.xml" afterPath="$PROJECT_DIR$/modules/core/pom.xml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/SAMAdapter.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/SAMAdapter.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/test/resources/database/triggerPull.drl" afterPath="$PROJECT_DIR$/modules/core/src/test/resources/database/triggerPull.drl" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/test/resources/database/sampleJoin.drl" afterPath="" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/database/ResultCollection.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/test/resources/database/sam-cfg.xml" afterPath="$PROJECT_DIR$/modules/core/src/test/resources/database/sam-cfg.xml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/StreamOutputAdapter.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/StreamOutputAdapter.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/test/resources/database/sql-join.drl" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java" afterPath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/test/resources/database/triggerPull.drl" afterPath="" />
</list>
</component>
<component name="ChangeListSynchronizer" />
@@ -198,96 +194,44 @@
</component>
<component name="FileEditorManager">
<leaf>
- <file leaf-file-name="triggerPull.drl" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/core/src/test/resources/database/triggerPull.drl">
+ <file leaf-file-name="DatabaseTestCase.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="23" column="0" selection-start="587" selection-end="587" vertical-scroll-proportion="0.45828146">
- <folding />
+ <state line="100" column="39" selection-start="3376" selection-end="3376" vertical-scroll-proportion="0.7237164">
+ <folding>
+ <element signature="method#setUp#0;class#DatabaseTestCase#0" expanded="false" />
+ </folding>
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="sam-cfg.xml" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/core/src/test/resources/drools/sam-cfg.xml">
+ <file leaf-file-name="sql-join.drl" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/test/resources/database/sql-join.drl">
<provider selected="true" editor-type-id="text-editor">
- <state line="12" column="0" selection-start="367" selection-end="367" vertical-scroll-proportion="0.23471883">
+ <state line="23" column="29" selection-start="694" selection-end="694" vertical-scroll-proportion="0.45828146">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="ConfigurationDef.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/ConfigurationDef.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="33" column="27" selection-start="1360" selection-end="1360" vertical-scroll-proportion="0.19559902">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
<file leaf-file-name="sam-cfg.xml" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/modules/core/src/test/resources/database/sam-cfg.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="1" column="20" selection-start="62" selection-end="81" vertical-scroll-proportion="0.01992528">
+ <state line="24" column="0" selection-start="728" selection-end="728" vertical-scroll-proportion="0.47820672">
<folding />
</state>
</provider>
</entry>
</file>
<file leaf-file-name="sam-cfg.xml" pinned="false" current="true" current-in-tab="true">
- <entry file="file://$PROJECT_DIR$/modules/core/src/test/resources/adapter/invm/sam-cfg.xml">
+ <entry file="file://$PROJECT_DIR$/modules/sim/src/test/resources/simulation/sam-cfg.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="21" column="0" selection-start="719" selection-end="719" vertical-scroll-proportion="0.41075796">
+ <state line="15" column="21" selection-start="342" selection-end="342" vertical-scroll-proportion="0.29339853">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="DroolsEventProcessorImpl.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="119" column="60" selection-start="4172" selection-end="4172" vertical-scroll-proportion="0.37235367">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="Configuration.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/Configuration.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="64" column="15" selection-start="2253" selection-end="2253" vertical-scroll-proportion="-0.039119806">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="SAMAdapter.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/SAMAdapter.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="90" column="80" selection-start="3112" selection-end="3112" vertical-scroll-proportion="0.52552927">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="UpdateListener.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/UpdateListener.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="28" column="10" selection-start="1171" selection-end="1171" vertical-scroll-proportion="0.15647922">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="StreamOutputAdapter.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/StreamOutputAdapter.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="80" column="66" selection-start="2380" selection-end="2380" vertical-scroll-proportion="0.84352076">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
</leaf>
</component>
<component name="FindManager">
@@ -442,6 +386,10 @@
<option name="myItemId" value="SAMM.ipr" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -449,6 +397,126 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
+ <option name="myItemId" value="sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src/test/resources" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src/test/resources/simulation" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src/test/resources" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src/test/resources/samples" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
<option name="myItemId" value="core" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
</PATH_ELEMENT>
@@ -492,10 +560,36 @@
<option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/test/resources" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ </PATH>
+ <PATH>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/test/resources/drools" />
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/test/resources" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/test/resources/database" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -519,9 +613,25 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/test/resources" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/src/test/java/org/jboss/test/sam" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -544,6 +654,30 @@
<option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/test" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/src/test/java/org/jboss/test/sam/database" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -563,6 +697,28 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
<option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/main" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
@@ -877,13 +1033,13 @@
</component>
<component name="ToolWindowManager">
<frame x="316" y="39" width="1328" height="965" extended-state="0" />
- <editor active="true" />
+ <editor active="false" />
<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="CVS" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="14" />
<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="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="7" />
- <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.30414388" order="0" />
+ <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.30414388" order="0" />
<window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32718894" order="1" />
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.24706802" order="1" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="9" />
@@ -987,107 +1143,109 @@
<option name="myLastEditedConfigurable" />
</component>
<component name="editorHistoryManager">
- <entry file="file://$PROJECT_DIR$/modules/sim/pom.xml">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/Configuration.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="6" column="24" selection-start="340" selection-end="340" vertical-scroll-proportion="-0.992528">
+ <state line="64" column="15" selection-start="2253" selection-end="2253" vertical-scroll-proportion="-0.039119806">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/pom.xml">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/test/resources/adapter/invm/sam-cfg.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="105" column="54" selection-start="2728" selection-end="2728" vertical-scroll-proportion="0.5180573">
+ <state line="21" column="0" selection-start="719" selection-end="719" vertical-scroll-proportion="0.41075796">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/test/resources/database/sampleJoin.drl">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/ConfigurationDef.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="14" column="0" selection-start="436" selection-end="436" vertical-scroll-proportion="0.2789539">
+ <state line="33" column="27" selection-start="1360" selection-end="1360" vertical-scroll-proportion="0.19559902">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/test/resources/drools/sam-cfg.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="127" column="5" selection-start="3968" selection-end="3968" vertical-scroll-proportion="1.0501223">
+ <state line="12" column="0" selection-start="367" selection-end="367" vertical-scroll-proportion="0.23471883">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/StreamOutputAdapter.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/UpdateListener.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="80" column="66" selection-start="2380" selection-end="2380" vertical-scroll-proportion="0.84352076">
+ <state line="28" column="10" selection-start="1171" selection-end="1171" vertical-scroll-proportion="0.15647922">
<folding />
</state>
</provider>
</entry>
- <entry file="jar:///Users/hbraun/.m2/repository/org/mvel/mvel2/2.0.10/mvel2-2.0.10.jar!/org/mvel2/optimizers/impl/refl/ReflectiveAccessorOptimizer.class">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/StreamOutputAdapter.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="49" column="0" selection-start="3038" selection-end="3038" vertical-scroll-proportion="0.38231632">
+ <state line="80" column="66" selection-start="2380" selection-end="2380" vertical-scroll-proportion="0.84352076">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/UpdateListener.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessor.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="28" column="10" selection-start="1171" selection-end="1171" vertical-scroll-proportion="0.15647922">
+ <state line="38" column="9" selection-start="1564" selection-end="1564" vertical-scroll-proportion="0.31880447">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/SAMAdapter.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/database/Query.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="90" column="80" selection-start="3112" selection-end="3112" vertical-scroll-proportion="0.52552927">
+ <state line="28" column="3" selection-start="1149" selection-end="1149" vertical-scroll-proportion="0.15647922">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/test/resources/database/triggerPull.drl">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="23" column="0" selection-start="587" selection-end="587" vertical-scroll-proportion="0.45828146">
+ <state line="80" column="59" selection-start="3131" selection-end="3131" vertical-scroll-proportion="0.59153175">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/Configuration.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/SAMAdapter.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="64" column="15" selection-start="2253" selection-end="2253" vertical-scroll-proportion="-0.039119806">
+ <state line="118" column="66" selection-start="3733" selection-end="3733" vertical-scroll-proportion="0.7310087">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/database/ResultCollection.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="119" column="60" selection-start="4172" selection-end="4172" vertical-scroll-proportion="0.37235367">
+ <state line="28" column="29" selection-start="1167" selection-end="1183" vertical-scroll-proportion="0.15647922">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/test/resources/drools/sam-cfg.xml">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/test/resources/database/sql-join.drl">
<provider selected="true" editor-type-id="text-editor">
- <state line="12" column="0" selection-start="367" selection-end="367" vertical-scroll-proportion="0.23471883">
+ <state line="23" column="29" selection-start="694" selection-end="694" vertical-scroll-proportion="0.45828146">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/ConfigurationDef.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="33" column="27" selection-start="1360" selection-end="1360" vertical-scroll-proportion="0.19559902">
- <folding />
+ <state line="100" column="39" selection-start="3376" selection-end="3376" vertical-scroll-proportion="0.7237164">
+ <folding>
+ <element signature="method#setUp#0;class#DatabaseTestCase#0" expanded="false" />
+ </folding>
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/modules/core/src/test/resources/database/sam-cfg.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="1" column="20" selection-start="62" selection-end="81" vertical-scroll-proportion="0.01992528">
+ <state line="24" column="0" selection-start="728" selection-end="728" vertical-scroll-proportion="0.47820672">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/test/resources/adapter/invm/sam-cfg.xml">
+ <entry file="file://$PROJECT_DIR$/modules/sim/src/test/resources/simulation/sam-cfg.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="21" column="0" selection-start="719" selection-end="719" vertical-scroll-proportion="0.41075796">
+ <state line="15" column="21" selection-start="342" selection-end="342" vertical-scroll-proportion="0.29339853">
<folding />
</state>
</provider>
Modified: sam/trunk/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java
===================================================================
--- sam/trunk/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java 2009-07-15 10:24:59 UTC (rev 665)
+++ sam/trunk/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java 2009-07-15 11:58:01 UTC (rev 666)
@@ -68,47 +68,22 @@
protected void tearDown() throws Exception
{
+ eventProcessor.stop();
db.shutdown();
}
/**
- * Fire a event to trigger the SQL query
- * (Constraints applied to SQL statement)
- */
- public void testSQLQuery() throws Exception
- {
- // setup
- eventProcessor.registerStatement(
- "TriggerSQL",
- loadDRL("database/triggerPull.drl")
- );
-
- eventProcessor.start();
-
- // trigger
- Query queryMessage = new Query("%");
- generateInVMEvent(queryMessage);
-
- // evaluate
- assertTrue("Listener not invoked", bufferedOutput.isInvoked());
- EventMessage[] eventMessages = bufferedOutput.getLastNewData();
- assertEquals(7, eventMessages.length);
-
- dump(eventMessages);
- }
-
- /**
* Join SQL data into event processing
* (Constraints applied to working memory)
* @throws Exception
*/
- /* public void testSQLJoin() throws Exception
+ public void testSQLJoin() throws Exception
{
// setup
eventProcessor.registerStatement(
"" +
"SQLJoin",
- loadDRL("database/sampleJoin.drl")
+ loadDRL("database/sql-join.drl")
);
eventProcessor.start();
@@ -122,11 +97,11 @@
// evaluate
assertTrue("Listener not invoked", bufferedOutput.isInvoked());
EventMessage[] eventMessages = bufferedOutput.getLastNewData();
- assertEquals(3, eventMessages.length);
+ assertEquals(1, eventMessages.length);
+ assertEquals("Wrong results", "GOOG", eventMessages[0].getProperty("symbol"));
+ //dump(eventMessages);
+ }
- dump(eventMessages);
- }*/
-
private void dump(EventMessage[] eventMessages)
{
for(EventMessage event : eventMessages)
Added: sam/trunk/modules/core/src/test/java/org/jboss/test/sam/database/ResultCollection.java
===================================================================
--- sam/trunk/modules/core/src/test/java/org/jboss/test/sam/database/ResultCollection.java (rev 0)
+++ sam/trunk/modules/core/src/test/java/org/jboss/test/sam/database/ResultCollection.java 2009-07-15 11:58:01 UTC (rev 666)
@@ -0,0 +1,32 @@
+/*
+ * 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.database;
+
+import java.util.ArrayList;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class ResultCollection extends ArrayList
+{
+
+}
Modified: sam/trunk/modules/core/src/test/resources/database/sam-cfg.xml
===================================================================
--- sam/trunk/modules/core/src/test/resources/database/sam-cfg.xml 2009-07-15 10:24:59 UTC (rev 665)
+++ sam/trunk/modules/core/src/test/resources/database/sam-cfg.xml 2009-07-15 11:58:01 UTC (rev 666)
@@ -4,7 +4,7 @@
xmlns:ns2="http://org.jboss.sam/08/2008/">
<runtime-configuration>
- <property name="drools.runtimelog.enable" value="true"/>
+ <property name="drools.runtimelog.enable" value="false"/>
</runtime-configuration>
<database-references>
Deleted: sam/trunk/modules/core/src/test/resources/database/sampleJoin.drl
===================================================================
--- sam/trunk/modules/core/src/test/resources/database/sampleJoin.drl 2009-07-15 10:24:59 UTC (rev 665)
+++ sam/trunk/modules/core/src/test/resources/database/sampleJoin.drl 2009-07-15 11:58:01 UTC (rev 666)
@@ -1,15 +0,0 @@
-package org.jboss.test.sam.database;
-
-import java.util.*;
-
-global org.jboss.sam.internal.drools.SAMAdapter SAM;
-
-rule "Pull any quote for certain threshold"
-when
- $query: Query(threshold>99) from entry-point "in-channel"
- $sqlStream: ArrayList() from collect (
- Map(this['price']>$query.threshold) from SAM.query("hsqlDB", "SELECT symbol, price FROM quotes")
- );
-then
- SAM.getListener("out-channel").update($sqlStream);
-end
\ No newline at end of file
Copied: sam/trunk/modules/core/src/test/resources/database/sql-join.drl (from rev 665, sam/trunk/modules/core/src/test/resources/database/sampleJoin.drl)
===================================================================
--- sam/trunk/modules/core/src/test/resources/database/sql-join.drl (rev 0)
+++ sam/trunk/modules/core/src/test/resources/database/sql-join.drl 2009-07-15 11:58:01 UTC (rev 666)
@@ -0,0 +1,28 @@
+package org.jboss.test.sam.database;
+
+import java.util.*;
+
+global org.jboss.sam.internal.drools.SAMAdapter SAM;
+
+rule "Pull any quote for certain threshold"
+ lock-on-active true
+when
+ $query: Query(threshold>99) from entry-point "in-channel"
+ $results: ArrayList() from collect (
+ Map(this['price']>$query.threshold) from SAM.query("hsqlDB", "SELECT symbol, price FROM quotes")
+ );
+then
+ //SAM.getListener("out-channel").update($results);
+ //retract($query);
+ entryPoints["sql-stream"].insert($results);
+end
+
+rule "filter symbols"
+when
+ $results : ArrayList() from entry-point "sql-stream"
+ $filtered : ArrayList(empty==false) from collect (
+ Map(this['symbol']=="GOOG") from $results
+ )
+then
+ SAM.getListener("out-channel").update($filtered);
+end
Deleted: sam/trunk/modules/core/src/test/resources/database/triggerPull.drl
===================================================================
--- sam/trunk/modules/core/src/test/resources/database/triggerPull.drl 2009-07-15 10:24:59 UTC (rev 665)
+++ sam/trunk/modules/core/src/test/resources/database/triggerPull.drl 2009-07-15 11:58:01 UTC (rev 666)
@@ -1,23 +0,0 @@
-package org.jboss.test.sam.database;
-
-import java.util.*;
-
-global org.jboss.sam.internal.drools.SAMAdapter SAM;
-
-# default dialect for the semantic code will be MVEL
-dialect "mvel"
-
-declare Query
- @role( event )
-end
-
-rule "Pull any quote by symbol"
-when
- $query: Query() from entry-point "in-channel"
- $sqlStream: ArrayList() from collect (
- List() from SAM.query("hsqlDB", "SELECT symbol, price FROM quotes WHERE symbol like ('"+$query.criteria+"')")
- )
-then
- System.out.println("ResultSet: "+ $sqlStream);
- SAM.getListener("out-channel").update($sqlStream);
-end
Modified: sam/trunk/modules/sim/src/test/resources/simulation/sam-cfg.xml
===================================================================
--- sam/trunk/modules/sim/src/test/resources/simulation/sam-cfg.xml 2009-07-15 10:24:59 UTC (rev 665)
+++ sam/trunk/modules/sim/src/test/resources/simulation/sam-cfg.xml 2009-07-15 11:58:01 UTC (rev 666)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
-<ns2:processingNode name="DatabaseTestCase"
+<ns2:activityMonitor name="DatabaseTestCase"
domain="http://org.jboss.sam/test/database"
xmlns:ns2="http://org.jboss.sam/08/2008/">
@@ -13,4 +13,4 @@
<statements/>
-</ns2:processingNode>
\ No newline at end of file
+</ns2:activityMonitor>
\ No newline at end of file
17 years
Overlord SVN: r665 - in sam/trunk: modules/core and 6 other directories.
by overlord-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-07-15 06:24:59 -0400 (Wed, 15 Jul 2009)
New Revision: 665
Modified:
sam/trunk/SAMM.iws
sam/trunk/modules/core/pom.xml
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/ConfigurationDef.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/SAMAdapter.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/StreamOutputAdapter.java
sam/trunk/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java
sam/trunk/modules/core/src/test/resources/adapter/invm/sam-cfg.xml
sam/trunk/modules/core/src/test/resources/database/sam-cfg.xml
sam/trunk/modules/core/src/test/resources/database/sampleJoin.drl
sam/trunk/modules/core/src/test/resources/database/triggerPull.drl
sam/trunk/modules/core/src/test/resources/drools/sam-cfg.xml
Log:
Apply properties to DroolsEventProcessor. Change config root element name
Modified: sam/trunk/SAMM.iws
===================================================================
--- sam/trunk/SAMM.iws 2009-07-15 09:41:12 UTC (rev 664)
+++ sam/trunk/SAMM.iws 2009-07-15 10:24:59 UTC (rev 665)
@@ -18,8 +18,17 @@
<component name="ChangeListManager">
<list default="true" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/SAMM.iws" afterPath="$PROJECT_DIR$/SAMM.iws" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/pom.xml" afterPath="$PROJECT_DIR$/modules/sim/pom.xml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/pom.xml" afterPath="$PROJECT_DIR$/pom.xml" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/test/resources/drools/sam-cfg.xml" afterPath="$PROJECT_DIR$/modules/core/src/test/resources/drools/sam-cfg.xml" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/test/resources/adapter/invm/sam-cfg.xml" afterPath="$PROJECT_DIR$/modules/core/src/test/resources/adapter/invm/sam-cfg.xml" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/test/resources/database/sampleJoin.drl" afterPath="$PROJECT_DIR$/modules/core/src/test/resources/database/sampleJoin.drl" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/ConfigurationDef.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/ConfigurationDef.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/pom.xml" afterPath="$PROJECT_DIR$/modules/core/pom.xml" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/SAMAdapter.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/SAMAdapter.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/test/resources/database/triggerPull.drl" afterPath="$PROJECT_DIR$/modules/core/src/test/resources/database/triggerPull.drl" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/test/resources/database/sam-cfg.xml" afterPath="$PROJECT_DIR$/modules/core/src/test/resources/database/sam-cfg.xml" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/StreamOutputAdapter.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/StreamOutputAdapter.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java" afterPath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java" />
</list>
</component>
<component name="ChangeListSynchronizer" />
@@ -91,7 +100,7 @@
</component>
<component name="DebuggerManager">
<line_breakpoints>
- <breakpoint url="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/StreamOutputAdapter.java" line="48" class="org.jboss.sam.internal.drools.StreamOutputAdapter" package="org.jboss.sam.internal.drools">
+ <breakpoint url="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/SAMAdapter.java" line="75" class="org.jboss.sam.internal.drools.SAMAdapter" package="org.jboss.sam.internal.drools">
<option name="ENABLED" value="true" />
<option name="SUSPEND_POLICY" value="SuspendAll" />
<option name="LOG_ENABLED" value="false" />
@@ -104,7 +113,7 @@
<option name="CONDITION" value="" />
<option name="LOG_MESSAGE" value="" />
</breakpoint>
- <breakpoint url="file://$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java" line="129" class="org.jboss.sam.simulation.EventSourceEntity" package="org.jboss.sam.simulation">
+ <breakpoint url="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/StreamOutputAdapter.java" line="48" class="org.jboss.sam.internal.drools.StreamOutputAdapter" package="org.jboss.sam.internal.drools">
<option name="ENABLED" value="true" />
<option name="SUSPEND_POLICY" value="SuspendAll" />
<option name="LOG_ENABLED" value="false" />
@@ -117,32 +126,6 @@
<option name="CONDITION" value="" />
<option name="LOG_MESSAGE" value="" />
</breakpoint>
- <breakpoint url="file://$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java" line="155" 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$/modules/sim/src/test/java/org/jboss/test/sam/simulation/SimulationTestCase.java" line="78" class="org.jboss.test.sam.simulation.SimulationTestCase" package="org.jboss.test.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>
@@ -215,46 +198,91 @@
</component>
<component name="FileEditorManager">
<leaf>
+ <file leaf-file-name="triggerPull.drl" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/test/resources/database/triggerPull.drl">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="23" column="0" selection-start="587" selection-end="587" vertical-scroll-proportion="0.45828146">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="sam-cfg.xml" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/test/resources/drools/sam-cfg.xml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="12" column="0" selection-start="367" selection-end="367" vertical-scroll-proportion="0.23471883">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="ConfigurationDef.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/ConfigurationDef.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="33" column="27" selection-start="1360" selection-end="1360" vertical-scroll-proportion="0.19559902">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="sam-cfg.xml" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/test/resources/database/sam-cfg.xml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="1" column="20" selection-start="62" selection-end="81" vertical-scroll-proportion="0.01992528">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="sam-cfg.xml" pinned="false" current="true" current-in-tab="true">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/test/resources/adapter/invm/sam-cfg.xml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="21" column="0" selection-start="719" selection-end="719" vertical-scroll-proportion="0.41075796">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
<file leaf-file-name="DroolsEventProcessorImpl.java" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="47" column="13" selection-start="1893" selection-end="1893" vertical-scroll-proportion="0.15940224">
+ <state line="119" column="60" selection-start="4172" selection-end="4172" vertical-scroll-proportion="0.37235367">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="ExpressionConverter.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/ExpressionConverter.java">
+ <file leaf-file-name="Configuration.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/Configuration.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="67" column="11" selection-start="2712" selection-end="2712" vertical-scroll-proportion="0.8007472">
+ <state line="64" column="15" selection-start="2253" selection-end="2253" vertical-scroll-proportion="-0.039119806">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="pom.xml" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/core/pom.xml">
+ <file leaf-file-name="SAMAdapter.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/SAMAdapter.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
+ <state line="90" column="80" selection-start="3112" selection-end="3112" vertical-scroll-proportion="0.52552927">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="pom.xml" pinned="false" current="true" current-in-tab="true">
- <entry file="file://$PROJECT_DIR$/pom.xml">
+ <file leaf-file-name="UpdateListener.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/UpdateListener.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="25" column="58" selection-start="1006" selection-end="1006" vertical-scroll-proportion="0.01992528">
+ <state line="28" column="10" selection-start="1171" selection-end="1171" vertical-scroll-proportion="0.15647922">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="pom.xml" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/sim/pom.xml">
+ <file leaf-file-name="StreamOutputAdapter.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/StreamOutputAdapter.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="6" column="24" selection-start="340" selection-end="340" vertical-scroll-proportion="-0.992528">
+ <state line="80" column="66" selection-start="2380" selection-end="2380" vertical-scroll-proportion="0.84352076">
<folding />
</state>
</provider>
@@ -414,10 +442,6 @@
<option name="myItemId" value="SAMM.ipr" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="sim" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -425,26 +449,6 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="sim" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- </PATH>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="SAMM.ipr" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- </PATH>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="SAMM.ipr" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
<option name="myItemId" value="core" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
</PATH_ELEMENT>
@@ -540,26 +544,6 @@
<option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/test" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/src/test/java/org/jboss/test/sam" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -579,33 +563,9 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/test" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/main" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/src/test/java/org/jboss/test/sam/drools" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -625,33 +585,25 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/test" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/main" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/test/java" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/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$/modules/core/src/test/java/org" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/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$/modules/core/src/test/java/org/jboss" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/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$/modules/core/src/test/java/org/jboss/test" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/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$/modules/core/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$/modules/core/src/test/java/org/jboss/test/sam/config" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -671,33 +623,27 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/test" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/main" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
- </PATH>
- <PATH>
<PATH_ELEMENT>
- <option name="myItemId" value="SAMM.ipr" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/main/java" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="core" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/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$/modules/core/src" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/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$/modules/core/src/main" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/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$/modules/core/src/main/resources" />
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
@@ -738,6 +684,14 @@
<option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/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$/modules/core/src/main/java/org/jboss/sam/config" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
</PATH>
</subPane>
</component>
@@ -1033,107 +987,107 @@
<option name="myLastEditedConfigurable" />
</component>
<component name="editorHistoryManager">
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/datasource/internal/DBCPDataSourceFactory.java">
+ <entry file="file://$PROJECT_DIR$/modules/sim/pom.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="37" column="13" selection-start="1597" selection-end="1597" vertical-scroll-proportion="0.15940224">
+ <state line="6" column="24" selection-start="340" selection-end="340" vertical-scroll-proportion="-0.992528">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/ConfigFactory.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/pom.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="112" column="64" selection-start="3432" selection-end="3432" vertical-scroll-proportion="0.54171854">
+ <state line="105" column="54" selection-start="2728" selection-end="2728" vertical-scroll-proportion="0.5180573">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/config/ConfigParserTestCase.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/test/resources/database/sampleJoin.drl">
<provider selected="true" editor-type-id="text-editor">
- <state line="91" column="21" selection-start="3466" selection-end="3466" vertical-scroll-proportion="0.44209215">
+ <state line="14" column="0" selection-start="436" selection-end="436" vertical-scroll-proportion="0.2789539">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/EPLValueAdapter.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="28" column="13" selection-start="1195" selection-end="1195" vertical-scroll-proportion="0.15647922">
+ <state line="127" column="5" selection-start="3968" selection-end="3968" vertical-scroll-proportion="1.0501223">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/ProcessingStatement.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/StreamOutputAdapter.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="31" column="17" selection-start="1431" selection-end="1431" vertical-scroll-proportion="0.21515892">
+ <state line="80" column="66" selection-start="2380" selection-end="2380" vertical-scroll-proportion="0.84352076">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessor.java">
+ <entry file="jar:///Users/hbraun/.m2/repository/org/mvel/mvel2/2.0.10/mvel2-2.0.10.jar!/org/mvel2/optimizers/impl/refl/ReflectiveAccessorOptimizer.class">
<provider selected="true" editor-type-id="text-editor">
- <state line="84" column="51" selection-start="2330" selection-end="2330" vertical-scroll-proportion="0.54171854">
+ <state line="49" column="0" selection-start="3038" selection-end="3038" vertical-scroll-proportion="0.38231632">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/Configuration.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/UpdateListener.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="86" column="18" selection-start="2917" selection-end="2917" vertical-scroll-proportion="0.21393643">
+ <state line="28" column="10" selection-start="1171" selection-end="1171" vertical-scroll-proportion="0.15647922">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/SAMAdapter.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="70" column="52" selection-start="3071" selection-end="3071" vertical-scroll-proportion="0.59153175">
+ <state line="90" column="80" selection-start="3112" selection-end="3112" vertical-scroll-proportion="0.52552927">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/drools/ApiTestCase.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/test/resources/database/triggerPull.drl">
<provider selected="true" editor-type-id="text-editor">
- <state line="55" column="19" selection-start="1920" selection-end="1920" vertical-scroll-proportion="0.52179325">
+ <state line="23" column="0" selection-start="587" selection-end="587" vertical-scroll-proportion="0.45828146">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/StatementDef.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/Configuration.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="74" column="16" selection-start="1848" selection-end="1848" vertical-scroll-proportion="0.6601467">
+ <state line="64" column="15" selection-start="2253" selection-end="2253" vertical-scroll-proportion="-0.039119806">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="47" column="13" selection-start="1893" selection-end="1893" vertical-scroll-proportion="0.15940224">
+ <state line="119" column="60" selection-start="4172" selection-end="4172" vertical-scroll-proportion="0.37235367">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/ExpressionConverter.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/test/resources/drools/sam-cfg.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="67" column="11" selection-start="2712" selection-end="2712" vertical-scroll-proportion="0.8007472">
+ <state line="12" column="0" selection-start="367" selection-end="367" vertical-scroll-proportion="0.23471883">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/pom.xml">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/ConfigurationDef.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
+ <state line="33" column="27" selection-start="1360" selection-end="1360" vertical-scroll-proportion="0.19559902">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/sim/pom.xml">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/test/resources/database/sam-cfg.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="6" column="24" selection-start="340" selection-end="340" vertical-scroll-proportion="-0.992528">
+ <state line="1" column="20" selection-start="62" selection-end="81" vertical-scroll-proportion="0.01992528">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/pom.xml">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/test/resources/adapter/invm/sam-cfg.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="25" column="58" selection-start="1006" selection-end="1006" vertical-scroll-proportion="0.01992528">
+ <state line="21" column="0" selection-start="719" selection-end="719" vertical-scroll-proportion="0.41075796">
<folding />
</state>
</provider>
Modified: sam/trunk/modules/core/pom.xml
===================================================================
--- sam/trunk/modules/core/pom.xml 2009-07-15 09:41:12 UTC (rev 664)
+++ sam/trunk/modules/core/pom.xml 2009-07-15 10:24:59 UTC (rev 665)
@@ -96,7 +96,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
- <exclude>org/jboss/test/sam/database/DatabaseTestCase.java</exclude>
+ <!--exclude>org/jboss/test/sam/database/DatabaseTestCase.java</exclude-->
</excludes>
</configuration>
</plugin>
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/ConfigurationDef.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/ConfigurationDef.java 2009-07-15 09:41:12 UTC (rev 664)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/ConfigurationDef.java 2009-07-15 10:24:59 UTC (rev 665)
@@ -29,9 +29,9 @@
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
-@XmlRootElement(name = "processingNode", namespace = "http://org.jboss.sam/08/2008/")
+@XmlRootElement(name = "activityMonitor", namespace = "http://org.jboss.sam/08/2008/")
@XmlType(
- name = "processingNodeType",
+ name = "activityMonitorType",
namespace = "http://org.jboss.sam/08/2008/",
propOrder = {
"props", "databases", "inputs", "outputs", "statements"
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java 2009-07-15 09:41:12 UTC (rev 664)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java 2009-07-15 10:24:59 UTC (rev 665)
@@ -24,6 +24,7 @@
import org.drools.KnowledgeBase;
import org.drools.KnowledgeBaseConfiguration;
import org.drools.KnowledgeBaseFactory;
+import org.drools.logger.KnowledgeRuntimeLoggerFactory;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderFactory;
import org.drools.builder.ResourceType;
@@ -51,6 +52,7 @@
private String name;
private ActivityMonitor runtime;
private boolean started;
+ private boolean enableRuntimeLogger;
private KnowledgeBase kbase;
private StatefulKnowledgeSession session;
@@ -80,7 +82,8 @@
{
this.session = kbase.newStatefulKnowledgeSession();
this.session.getGlobals().setDelegate(this);
- //KnowledgeRuntimeLoggerFactory.newConsoleLogger(session);
+ if(enableRuntimeLogger)
+ KnowledgeRuntimeLoggerFactory.newConsoleLogger(session);
//System.out.println("3. Created session");
@@ -113,9 +116,8 @@
public void setProperties(Properties properties)
{
- /*String runtimeLogProp = (String)properties.get("drools.runtimelog.enable");
- if(runtimeLogProp!=null && runtimeLogProp.equals("true"))
- KnowledgeRuntimeLoggerFactory.newConsoleLogger(session);*/
+ String prop = (String)properties.get("drools.runtimelog.enable");
+ enableRuntimeLogger = (prop !=null && "true".equals(prop));
}
public void setRuntime(ActivityMonitor runtime)
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/SAMAdapter.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/SAMAdapter.java 2009-07-15 09:41:12 UTC (rev 664)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/SAMAdapter.java 2009-07-15 10:24:59 UTC (rev 665)
@@ -72,7 +72,7 @@
{
StreamOutputAdapter adapter = this.outputAdapters.get(name);
if (null == adapter)
- throw new IllegalArgumentException("Unknown listener '" + name + "'");
+ throw new IllegalArgumentException("Unknown stream output '" + name + "'");
return adapter;
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/StreamOutputAdapter.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/StreamOutputAdapter.java 2009-07-15 09:41:12 UTC (rev 664)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/StreamOutputAdapter.java 2009-07-15 10:24:59 UTC (rev 665)
@@ -46,6 +46,9 @@
public void update(Object result)
{
+ if(null==result)
+ throw new IllegalArgumentException("Stream output cannot be null");
+
EventMessage[] events = adoptPayload(result);
delegate.write(events);
}
Modified: sam/trunk/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java
===================================================================
--- sam/trunk/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java 2009-07-15 09:41:12 UTC (rev 664)
+++ sam/trunk/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java 2009-07-15 10:24:59 UTC (rev 665)
@@ -102,7 +102,7 @@
* (Constraints applied to working memory)
* @throws Exception
*/
- public void testSQLJoin() throws Exception
+ /* public void testSQLJoin() throws Exception
{
// setup
eventProcessor.registerStatement(
@@ -125,7 +125,7 @@
assertEquals(3, eventMessages.length);
dump(eventMessages);
- }
+ }*/
private void dump(EventMessage[] eventMessages)
{
Modified: sam/trunk/modules/core/src/test/resources/adapter/invm/sam-cfg.xml
===================================================================
--- sam/trunk/modules/core/src/test/resources/adapter/invm/sam-cfg.xml 2009-07-15 09:41:12 UTC (rev 664)
+++ sam/trunk/modules/core/src/test/resources/adapter/invm/sam-cfg.xml 2009-07-15 10:24:59 UTC (rev 665)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
-<ns2:processingNode name="InVMAdapterTestCase"
+<ns2:activityMonitor name="InVMAdapterTestCase"
domain="http://org.jboss.sam/test/database"
xmlns:ns2="http://org.jboss.sam/08/2008/">
<statements>
@@ -19,4 +19,4 @@
]]></epl>
</statement>
</statements>
-</ns2:processingNode>
\ No newline at end of file
+</ns2:activityMonitor>
\ No newline at end of file
Modified: sam/trunk/modules/core/src/test/resources/database/sam-cfg.xml
===================================================================
--- sam/trunk/modules/core/src/test/resources/database/sam-cfg.xml 2009-07-15 09:41:12 UTC (rev 664)
+++ sam/trunk/modules/core/src/test/resources/database/sam-cfg.xml 2009-07-15 10:24:59 UTC (rev 665)
@@ -1,23 +1,25 @@
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
-<ns2:processingNode name="DatabaseTestCase"
+<ns2:activityMonitor name="DatabaseTestCase"
domain="http://org.jboss.sam/test/database"
xmlns:ns2="http://org.jboss.sam/08/2008/">
- <properties/>
+ <runtime-configuration>
+ <property name="drools.runtimelog.enable" value="true"/>
+ </runtime-configuration>
- <database-references>
- <database-reference name="hsqlDB">
- <datasource url="jdbc:hsqldb:mem:SamTestSetup" name="hsqlDS" driver="org.hsqldb.jdbcDriver">
- <connection-arg value="sa" name="user"/>
- <connection-arg value="" name="password"/>
- </datasource>
- </database-reference>
- </database-references>
+ <database-references>
+ <database-reference name="hsqlDB">
+ <datasource url="jdbc:hsqldb:mem:SamTestSetup" name="hsqlDS" driver="org.hsqldb.jdbcDriver">
+ <connection-arg value="sa" name="user"/>
+ <connection-arg value="" name="password"/>
+ </datasource>
+ </database-reference>
+ </database-references>
- <inputs/>
+ <inputs/>
- <outputs/>
+ <outputs/>
- <statements/>
+ <statements/>
-</ns2:processingNode>
\ No newline at end of file
+</ns2:activityMonitor>
\ No newline at end of file
Modified: sam/trunk/modules/core/src/test/resources/database/sampleJoin.drl
===================================================================
--- sam/trunk/modules/core/src/test/resources/database/sampleJoin.drl 2009-07-15 09:41:12 UTC (rev 664)
+++ sam/trunk/modules/core/src/test/resources/database/sampleJoin.drl 2009-07-15 10:24:59 UTC (rev 665)
@@ -6,10 +6,10 @@
rule "Pull any quote for certain threshold"
when
- $query: Query(threshold>99);
+ $query: Query(threshold>99) from entry-point "in-channel"
$sqlStream: ArrayList() from collect (
Map(this['price']>$query.threshold) from SAM.query("hsqlDB", "SELECT symbol, price FROM quotes")
);
then
- SAM.getListener("InVM").update($sqlStream);
+ SAM.getListener("out-channel").update($sqlStream);
end
\ No newline at end of file
Modified: sam/trunk/modules/core/src/test/resources/database/triggerPull.drl
===================================================================
--- sam/trunk/modules/core/src/test/resources/database/triggerPull.drl 2009-07-15 09:41:12 UTC (rev 664)
+++ sam/trunk/modules/core/src/test/resources/database/triggerPull.drl 2009-07-15 10:24:59 UTC (rev 665)
@@ -15,8 +15,9 @@
when
$query: Query() from entry-point "in-channel"
$sqlStream: ArrayList() from collect (
- Map() from SAM.query("hsqlDB", "SELECT symbol, price FROM quotes WHERE symbol like ('"+$query.criteria+"')")
+ List() from SAM.query("hsqlDB", "SELECT symbol, price FROM quotes WHERE symbol like ('"+$query.criteria+"')")
)
then
+ System.out.println("ResultSet: "+ $sqlStream);
SAM.getListener("out-channel").update($sqlStream);
end
Modified: sam/trunk/modules/core/src/test/resources/drools/sam-cfg.xml
===================================================================
--- sam/trunk/modules/core/src/test/resources/drools/sam-cfg.xml 2009-07-15 09:41:12 UTC (rev 664)
+++ sam/trunk/modules/core/src/test/resources/drools/sam-cfg.xml 2009-07-15 10:24:59 UTC (rev 665)
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
-<ns2:processingNode name="DroolsAPITestCase"
+<ns2:activityMonitor name="DroolsAPITestCase"
domain="http://org.jboss.sam/test/drools"
xmlns:ns2="http://org.jboss.sam/08/2008/">
<runtime-configuration>
- <property name="drools.runtimelog.enable" value="true"/>
+ <property name="drools.runtimelog.enable" value="false"/>
</runtime-configuration>
<statements/>
-</ns2:processingNode>
\ No newline at end of file
+</ns2:activityMonitor>
\ No newline at end of file
17 years
Overlord SVN: r664 - in sam/trunk: modules/sim and 1 other directory.
by overlord-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-07-15 05:41:12 -0400 (Wed, 15 Jul 2009)
New Revision: 664
Modified:
sam/trunk/SAMM.iws
sam/trunk/modules/sim/pom.xml
sam/trunk/pom.xml
Log:
Cleanup pom.xml
Modified: sam/trunk/SAMM.iws
===================================================================
--- sam/trunk/SAMM.iws 2009-07-15 09:36:07 UTC (rev 663)
+++ sam/trunk/SAMM.iws 2009-07-15 09:41:12 UTC (rev 664)
@@ -18,13 +18,8 @@
<component name="ChangeListManager">
<list default="true" name="Default" comment="">
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/SAMM.iws" afterPath="$PROJECT_DIR$/SAMM.iws" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/StatementDef.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/StatementDef.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java" afterPath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessor.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessor.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/Configuration.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/Configuration.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java" afterPath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/drools/ApiTestCase.java" afterPath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/drools/ApiTestCase.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/pom.xml" afterPath="$PROJECT_DIR$/modules/sim/pom.xml" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/pom.xml" afterPath="$PROJECT_DIR$/pom.xml" />
</list>
</component>
<component name="ChangeListSynchronizer" />
@@ -220,69 +215,51 @@
</component>
<component name="FileEditorManager">
<leaf>
- <file leaf-file-name="EventProcessor.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessor.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="84" column="51" selection-start="2330" selection-end="2330" vertical-scroll-proportion="0.54171854">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
<file leaf-file-name="DroolsEventProcessorImpl.java" pinned="false" current="false" current-in-tab="false">
<entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="233" column="0" selection-start="7188" selection-end="7188" vertical-scroll-proportion="0.31257784">
+ <state line="47" column="13" selection-start="1893" selection-end="1893" vertical-scroll-proportion="0.15940224">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="ProcessingStatement.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/ProcessingStatement.java">
+ <file leaf-file-name="ExpressionConverter.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/ExpressionConverter.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="31" column="17" selection-start="1431" selection-end="1431" vertical-scroll-proportion="0.21515892">
+ <state line="67" column="11" selection-start="2712" selection-end="2712" vertical-scroll-proportion="0.8007472">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="Configuration.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/Configuration.java">
+ <file leaf-file-name="pom.xml" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/core/pom.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="86" column="18" selection-start="2917" selection-end="2917" vertical-scroll-proportion="0.21393643">
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="EventSimulation.java" pinned="false" current="true" current-in-tab="true">
- <entry file="file://$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java">
+ <file leaf-file-name="pom.xml" pinned="false" current="true" current-in-tab="true">
+ <entry file="file://$PROJECT_DIR$/pom.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="71" column="15" selection-start="3119" selection-end="3119" vertical-scroll-proportion="0.61145705">
+ <state line="25" column="58" selection-start="1006" selection-end="1006" vertical-scroll-proportion="0.01992528">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="ApiTestCase.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/drools/ApiTestCase.java">
+ <file leaf-file-name="pom.xml" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/sim/pom.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="55" column="19" selection-start="1920" selection-end="1920" vertical-scroll-proportion="0.52179325">
+ <state line="6" column="24" selection-start="340" selection-end="340" vertical-scroll-proportion="-0.992528">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="StatementDef.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/StatementDef.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="74" column="16" selection-start="1848" selection-end="1848" vertical-scroll-proportion="0.6601467">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
</leaf>
</component>
<component name="FindManager">
@@ -423,6 +400,14 @@
<option name="myItemId" value="SAMM.ipr" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="toplevel" />
+ <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>
<PATH>
<PATH_ELEMENT>
@@ -430,6 +415,36 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
+ <option name="myItemId" value="sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
<option name="myItemId" value="core" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
</PATH_ELEMENT>
@@ -724,136 +739,6 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
</PATH>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="SAMM.ipr" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="core" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/main" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/src/main/java/org/jboss/sam/datasource" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- </PATH>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="SAMM.ipr" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="core" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/main" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/src/main/java/org/jboss/sam/datasource" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/datasource/internal" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- </PATH>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="SAMM.ipr" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="core" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/main" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/src/main/java/org/jboss/sam/config" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- </PATH>
</subPane>
</component>
<component name="ProjectReloadState">
@@ -1148,107 +1033,107 @@
<option name="myLastEditedConfigurable" />
</component>
<component name="editorHistoryManager">
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessorFactory.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/datasource/internal/DBCPDataSourceFactory.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="41" column="49" selection-start="1482" selection-end="1482" vertical-scroll-proportion="0.63757116">
+ <state line="37" column="13" selection-start="1597" selection-end="1597" vertical-scroll-proportion="0.15940224">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/DefaultActivityMonitorImpl.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/ConfigFactory.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="41" column="66" selection-start="1632" selection-end="1632" vertical-scroll-proportion="0.35207823">
+ <state line="112" column="64" selection-start="3432" selection-end="3432" vertical-scroll-proportion="0.54171854">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/datasource/DataSourceFactory.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/config/ConfigParserTestCase.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="33" column="39" selection-start="1350" selection-end="1350" vertical-scroll-proportion="0.19559902">
+ <state line="91" column="21" selection-start="3466" selection-end="3466" vertical-scroll-proportion="0.44209215">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/datasource/DataSourceManager.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/EPLValueAdapter.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="30" column="13" selection-start="1234" selection-end="1234" vertical-scroll-proportion="0.15647922">
+ <state line="28" column="13" selection-start="1195" selection-end="1195" vertical-scroll-proportion="0.15647922">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/datasource/internal/DBCPDataSourceFactory.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/ProcessingStatement.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="37" column="13" selection-start="1597" selection-end="1597" vertical-scroll-proportion="0.15940224">
+ <state line="31" column="17" selection-start="1431" selection-end="1431" vertical-scroll-proportion="0.21515892">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/ConfigFactory.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessor.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="112" column="64" selection-start="3432" selection-end="3432" vertical-scroll-proportion="0.54171854">
+ <state line="84" column="51" selection-start="2330" selection-end="2330" vertical-scroll-proportion="0.54171854">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/config/ConfigParserTestCase.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/Configuration.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="91" column="21" selection-start="3466" selection-end="3466" vertical-scroll-proportion="0.44209215">
+ <state line="86" column="18" selection-start="2917" selection-end="2917" vertical-scroll-proportion="0.21393643">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/EPLValueAdapter.java">
+ <entry file="file://$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="28" column="13" selection-start="1195" selection-end="1195" vertical-scroll-proportion="0.15647922">
+ <state line="70" column="52" selection-start="3071" selection-end="3071" vertical-scroll-proportion="0.59153175">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/StatementDef.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/drools/ApiTestCase.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="74" column="16" selection-start="1848" selection-end="1848" vertical-scroll-proportion="0.6601467">
+ <state line="55" column="19" selection-start="1920" selection-end="1920" vertical-scroll-proportion="0.52179325">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/Configuration.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/StatementDef.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="86" column="18" selection-start="2917" selection-end="2917" vertical-scroll-proportion="0.21393643">
+ <state line="74" column="16" selection-start="1848" selection-end="1848" vertical-scroll-proportion="0.6601467">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/drools/ApiTestCase.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="55" column="19" selection-start="1920" selection-end="1920" vertical-scroll-proportion="0.52179325">
+ <state line="47" column="13" selection-start="1893" selection-end="1893" vertical-scroll-proportion="0.15940224">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/ProcessingStatement.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/ExpressionConverter.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="31" column="17" selection-start="1431" selection-end="1431" vertical-scroll-proportion="0.21515892">
+ <state line="67" column="11" selection-start="2712" selection-end="2712" vertical-scroll-proportion="0.8007472">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessor.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/pom.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="84" column="51" selection-start="2330" selection-end="2330" vertical-scroll-proportion="0.54171854">
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java">
+ <entry file="file://$PROJECT_DIR$/modules/sim/pom.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="233" column="0" selection-start="7188" selection-end="7188" vertical-scroll-proportion="0.31257784">
+ <state line="6" column="24" selection-start="340" selection-end="340" vertical-scroll-proportion="-0.992528">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java">
+ <entry file="file://$PROJECT_DIR$/pom.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="71" column="15" selection-start="3119" selection-end="3119" vertical-scroll-proportion="0.61145705">
+ <state line="25" column="58" selection-start="1006" selection-end="1006" vertical-scroll-proportion="0.01992528">
<folding />
</state>
</provider>
Modified: sam/trunk/modules/sim/pom.xml
===================================================================
--- sam/trunk/modules/sim/pom.xml 2009-07-15 09:36:07 UTC (rev 663)
+++ sam/trunk/modules/sim/pom.xml 2009-07-15 09:41:12 UTC (rev 664)
@@ -2,9 +2,9 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <name>SAM - Sim</name>
+ <name>SAM - Simulation</name>
<groupId>org.jboss.sam</groupId>
- <artifactId>sim</artifactId>
+ <artifactId>simulation</artifactId>
<packaging>jar</packaging>
<!-- Parent -->
@@ -17,11 +17,8 @@
<!-- Properties -->
<properties>
- <surefire.security.args>-Djava.security.manager -Djava.security.policy=src/test/etc/tst.policy
- </surefire.security.args>
- <surefire.jdwp.args>-Xdebug -Xnoagent -Djava.compiler=NONE
- -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
- </surefire.jdwp.args>
+ <surefire.security.args>-Djava.security.manager -Djava.security.policy=src/test/etc/tst.policy</surefire.security.args>
+ <surefire.jdwp.args>-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005</surefire.jdwp.args>
</properties>
<!-- Dependencies -->
Modified: sam/trunk/pom.xml
===================================================================
--- sam/trunk/pom.xml 2009-07-15 09:36:07 UTC (rev 663)
+++ sam/trunk/pom.xml 2009-07-15 09:41:12 UTC (rev 664)
@@ -23,15 +23,12 @@
<dbcp.version>1.2.2</dbcp.version>
<drools.version>5.0.1</drools.version>
<junit.version>3.8.2</junit.version>
- <commons-logging.version>1.1</commons-logging.version>
- <antlr.version>3.0.1</antlr.version>
+ <commons-logging.version>1.1</commons-logging.version>
<hsqldb.version>1.8.0.7</hsqldb.version>
<javasim.version>2.0-hbraun</javasim.version>
<jaxb.api.version>2.1</jaxb.api.version>
<jaxb.impl.version>2.1.6</jaxb.impl.version>
- <janino.version>2.5.10</janino.version>
- <mvel.version>2.0-dp4</mvel.version>
</properties>
<!-- Dependencies -->
17 years
Overlord SVN: r663 - in sam/trunk: modules/core/src/main/java/org/jboss/sam and 6 other directories.
by overlord-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-07-15 05:36:07 -0400 (Wed, 15 Jul 2009)
New Revision: 663
Modified:
sam/trunk/SAMM.iws
sam/trunk/modules/core/src/main/java/org/jboss/sam/EventProcessor.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/Configuration.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/StatementDef.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java
sam/trunk/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java
sam/trunk/modules/core/src/test/java/org/jboss/test/sam/drools/ApiTestCase.java
sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java
Log:
Remove obsolte API parts
Modified: sam/trunk/SAMM.iws
===================================================================
--- sam/trunk/SAMM.iws 2009-07-15 09:22:37 UTC (rev 662)
+++ sam/trunk/SAMM.iws 2009-07-15 09:36:07 UTC (rev 663)
@@ -17,47 +17,14 @@
</component>
<component name="ChangeListManager">
<list default="true" name="Default" comment="">
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/ProcessingStatement.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/ProcessingStatement.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/DataSourceDef.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/StreamOutputDef.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/sim.iml" afterPath="$PROJECT_DIR$/modules/sim/sim.iml" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/EPLDef.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/StreamInput.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/StreamInput.java" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/EPLDef.java" afterPath="" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/DatabaseRefDef.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/Configuration.java" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/StreamOutputDef.java" afterPath="" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/SAMRuntimeFactory.java" afterPath="" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/StatementDef.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/ConfigFactory.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/ConfigFactory.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/config/ConfigParserTestCase.java" afterPath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/config/ConfigParserTestCase.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/ActivityMonitorFactory.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/datasource/DataSourceFactory.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/datasource/DataSourceFactory.java" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/Configurator.java" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/SAMM.iws" afterPath="$PROJECT_DIR$/SAMM.iws" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/datasource/internal/DBCPDataSourceFactory.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/datasource/internal/DBCPDataSourceFactory.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/DefaultActivityMonitorImpl.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/PropertyDef.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/DefaultActivityMonitorFactory.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/SamTestSetup.java" afterPath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/SamTestSetup.java" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/SAMRuntimeAware.java" afterPath="" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/DefaultRuntimeImpl.java" afterPath="" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/StreamInputDef.java" afterPath="" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/DataSourceDef.java" afterPath="" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/DefaultRuntimeFactory.java" afterPath="" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/StatementDef.java" afterPath="" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/StatementDef.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/StatementDef.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java" afterPath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessor.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessor.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/StreamInputDef.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessorFactory.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessorFactory.java" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/DatabaseRefDef.java" afterPath="" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventMessage.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventMessage.java" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/PropertyDef.java" afterPath="" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/ActivityMonitor.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/ConfigurationDef.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/Configuration.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/Configuration.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java" afterPath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/ConfigurationDef.java" afterPath="" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/SAMRuntime.java" afterPath="" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/drools/ApiTestCase.java" afterPath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/drools/ApiTestCase.java" />
</list>
</component>
<component name="ChangeListSynchronizer" />
@@ -253,96 +220,69 @@
</component>
<component name="FileEditorManager">
<leaf>
- <file leaf-file-name="DefaultActivityMonitorFactory.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/DefaultActivityMonitorFactory.java">
+ <file leaf-file-name="EventProcessor.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessor.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="35" column="20" selection-start="1505" selection-end="1505" vertical-scroll-proportion="0.3946869">
+ <state line="84" column="51" selection-start="2330" selection-end="2330" vertical-scroll-proportion="0.54171854">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="DefaultActivityMonitorImpl.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/DefaultActivityMonitorImpl.java">
+ <file leaf-file-name="DroolsEventProcessorImpl.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="41" column="66" selection-start="1632" selection-end="1632" vertical-scroll-proportion="0.54648954">
+ <state line="233" column="0" selection-start="7188" selection-end="7188" vertical-scroll-proportion="0.31257784">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="Configuration.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/Configuration.java">
+ <file leaf-file-name="ProcessingStatement.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/ProcessingStatement.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="53" column="22" selection-start="2050" selection-end="2050" vertical-scroll-proportion="0.71875">
+ <state line="31" column="17" selection-start="1431" selection-end="1431" vertical-scroll-proportion="0.21515892">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="ConfigFactory.java" pinned="false" current="true" current-in-tab="true">
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/ConfigFactory.java">
+ <file leaf-file-name="Configuration.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/Configuration.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="108" column="43" selection-start="3303" selection-end="3303" vertical-scroll-proportion="0.63567364">
+ <state line="86" column="18" selection-start="2917" selection-end="2917" vertical-scroll-proportion="0.21393643">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="ConfigParserTestCase.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/config/ConfigParserTestCase.java">
+ <file leaf-file-name="EventSimulation.java" pinned="false" current="true" current-in-tab="true">
+ <entry file="file://$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="91" column="21" selection-start="3466" selection-end="3466" vertical-scroll-proportion="0.58203125">
+ <state line="71" column="15" selection-start="3119" selection-end="3119" vertical-scroll-proportion="0.61145705">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="EPLValueAdapter.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/EPLValueAdapter.java">
+ <file leaf-file-name="ApiTestCase.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/drools/ApiTestCase.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="28" column="13" selection-start="1195" selection-end="1195" vertical-scroll-proportion="0.24288425">
+ <state line="55" column="19" selection-start="1920" selection-end="1920" vertical-scroll-proportion="0.52179325">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="EventProcessor.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessor.java">
+ <file leaf-file-name="StatementDef.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/StatementDef.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="106" column="2" selection-start="2693" selection-end="2693" vertical-scroll-proportion="1.2246094">
+ <state line="74" column="16" selection-start="1848" selection-end="1848" vertical-scroll-proportion="0.6601467">
<folding />
</state>
</provider>
</entry>
</file>
- <file leaf-file-name="ProcessingStatement.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/ProcessingStatement.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="56" column="71" selection-start="1845" selection-end="1845" vertical-scroll-proportion="1.0929791">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="EventProcessorFactory.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessorFactory.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="41" column="49" selection-start="1482" selection-end="1482" vertical-scroll-proportion="0.63757116">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="ActivityMonitor.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/ActivityMonitor.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="34" column="2" selection-start="1303" selection-end="1303" vertical-scroll-proportion="0.42504743">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
</leaf>
</component>
<component name="FindManager">
@@ -822,6 +762,94 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/datasource" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/main" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/src/main/java/org/jboss/sam/datasource" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/datasource/internal" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/main" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/src/main/java/org/jboss/sam/config" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
@@ -839,7 +867,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 />
@@ -877,23 +905,6 @@
<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" />
- <option name="PROGRAM_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="" />
- </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" />
@@ -913,6 +924,23 @@
<option name="Make" value="true" />
</method>
</configuration>
+ <configuration default="true" type="Application" factoryName="Application" enabled="false" merge="false">
+ <option name="MAIN_CLASS_NAME" />
+ <option name="VM_PARAMETERS" />
+ <option name="PROGRAM_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="" />
+ </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="false" name="client" type="Remote" factoryName="Remote">
<option name="USE_SOCKET_TRANSPORT" value="true" />
<option name="SERVER_MODE" value="false" />
@@ -1009,16 +1037,16 @@
</todo-panel>
</component>
<component name="ToolWindowManager">
- <frame x="346" y="40" width="1328" height="965" extended-state="0" />
+ <frame x="316" y="39" width="1328" height="965" extended-state="0" />
<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="CVS" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="14" />
<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="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="7" />
- <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.30414388" order="0" />
- <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32718894" order="1" />
- <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.24706802" order="1" />
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.30414388" order="0" />
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32718894" order="1" />
+ <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.24706802" order="1" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="9" />
<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="Module Dependencies" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="6" />
@@ -1120,107 +1148,107 @@
<option name="myLastEditedConfigurable" />
</component>
<component name="editorHistoryManager">
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/StreamInput.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessorFactory.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="54" column="52" selection-start="1791" selection-end="1791" vertical-scroll-proportion="0.6650367">
+ <state line="41" column="49" selection-start="1482" selection-end="1482" vertical-scroll-proportion="0.63757116">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventMessage.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/DefaultActivityMonitorImpl.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="43" column="20" selection-start="1460" selection-end="1460" vertical-scroll-proportion="0.44987774">
+ <state line="41" column="66" selection-start="1632" selection-end="1632" vertical-scroll-proportion="0.35207823">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/StreamOutput.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/datasource/DataSourceFactory.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="47" column="60" selection-start="1590" selection-end="1590" vertical-scroll-proportion="0.52811736">
+ <state line="33" column="39" selection-start="1350" selection-end="1350" vertical-scroll-proportion="0.19559902">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/ActivityMonitorFactory.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/datasource/DataSourceManager.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="33" column="42" selection-start="1364" selection-end="1364" vertical-scroll-proportion="0.23471883">
+ <state line="30" column="13" selection-start="1234" selection-end="1234" vertical-scroll-proportion="0.15647922">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/SamTestSetup.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/datasource/internal/DBCPDataSourceFactory.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="65" column="60" selection-start="2529" selection-end="2529" vertical-scroll-proportion="0.41095892">
+ <state line="37" column="13" selection-start="1597" selection-end="1597" vertical-scroll-proportion="0.15940224">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/DefaultActivityMonitorFactory.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/ConfigFactory.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="35" column="20" selection-start="1505" selection-end="1505" vertical-scroll-proportion="0.3946869">
+ <state line="112" column="64" selection-start="3432" selection-end="3432" vertical-scroll-proportion="0.54171854">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/ActivityMonitor.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/config/ConfigParserTestCase.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="34" column="2" selection-start="1303" selection-end="1303" vertical-scroll-proportion="0.42504743">
+ <state line="91" column="21" selection-start="3466" selection-end="3466" vertical-scroll-proportion="0.44209215">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessorFactory.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/EPLValueAdapter.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="41" column="49" selection-start="1482" selection-end="1482" vertical-scroll-proportion="0.63757116">
+ <state line="28" column="13" selection-start="1195" selection-end="1195" vertical-scroll-proportion="0.15647922">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/ProcessingStatement.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/StatementDef.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="56" column="71" selection-start="1845" selection-end="1845" vertical-scroll-proportion="1.0929791">
+ <state line="74" column="16" selection-start="1848" selection-end="1848" vertical-scroll-proportion="0.6601467">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessor.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/Configuration.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="106" column="2" selection-start="2693" selection-end="2693" vertical-scroll-proportion="1.2246094">
+ <state line="86" column="18" selection-start="2917" selection-end="2917" vertical-scroll-proportion="0.21393643">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/EPLValueAdapter.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/drools/ApiTestCase.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="28" column="13" selection-start="1195" selection-end="1195" vertical-scroll-proportion="0.24288425">
+ <state line="55" column="19" selection-start="1920" selection-end="1920" vertical-scroll-proportion="0.52179325">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/DefaultActivityMonitorImpl.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/ProcessingStatement.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="41" column="66" selection-start="1632" selection-end="1632" vertical-scroll-proportion="0.54648954">
+ <state line="31" column="17" selection-start="1431" selection-end="1431" vertical-scroll-proportion="0.21515892">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/config/ConfigParserTestCase.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessor.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="91" column="21" selection-start="3466" selection-end="3466" vertical-scroll-proportion="0.58203125">
+ <state line="84" column="51" selection-start="2330" selection-end="2330" vertical-scroll-proportion="0.54171854">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/Configuration.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="53" column="22" selection-start="2050" selection-end="2050" vertical-scroll-proportion="0.71875">
+ <state line="233" column="0" selection-start="7188" selection-end="7188" vertical-scroll-proportion="0.31257784">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/ConfigFactory.java">
+ <entry file="file://$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="108" column="43" selection-start="3303" selection-end="3303" vertical-scroll-proportion="0.63567364">
+ <state line="71" column="15" selection-start="3119" selection-end="3119" vertical-scroll-proportion="0.61145705">
<folding />
</state>
</provider>
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/EventProcessor.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/EventProcessor.java 2009-07-15 09:22:37 UTC (rev 662)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/EventProcessor.java 2009-07-15 09:36:07 UTC (rev 663)
@@ -72,23 +72,13 @@
Iterator<String> getStreamOutputNames();
/**
- * Creates a statement
- *
- * @param statementName
- * @param epl
- * @return
- */
- ProcessingStatement registerStatement(String statementName, String epl);
-
- /**
* Creates a statement and binds it to an inout or output adapter.
*
- * @param streamName
* @param statementName
- * @param epl
+ * @param in
* @return
*/
- ProcessingStatement registerBoundStatement(String streamName, String statementName, InputStream epl);
+ ProcessingStatement registerStatement(String statementName, InputStream in);
/**
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/Configuration.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/Configuration.java 2009-07-15 09:22:37 UTC (rev 662)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/Configuration.java 2009-07-15 09:36:07 UTC (rev 663)
@@ -57,8 +57,7 @@
this.configurationDef = configTree;
}
-
- ConfigurationDef getConfigurationDef()
+ public ConfigurationDef getConfigurationDef()
{
return configurationDef;
}
@@ -85,14 +84,8 @@
{
if (def.getBoundTo() != null)
{
- processor.registerBoundStatement(
- def.getBoundTo(), def.getName(), new ByteArrayInputStream(def.getEpl().getExpression().getBytes())
- );
- }
- else
- {
processor.registerStatement(
- def.getName(), def.getEpl().getExpression()
+ def.getName(), new ByteArrayInputStream(def.getEpl().getExpression().getBytes())
);
}
}
@@ -135,7 +128,10 @@
public void applyTo(ActivityMonitor monitor)
{
+ if(null==configurationDef)
+ throw new IllegalArgumentException("configurationDef cannot be null");
+
configure(monitor.getEventProcessor());
configure(monitor.getDataSourceManager());
- }
+ }
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/StatementDef.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/StatementDef.java 2009-07-15 09:22:37 UTC (rev 662)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/StatementDef.java 2009-07-15 09:36:07 UTC (rev 663)
@@ -71,6 +71,9 @@
this.epl = epl;
}
+ /**
+ * @deprecated
+ */
@XmlAttribute(required = false)
public String getBoundTo()
{
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java 2009-07-15 09:22:37 UTC (rev 662)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java 2009-07-15 09:36:07 UTC (rev 663)
@@ -24,10 +24,10 @@
import org.drools.KnowledgeBase;
import org.drools.KnowledgeBaseConfiguration;
import org.drools.KnowledgeBaseFactory;
-import org.drools.common.NamedEntryPoint;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderFactory;
import org.drools.builder.ResourceType;
+import org.drools.common.NamedEntryPoint;
import org.drools.conf.EventProcessingOption;
import org.drools.io.ResourceFactory;
import org.drools.runtime.Globals;
@@ -227,17 +227,11 @@
* Create a drools package, register it with the rulebase and make
* sure that the adapter output adapter is available as a drools global variable
*/
- public ProcessingStatement registerBoundStatement(String streamName, String statementName, InputStream epl)
+ public ProcessingStatement registerStatement(String statementName, InputStream epl)
{
if(isStarted())
throw new IllegalStateException("EventProcessor already started");
-
- final StreamOutput out = this.streamOutputs.get(streamName);
- final StreamInput in = this.streamInputs.get(streamName);
-
- if(out == null && in== null)
- throw new IllegalArgumentException("No such stream: " + streamName);
-
+
// -----------------------
// Create a drools package
Modified: sam/trunk/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java
===================================================================
--- sam/trunk/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java 2009-07-15 09:22:37 UTC (rev 662)
+++ sam/trunk/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java 2009-07-15 09:36:07 UTC (rev 663)
@@ -25,8 +25,6 @@
import org.jboss.test.sam.InMemoryDatabase;
import org.jboss.test.sam.SamTestSetup;
-import java.io.ByteArrayInputStream;
-
/**
* Test database integration patterns
*
@@ -80,8 +78,7 @@
public void testSQLQuery() throws Exception
{
// setup
- eventProcessor.registerBoundStatement(
- "in-channel",
+ eventProcessor.registerStatement(
"TriggerSQL",
loadDRL("database/triggerPull.drl")
);
@@ -108,8 +105,8 @@
public void testSQLJoin() throws Exception
{
// setup
- eventProcessor.registerBoundStatement(
- "in-channel","" +
+ eventProcessor.registerStatement(
+ "" +
"SQLJoin",
loadDRL("database/sampleJoin.drl")
);
Modified: sam/trunk/modules/core/src/test/java/org/jboss/test/sam/drools/ApiTestCase.java
===================================================================
--- sam/trunk/modules/core/src/test/java/org/jboss/test/sam/drools/ApiTestCase.java 2009-07-15 09:22:37 UTC (rev 662)
+++ sam/trunk/modules/core/src/test/java/org/jboss/test/sam/drools/ApiTestCase.java 2009-07-15 09:36:07 UTC (rev 663)
@@ -38,8 +38,7 @@
public void testStreamInput()
{
- eventProcessor.registerBoundStatement(
- "in-channel",
+ eventProcessor.registerStatement(
"stream-input.drl",
loadDRL("drools/stream-input.drl")
);
@@ -54,8 +53,7 @@
public void testAggregationAndForwarding()
{
- eventProcessor.registerBoundStatement(
- "in-channel",
+ eventProcessor.registerStatement(
"forward.drl",
loadDRL("drools/stream-forward.drl")
);
Modified: sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java
===================================================================
--- sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java 2009-07-15 09:22:37 UTC (rev 662)
+++ sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java 2009-07-15 09:36:07 UTC (rev 663)
@@ -55,7 +55,7 @@
* <b>Event sinks</b><br>
* {@link org.jboss.sam.simulation.EventSinkEntity}'s processes event messages that have been forwarded
* from an event processor. They need to be added ({@link #addSink(EventSinkEntity)}) to a simualtion
- * and bound to a processing statement ({@link #bindStatement(String,EventSinkEntity)})
+ * and bound to a processing statement ({@link #bindStatement(java.io.InputStream, EventSinkEntity)}
* <p/>
* <p/>
* <b>Shared context</b><br>
@@ -128,13 +128,13 @@
/**
* Create a aggregation/filtering statement
*
+ * @deprecated
+ *
* @param stmt
*/
public void createStatement(String stmt)
{
- this.eventProcessor.registerStatement(
- UUID.randomUUID().toString(), stmt
- );
+ throw new RuntimeException("Obsolete method");
}
/**
@@ -142,8 +142,8 @@
*/
public void bindStatement(InputStream in, EventSinkEntity sink)
{
- this.eventProcessor.registerBoundStatement(
- sink.getStreamName(), UUID.randomUUID().toString(), in
+ this.eventProcessor.registerStatement(
+ UUID.randomUUID().toString(), in
);
}
17 years
Overlord SVN: r662 - in sam/trunk: modules/core/src/main/java/org/jboss/sam and 10 other directories.
by overlord-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-07-15 05:22:37 -0400 (Wed, 15 Jul 2009)
New Revision: 662
Added:
sam/trunk/modules/core/src/main/java/org/jboss/sam/ActivityMonitor.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/ActivityMonitorFactory.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/Configuration.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/ConfigurationDef.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/DataSourceDef.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/DatabaseRefDef.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/EPLDef.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/PropertyDef.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/StatementDef.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/StreamInputDef.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/StreamOutputDef.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/DefaultActivityMonitorFactory.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/DefaultActivityMonitorImpl.java
Removed:
sam/trunk/modules/core/src/main/java/org/jboss/sam/SAMRuntime.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/SAMRuntimeAware.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/SAMRuntimeFactory.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/ConfigurationDef.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/Configurator.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/DataSourceDef.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/DatabaseRefDef.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/EPLDef.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/PropertyDef.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/StatementDef.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/StreamInputDef.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/StreamOutputDef.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/DefaultRuntimeFactory.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/DefaultRuntimeImpl.java
Modified:
sam/trunk/SAMM.iws
sam/trunk/modules/core/src/main/java/org/jboss/sam/EventMessage.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/EventProcessor.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/EventProcessorFactory.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/ProcessingStatement.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/StreamInput.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/ConfigFactory.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/datasource/DataSourceFactory.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/datasource/internal/DBCPDataSourceFactory.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java
sam/trunk/modules/core/src/test/java/org/jboss/test/sam/SamTestSetup.java
sam/trunk/modules/core/src/test/java/org/jboss/test/sam/config/ConfigParserTestCase.java
sam/trunk/modules/sim/sim.iml
sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java
Log:
Cleanup API
Modified: sam/trunk/SAMM.iws
===================================================================
--- sam/trunk/SAMM.iws 2009-07-15 08:39:59 UTC (rev 661)
+++ sam/trunk/SAMM.iws 2009-07-15 09:22:37 UTC (rev 662)
@@ -17,33 +17,47 @@
</component>
<component name="ChangeListManager">
<list default="true" name="Default" comment="">
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventMessageFactory.java" afterPath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventMessageFactory.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/aggregation/AggregationTestCase.java" afterPath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/aggregation/AggregationTestCase.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/simulation/SensorMessageFactory.java" afterPath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/simulation/SensorMessageFactory.java" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/adapter/invm/Alert.java" afterPath="" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/simulation/SimulationTestCase.java" afterPath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/simulation/SimulationTestCase.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/SimulationContext.java" afterPath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/SimulationContext.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/ProcessingStatement.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/ProcessingStatement.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/DataSourceDef.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/StreamOutputDef.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/sim.iml" afterPath="$PROJECT_DIR$/modules/sim/sim.iml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/filtering/OrderEventMessage.java" afterPath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/filtering/OrderEventMessage.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/resources/simulation/sam-cfg.xml" afterPath="$PROJECT_DIR$/modules/sim/src/test/resources/simulation/sam-cfg.xml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java" afterPath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/falloff/ProductionEventMessage.java" afterPath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/falloff/ProductionEventMessage.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/pom.xml" afterPath="$PROJECT_DIR$/modules/sim/pom.xml" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/falloff/FalloffTestCase.java" afterPath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/falloff/FalloffTestCase.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSinkHandler.java" afterPath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSinkHandler.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/EPLDef.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/StreamInput.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/StreamInput.java" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/EPLDef.java" afterPath="" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/DatabaseRefDef.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/Configuration.java" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/StreamOutputDef.java" afterPath="" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/SAMRuntimeFactory.java" afterPath="" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/StatementDef.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/ConfigFactory.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/ConfigFactory.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/config/ConfigParserTestCase.java" afterPath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/config/ConfigParserTestCase.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/ActivityMonitorFactory.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/datasource/DataSourceFactory.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/datasource/DataSourceFactory.java" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/Configurator.java" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/SAMM.iws" afterPath="$PROJECT_DIR$/SAMM.iws" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSinkEntity.java" afterPath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSinkEntity.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/aggregation/SalesEventMessage.java" afterPath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/aggregation/SalesEventMessage.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/Measurement.java" afterPath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/Measurement.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/pattern/LightSwitchEventMessage.java" afterPath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/pattern/LightSwitchEventMessage.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/ContextAwareEntity.java" afterPath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/ContextAwareEntity.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/filtering/FilteringTestCase.java" afterPath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/filtering/FilteringTestCase.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java" afterPath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/adapter/invm/InVMAdapterTestCase.java" afterPath="" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/datasource/internal/DBCPDataSourceFactory.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/datasource/internal/DBCPDataSourceFactory.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/DefaultActivityMonitorImpl.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/PropertyDef.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/DefaultActivityMonitorFactory.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/SamTestSetup.java" afterPath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/SamTestSetup.java" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/SAMRuntimeAware.java" afterPath="" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/DefaultRuntimeImpl.java" afterPath="" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/StreamInputDef.java" afterPath="" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/DataSourceDef.java" afterPath="" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/DefaultRuntimeFactory.java" afterPath="" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/StatementDef.java" afterPath="" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessor.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessor.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/StreamInputDef.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessorFactory.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessorFactory.java" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/DatabaseRefDef.java" afterPath="" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventMessage.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventMessage.java" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/PropertyDef.java" afterPath="" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/ActivityMonitor.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/ConfigurationDef.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java" afterPath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/simulation/SensorEventMessage.java" afterPath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/simulation/SensorEventMessage.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/BufferedStreamOutput.java" afterPath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/BufferedStreamOutput.java" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/ConfigurationDef.java" afterPath="" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/SAMRuntime.java" afterPath="" />
</list>
</component>
<component name="ChangeListSynchronizer" />
@@ -141,7 +155,7 @@
<option name="CONDITION" value="" />
<option name="LOG_MESSAGE" value="" />
</breakpoint>
- <breakpoint url="file://$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java" line="153" class="org.jboss.sam.simulation.EventSimulation" package="org.jboss.sam.simulation">
+ <breakpoint url="file://$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java" line="155" 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" />
@@ -238,7 +252,98 @@
</subPane>
</component>
<component name="FileEditorManager">
- <leaf />
+ <leaf>
+ <file leaf-file-name="DefaultActivityMonitorFactory.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/DefaultActivityMonitorFactory.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="35" column="20" selection-start="1505" selection-end="1505" vertical-scroll-proportion="0.3946869">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="DefaultActivityMonitorImpl.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/DefaultActivityMonitorImpl.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="41" column="66" selection-start="1632" selection-end="1632" vertical-scroll-proportion="0.54648954">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="Configuration.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/Configuration.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="53" column="22" selection-start="2050" selection-end="2050" vertical-scroll-proportion="0.71875">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="ConfigFactory.java" pinned="false" current="true" current-in-tab="true">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/ConfigFactory.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="108" column="43" selection-start="3303" selection-end="3303" vertical-scroll-proportion="0.63567364">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="ConfigParserTestCase.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/config/ConfigParserTestCase.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="91" column="21" selection-start="3466" selection-end="3466" vertical-scroll-proportion="0.58203125">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="EPLValueAdapter.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/EPLValueAdapter.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="28" column="13" selection-start="1195" selection-end="1195" vertical-scroll-proportion="0.24288425">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="EventProcessor.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessor.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="106" column="2" selection-start="2693" selection-end="2693" vertical-scroll-proportion="1.2246094">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="ProcessingStatement.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/ProcessingStatement.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="56" column="71" selection-start="1845" selection-end="1845" vertical-scroll-proportion="1.0929791">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="EventProcessorFactory.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessorFactory.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="41" column="49" selection-start="1482" selection-end="1482" vertical-scroll-proportion="0.63757116">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="ActivityMonitor.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/ActivityMonitor.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="34" column="2" selection-start="1303" selection-end="1303" vertical-scroll-proportion="0.42504743">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ </leaf>
</component>
<component name="FindManager">
<FindUsagesManager>
@@ -717,94 +822,6 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- </PATH>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="SAMM.ipr" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="core" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/main" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/src/main/java/org/jboss/sam/internal" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- </PATH>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="SAMM.ipr" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="core" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/main" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/src/main/java/org/jboss/sam/config" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
</PATH_ELEMENT>
@@ -841,7 +858,11 @@
<component name="ReadonlyStatusHandler">
<option name="SHOW_DIALOG" value="true" />
</component>
- <component name="RecentsManager" />
+ <component name="RecentsManager">
+ <key name="MoveClassesOrPackagesDialog.RECENTS_KEY">
+ <recent name="org.jboss.sam.config.internal" />
+ </key>
+ </component>
<component name="RestoreUpdateTree" />
<component name="RunManager" selected="Remote.client">
<configuration default="true" type="Applet" factoryName="Applet">
@@ -989,15 +1010,15 @@
</component>
<component name="ToolWindowManager">
<frame x="346" y="40" width="1328" height="965" extended-state="0" />
- <editor active="false" />
+ <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="CVS" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="14" />
<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="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="7" />
- <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.30414388" order="0" />
- <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32718894" order="1" />
- <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.24706802" order="1" />
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.30414388" order="0" />
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32718894" order="1" />
+ <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.24706802" order="1" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="9" />
<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="Module Dependencies" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="6" />
@@ -1099,111 +1120,107 @@
<option name="myLastEditedConfigurable" />
</component>
<component name="editorHistoryManager">
- <entry file="file://$PROJECT_DIR$/modules/sim/pom.xml">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/StreamInput.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="12" column="54" selection-start="479" selection-end="479" vertical-scroll-proportion="0.24211854">
+ <state line="54" column="52" selection-start="1791" selection-end="1791" vertical-scroll-proportion="0.6650367">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMStreamRegistry.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventMessage.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="59" column="26" selection-start="2010" selection-end="2010" vertical-scroll-proportion="0.6860025">
+ <state line="43" column="20" selection-start="1460" selection-end="1460" vertical-scroll-proportion="0.44987774">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSinkEntity.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/StreamOutput.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="24" column="0" selection-start="1102" selection-end="1136" vertical-scroll-proportion="-1.103912">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="47" column="60" selection-start="1590" selection-end="1590" vertical-scroll-proportion="0.52811736">
+ <folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMStreamInput.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/ActivityMonitorFactory.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="42" column="9" selection-start="1461" selection-end="1461" vertical-scroll-proportion="0.33251834">
+ <state line="33" column="42" selection-start="1364" selection-end="1364" vertical-scroll-proportion="0.23471883">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessor.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/SamTestSetup.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="49" column="7" selection-start="1726" selection-end="1726" vertical-scroll-proportion="0.2117061">
+ <state line="65" column="60" selection-start="2529" selection-end="2529" vertical-scroll-proportion="0.41095892">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMDispatcher.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/DefaultActivityMonitorFactory.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="30" column="65" selection-start="1253" selection-end="1265" vertical-scroll-proportion="0.1992528">
+ <state line="35" column="20" selection-start="1505" selection-end="1505" vertical-scroll-proportion="0.3946869">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/ActivityMonitor.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="144" column="33" selection-start="4161" selection-end="4161" vertical-scroll-proportion="0.56723714">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="34" column="2" selection-start="1303" selection-end="1303" vertical-scroll-proportion="0.42504743">
+ <folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/sim/src/test/resources/simulation/test.drl">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessorFactory.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="17" column="0" selection-start="381" selection-end="381" vertical-scroll-proportion="0.33251834">
+ <state line="41" column="49" selection-start="1482" selection-end="1482" vertical-scroll-proportion="0.63757116">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/ProcessingStatement.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="125" column="60" selection-start="4292" selection-end="4292" vertical-scroll-proportion="0.44582814">
+ <state line="56" column="71" selection-start="1845" selection-end="1845" vertical-scroll-proportion="1.0929791">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/simulation/SimulationTestCase.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessor.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="79" column="19" selection-start="2728" selection-end="2728" vertical-scroll-proportion="0.64792174">
+ <state line="106" column="2" selection-start="2693" selection-end="2693" vertical-scroll-proportion="1.2246094">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/internal/EPLValueAdapter.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="173" column="23" selection-start="5886" selection-end="5886" vertical-scroll-proportion="0.7895392">
+ <state line="28" column="13" selection-start="1195" selection-end="1195" vertical-scroll-proportion="0.24288425">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/falloff/FalloffTestCase.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/DefaultActivityMonitorImpl.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="128" column="29" selection-start="4103" selection-end="4143" vertical-scroll-proportion="0.6014944">
+ <state line="41" column="66" selection-start="1632" selection-end="1632" vertical-scroll-proportion="0.54648954">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/config/ConfigParserTestCase.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="180" column="55" selection-start="5566" selection-end="5566" vertical-scroll-proportion="0.7210461">
+ <state line="91" column="21" selection-start="3466" selection-end="3466" vertical-scroll-proportion="0.58203125">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/filtering/FilteringTestCase.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/Configuration.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="149" column="52" selection-start="4682" selection-end="4682" vertical-scroll-proportion="0.66748166">
+ <state line="53" column="22" selection-start="2050" selection-end="2050" vertical-scroll-proportion="0.71875">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/aggregation/AggregationTestCase.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/ConfigFactory.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="173" column="58" selection-start="5252" selection-end="5252" vertical-scroll-proportion="0.8630807">
+ <state line="108" column="43" selection-start="3303" selection-end="3303" vertical-scroll-proportion="0.63567364">
<folding />
</state>
</provider>
Copied: sam/trunk/modules/core/src/main/java/org/jboss/sam/ActivityMonitor.java (from rev 658, sam/trunk/modules/core/src/main/java/org/jboss/sam/SAMRuntime.java)
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/ActivityMonitor.java (rev 0)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/ActivityMonitor.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.sam;
+
+import org.jboss.sam.datasource.DataSourceManager;
+
+
+/**
+ * Main component that manages the {@link org.jboss.sam.EventProcessor}
+ * and auxiliary services.
+ *
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public interface ActivityMonitor
+{
+ DataSourceManager getDataSourceManager();
+
+ EventProcessor getEventProcessor();
+
+}
Property changes on: sam/trunk/modules/core/src/main/java/org/jboss/sam/ActivityMonitor.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: sam/trunk/modules/core/src/main/java/org/jboss/sam/ActivityMonitorFactory.java (from rev 658, sam/trunk/modules/core/src/main/java/org/jboss/sam/SAMRuntimeFactory.java)
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/ActivityMonitorFactory.java (rev 0)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/ActivityMonitorFactory.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -0,0 +1,40 @@
+/*
+ * 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.sam;
+
+import org.jboss.sam.config.Configuration;
+import org.jboss.sam.internal.DefaultActivityMonitorFactory;
+
+/**
+ * Constructs {@link org.jboss.sam.ActivityMonitor}'s.
+ *
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public abstract class ActivityMonitorFactory
+{
+ public abstract ActivityMonitor createMonitor(Configuration configuration);
+
+ public static ActivityMonitorFactory newInstance()
+ {
+ return new DefaultActivityMonitorFactory();
+ }
+}
Property changes on: sam/trunk/modules/core/src/main/java/org/jboss/sam/ActivityMonitorFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/EventMessage.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/EventMessage.java 2009-07-15 08:39:59 UTC (rev 661)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/EventMessage.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -24,9 +24,8 @@
import java.util.Iterator;
/**
- * An event message will be send when an Event occurs.<br>
- * It consist of a timestamp and associated event properties.
- * EventMessage's are written to {@link org.jboss.sam.StreamOutput}'s.
+ * Event messages are written to {@link org.jboss.sam.StreamOutput}'s.<br>
+ * An event message consist of a timestamp and associated event properties.
* <p/>
*
* @author Heiko.Braun <heiko.braun(a)jboss.com>
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/EventProcessor.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/EventProcessor.java 2009-07-15 08:39:59 UTC (rev 661)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/EventProcessor.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -26,9 +26,9 @@
import java.io.InputStream;
/**
- * An event processor glues together {@link org.jboss.sam.StreamInput} and {@link org.jboss.sam.StreamOutput}
- * and provides a way to register {@link org.jboss.sam.ProcessingStatement}'s,
- * both bound (event forwarding) and unbound (event aggregation and filtering).
+ * An event processor manages {@link org.jboss.sam.StreamInput}'s
+ * and {@link org.jboss.sam.StreamOutput}'s. It provides a way to register {@link org.jboss.sam.ProcessingStatement}'s,
+ * which then correlate events across streams.
* <p/>
* Instances are created through {@link org.jboss.sam.EventProcessorFactory}
*
@@ -104,7 +104,8 @@
T getUnderlying();
- void setRuntime(SAMRuntime runtime);
+
+ void setRuntime(ActivityMonitor runtime);
void setProperties(Properties properties);
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/EventProcessorFactory.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/EventProcessorFactory.java 2009-07-15 08:39:59 UTC (rev 661)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/EventProcessorFactory.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -24,6 +24,8 @@
import org.jboss.sam.internal.drools.DroolsEventProcessorImpl;
/**
+ * Condstructs {@link org.jboss.sam.EventProcessor}'s.
+ *
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public abstract class EventProcessorFactory
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/ProcessingStatement.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/ProcessingStatement.java 2009-07-15 08:39:59 UTC (rev 661)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/ProcessingStatement.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -22,10 +22,10 @@
package org.jboss.sam;
/**
- * Represents an EPL (event processing languge) statement.
+ * Represents an EPL (event processing languge) statement.<br/>
* Statements are associated with a {@link org.jboss.sam.EventProcessor}
* and can be bound to a {@link org.jboss.sam.StreamOutput} to forward events,
- * or used unbound to aggregate and filter events.
+ * or used with {@link org.jboss.sam.StreamInput}'s to aggregate and filter events.
*
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
Deleted: sam/trunk/modules/core/src/main/java/org/jboss/sam/SAMRuntime.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/SAMRuntime.java 2009-07-15 08:39:59 UTC (rev 661)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/SAMRuntime.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -1,43 +0,0 @@
-/*
- * 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.sam;
-
-import org.jboss.sam.config.Configurator;
-import org.jboss.sam.datasource.DataSourceManager;
-
-import java.util.Properties;
-
-
-/**
- * Glues together SAM building blocks.
- *
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public interface SAMRuntime
-{
- void applyConfiguration(Configurator cfg);
-
- DataSourceManager getDataSourceManager();
-
- EventProcessor getEventProcessor();
-
-}
Deleted: sam/trunk/modules/core/src/main/java/org/jboss/sam/SAMRuntimeAware.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/SAMRuntimeAware.java 2009-07-15 08:39:59 UTC (rev 661)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/SAMRuntimeAware.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -1,33 +0,0 @@
-/*
- * 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.sam;
-
-/**
- * Marks SAM components that need to interact with the runtime itself.
- *
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public interface SAMRuntimeAware
-{
- void setRuntime(SAMRuntime runtime);
-}
-
Deleted: sam/trunk/modules/core/src/main/java/org/jboss/sam/SAMRuntimeFactory.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/SAMRuntimeFactory.java 2009-07-15 08:39:59 UTC (rev 661)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/SAMRuntimeFactory.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -1,38 +0,0 @@
-/*
- * 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.sam;
-
-import org.jboss.sam.config.Configurator;
-import org.jboss.sam.internal.DefaultRuntimeFactory;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public abstract class SAMRuntimeFactory
-{
- public abstract SAMRuntime createRuntime(Configurator configurator);
-
- public static SAMRuntimeFactory newInstance()
- {
- return new DefaultRuntimeFactory();
- }
-}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/StreamInput.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/StreamInput.java 2009-07-15 08:39:59 UTC (rev 661)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/StreamInput.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -23,7 +23,7 @@
/**
* Stream inputs are registered with {@link org.jboss.sam.EventProcessor}'s
- * and notify registered {@link org.jboss.sam.StreamInputCallback}'s when new events arrive.
+ * and invoke {@link org.jboss.sam.StreamInputCallback}'s when new events arrive.
* Typically the CEP runtime itself act's as such a listener in order to process events.
*
* @author Heiko.Braun <heiko.braun(a)jboss.com>
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/ConfigFactory.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/ConfigFactory.java 2009-07-15 08:39:59 UTC (rev 661)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/ConfigFactory.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -23,6 +23,7 @@
import com.sun.xml.bind.marshaller.CharacterEscapeHandler;
import org.jboss.sam.config.internal.NoCharacterEscapeHandler;
+import org.jboss.sam.config.internal.ConfigurationDef;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
@@ -34,7 +35,7 @@
import java.net.URL;
/**
- * Marshall/Unmarshall processing node definitions.
+ * Marshall/Unmarshall {@link org.jboss.sam.ActivityMonitor} configuration.
*
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
@@ -65,13 +66,13 @@
public ConfigurationDef unmarshall(InputStream inputStream)
{
- ConfigurationDef pnd = null;
+ ConfigurationDef configurationDef = null;
try
{
JAXBContext jaxb = JAXBContext.newInstance(ConfigurationDef.class);
Unmarshaller unmarshaller = jaxb.createUnmarshaller();
- pnd = (ConfigurationDef) unmarshaller.unmarshal(inputStream);
+ configurationDef = (ConfigurationDef) unmarshaller.unmarshal(inputStream);
}
catch (Exception e)
@@ -91,11 +92,11 @@
}
}
- return pnd;
+ return configurationDef;
}
- public void marshall(ConfigurationDef pnd, OutputStream out)
+ public void marshall(Configuration configuration, OutputStream out)
{
try
{
@@ -105,11 +106,11 @@
// encoding needs to be different to UTF-8, otherwise the custom encode will not be used
marshaller.setProperty(Marshaller.JAXB_ENCODING, "ISO-8859-1");
marshaller.setProperty(CharacterEscapeHandler.class.getName(), new NoCharacterEscapeHandler());
- marshaller.marshal(pnd, out);
+ marshaller.marshal(configuration.getConfigurationDef(), out);
}
catch (JAXBException e)
{
- throw new RuntimeException("Failed to marshall " + pnd, e);
+ throw new RuntimeException("Failed to marshall " + configuration, e);
}
finally
{
Copied: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/Configuration.java (from rev 660, sam/trunk/modules/core/src/main/java/org/jboss/sam/config/Configurator.java)
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/Configuration.java (rev 0)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/Configuration.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -0,0 +1,141 @@
+/*
+ * 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.sam.config;
+
+import org.jboss.sam.EventProcessor;
+import org.jboss.sam.StreamInput;
+import org.jboss.sam.StreamOutput;
+import org.jboss.sam.ActivityMonitor;
+import org.jboss.sam.config.internal.*;
+import org.jboss.sam.datasource.DataSourceFactory;
+import org.jboss.sam.datasource.DataSourceManager;
+
+import javax.sql.DataSource;
+import java.util.Properties;
+import java.io.ByteArrayInputStream;
+
+/**
+ * An intermediary to configure {@link org.jboss.sam.ActivityMonitor}'s
+ * from configuration descriptors. <br>
+ * Allows for interception/modification of configuration values before the
+ * actuall configuration is applied to runtime components.
+ *
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class Configuration
+{
+ private ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ private ConfigurationDef configurationDef;
+
+ public Configuration(ConfigurationDef configTree, ClassLoader loader)
+ {
+ this.configurationDef = configTree;
+ this.loader = loader;
+ }
+
+ public Configuration(ConfigurationDef configTree)
+ {
+ this.configurationDef = configTree;
+ }
+
+
+ ConfigurationDef getConfigurationDef()
+ {
+ return configurationDef;
+ }
+
+ private void configure(EventProcessor processor)
+ {
+ processor.setName(configurationDef.getName());
+
+ for (StreamInputDef def : configurationDef.getInputs())
+ {
+ StreamInput input = (StreamInput) newInstance(def.getClazz());
+ input.setStreamName(def.getName());
+ processor.addInput(input);
+ }
+
+ for (StreamOutputDef def : configurationDef.getOutputs())
+ {
+ StreamOutput output = (StreamOutput) newInstance(def.getClazz());
+ output.setStreamName(def.getName());
+ processor.addOutput(output);
+ }
+
+ for (StatementDef def : configurationDef.getStatements())
+ {
+ if (def.getBoundTo() != null)
+ {
+ processor.registerBoundStatement(
+ def.getBoundTo(), def.getName(), new ByteArrayInputStream(def.getEpl().getExpression().getBytes())
+ );
+ }
+ else
+ {
+ processor.registerStatement(
+ def.getName(), def.getEpl().getExpression()
+ );
+ }
+ }
+
+ Properties properties = new Properties();
+ for(PropertyDef prop : configurationDef.getProps())
+ {
+ properties.put(prop.getName(), prop.getValue());
+ }
+
+ processor.setProperties(properties);
+
+ }
+
+ private void configure(DataSourceManager manager)
+ {
+ DataSourceFactory dsFactory = DataSourceFactory.newInstance();
+
+ for (DatabaseRefDef def : this.configurationDef.getDatabases())
+ {
+ DataSource ds = dsFactory.createDataSource(def.getDatasource());
+ manager.addDataSource(def.getName(), ds);
+ }
+ }
+
+ private Object newInstance(String clazz)
+ {
+ Object obj = null;
+ try
+ {
+ obj = loader.loadClass(clazz).newInstance();
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Failed to load class: " + clazz, e);
+ }
+
+ return obj;
+ }
+
+ public void applyTo(ActivityMonitor monitor)
+ {
+ configure(monitor.getEventProcessor());
+ configure(monitor.getDataSourceManager());
+ }
+}
Property changes on: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/Configuration.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/ConfigurationDef.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/ConfigurationDef.java 2009-07-15 08:39:59 UTC (rev 661)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/ConfigurationDef.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -1,147 +0,0 @@
-/*
- * 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.sam.config;
-
-import javax.xml.bind.annotation.*;
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-@XmlRootElement(name = "processingNode", namespace = "http://org.jboss.sam/08/2008/")
-@XmlType(
- name = "processingNodeType",
- namespace = "http://org.jboss.sam/08/2008/",
- propOrder = {
- "props", "databases", "inputs", "outputs", "statements"
- }
-)
-public class ConfigurationDef
-{
-
- private String name;
- private URI domain;
-
- private List<StatementDef> statements = new ArrayList<StatementDef>();
-
- private List<StreamInputDef> inputs = new ArrayList<StreamInputDef>();
-
- private List<StreamOutputDef> outputs = new ArrayList<StreamOutputDef>();
-
- private List<PropertyDef> props = new ArrayList<PropertyDef>();
-
- private List<DatabaseRefDef> databases = new ArrayList<DatabaseRefDef>();
-
- public ConfigurationDef()
- {
- }
-
- public ConfigurationDef(String name, URI domain)
- {
- this.name = name;
- this.domain = domain;
- }
-
- @XmlAttribute
- public String getName()
- {
- return name;
- }
-
- public void setName(String name)
- {
- this.name = name;
- }
-
- @XmlAttribute
- public URI getDomain()
- {
- return domain;
- }
-
- public void setDomain(URI domain)
- {
- this.domain = domain;
- }
-
- @XmlElementWrapper(name = "statements")
- @XmlElement(name = "statement")
- public List<StatementDef> getStatements()
- {
- return statements;
- }
-
- public void setStatements(List<StatementDef> statements)
- {
- this.statements = statements;
- }
-
- @XmlElementWrapper(name = "inputs")
- @XmlElement(name = "input")
- public List<StreamInputDef> getInputs()
- {
- return inputs;
- }
-
- public void setInputs(List<StreamInputDef> inputs)
- {
- this.inputs = inputs;
- }
-
- @XmlElementWrapper(name = "outputs")
- @XmlElement(name = "output")
- public List<StreamOutputDef> getOutputs()
- {
- return outputs;
- }
-
- public void setOutputs(List<StreamOutputDef> outputs)
- {
- this.outputs = outputs;
- }
-
- @XmlElementWrapper(name = "runtime-configuration")
- @XmlElement(name = "property")
- public List<PropertyDef> getProps()
- {
- return props;
- }
-
- public void setProps(List<PropertyDef> props)
- {
- this.props = props;
- }
-
- @XmlElementWrapper(name = "database-references")
- @XmlElement(name = "database-reference")
- public List<DatabaseRefDef> getDatabases()
- {
- return databases;
- }
-
- public void setDatabases(List<DatabaseRefDef> databases)
- {
- this.databases = databases;
- }
-}
Deleted: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/Configurator.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/Configurator.java 2009-07-15 08:39:59 UTC (rev 661)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/Configurator.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -1,127 +0,0 @@
-/*
- * 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.sam.config;
-
-import org.jboss.sam.EventProcessor;
-import org.jboss.sam.StreamInput;
-import org.jboss.sam.StreamOutput;
-import org.jboss.sam.datasource.DataSourceFactory;
-import org.jboss.sam.datasource.DataSourceManager;
-
-import javax.sql.DataSource;
-import java.util.Properties;
-import java.io.ByteArrayInputStream;
-
-/**
- * An intermediary to configure {@link org.jboss.sam.SAMRuntime}'s
- * from configuration descriptors. <br>
- * Allows for interception/modification of configuration values before the
- * actuall configuration is applied to runtime components.
- *
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class Configurator
-{
- private ClassLoader loader = Thread.currentThread().getContextClassLoader();
- private ConfigurationDef configTree;
-
- public Configurator(ConfigurationDef configTree, ClassLoader loader)
- {
- this.configTree = configTree;
- this.loader = loader;
- }
-
- public Configurator(ConfigurationDef configTree)
- {
- this.configTree = configTree;
- }
-
- public void configure(EventProcessor processor)
- {
- processor.setName(configTree.getName());
-
- for (StreamInputDef def : configTree.getInputs())
- {
- StreamInput input = (StreamInput) newInstance(def.getClazz());
- input.setStreamName(def.getName());
- processor.addInput(input);
- }
-
- for (StreamOutputDef def : configTree.getOutputs())
- {
- StreamOutput output = (StreamOutput) newInstance(def.getClazz());
- output.setStreamName(def.getName());
- processor.addOutput(output);
- }
-
- for (StatementDef def : configTree.getStatements())
- {
- if (def.getBoundTo() != null)
- {
- processor.registerBoundStatement(
- def.getBoundTo(), def.getName(), new ByteArrayInputStream(def.getEpl().getExpression().getBytes())
- );
- }
- else
- {
- processor.registerStatement(
- def.getName(), def.getEpl().getExpression()
- );
- }
- }
-
- Properties properties = new Properties();
- for(PropertyDef prop : configTree.getProps())
- {
- properties.put(prop.getName(), prop.getValue());
- }
-
- processor.setProperties(properties);
-
- }
-
- public void configure(DataSourceManager manager)
- {
- DataSourceFactory dsFactory = DataSourceFactory.newInstance();
-
- for (DatabaseRefDef def : this.configTree.getDatabases())
- {
- DataSource ds = dsFactory.createDataSource(def.getDatasource());
- manager.addDataSource(def.getName(), ds);
- }
- }
-
- private Object newInstance(String clazz)
- {
- Object obj = null;
- try
- {
- obj = loader.loadClass(clazz).newInstance();
- }
- catch (Exception e)
- {
- throw new RuntimeException("Failed to load class: " + clazz, e);
- }
-
- return obj;
- }
-}
Deleted: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/DataSourceDef.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/DataSourceDef.java 2009-07-15 08:39:59 UTC (rev 661)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/DataSourceDef.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -1,97 +0,0 @@
-/*
- * 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.sam.config;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlType;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-@XmlType(name = "dataSourceDefType")
-public class DataSourceDef
-{
- private String name;
- private String driver;
- private String url;
-
- private List<PropertyDef> connectionArgs = new ArrayList<PropertyDef>();
-
-
- public DataSourceDef()
- {
- }
-
- public DataSourceDef(String name, String driver, String url)
- {
- this.name = name;
- this.driver = driver;
- this.url = url;
- }
-
- @XmlAttribute
- public String getUrl()
- {
- return url;
- }
-
- public void setUrl(String url)
- {
- this.url = url;
- }
-
- @XmlAttribute
- public String getName()
- {
- return name;
- }
-
- public void setName(String name)
- {
- this.name = name;
- }
-
- @XmlAttribute
- public String getDriver()
- {
- return driver;
- }
-
- public void setDriver(String driver)
- {
- this.driver = driver;
- }
-
- @XmlElement(name = "connection-arg")
- public List<PropertyDef> getConnectionArgs()
- {
- return connectionArgs;
- }
-
- public void setConnectionArgs(List<PropertyDef> connectionArgs)
- {
- this.connectionArgs = connectionArgs;
- }
-}
Deleted: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/DatabaseRefDef.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/DatabaseRefDef.java 2009-07-15 08:39:59 UTC (rev 661)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/DatabaseRefDef.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -1,65 +0,0 @@
-/*
- * 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.sam.config;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlType;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-@XmlType(name = "databaseRefDefType")
-public class DatabaseRefDef
-{
- private String name;
- private DataSourceDef dataSource;
-
- public DatabaseRefDef()
- {
- }
-
- public DatabaseRefDef(String name)
- {
- this.name = name;
- }
-
- @XmlAttribute
- public String getName()
- {
- return name;
- }
-
- public void setName(String name)
- {
- this.name = name;
- }
-
- public DataSourceDef getDatasource()
- {
- return dataSource;
- }
-
- public void setDatasource(DataSourceDef dataSource)
- {
- this.dataSource = dataSource;
- }
-}
Deleted: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/EPLDef.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/EPLDef.java 2009-07-15 08:39:59 UTC (rev 661)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/EPLDef.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -1,71 +0,0 @@
-/*
- * 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.sam.config;
-
-import org.jboss.sam.config.internal.EPLValueAdapter;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlValue;
-import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-@XmlType(name = "eplType")
-public class EPLDef
-{
- private String lang;
- private String expression;
-
- public EPLDef()
- {
- }
-
- public EPLDef(String lang)
- {
- this.lang = lang;
- }
-
- @XmlAttribute(required = true)
- public String getLang()
- {
- return lang;
- }
-
- public void setLang(String lang)
- {
- this.lang = lang;
- }
-
- @XmlValue
- @XmlJavaTypeAdapter(EPLValueAdapter.class)
- public String getExpression()
- {
- return expression;
- }
-
- public void setExpression(String expression)
- {
- this.expression = expression;
- }
-}
Deleted: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/PropertyDef.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/PropertyDef.java 2009-07-15 08:39:59 UTC (rev 661)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/PropertyDef.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -1,72 +0,0 @@
-/*
- * 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.sam.config;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlType;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-@XmlType(
- name = "propertyDefType",
- propOrder = {"name", "value"}
-)
-public class PropertyDef
-{
- private String name;
- private String value;
-
-
- public PropertyDef()
- {
- }
-
- public PropertyDef(String name, String value)
- {
- this.name = name;
- this.value = value;
- }
-
- @XmlAttribute
- public String getName()
- {
- return name;
- }
-
- public void setName(String name)
- {
- this.name = name;
- }
-
- @XmlAttribute
- public String getValue()
- {
- return value;
- }
-
- public void setValue(String value)
- {
- this.value = value;
- }
-
-}
Deleted: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/StatementDef.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/StatementDef.java 2009-07-15 08:39:59 UTC (rev 661)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/StatementDef.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -1,84 +0,0 @@
-/*
- * 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.sam.config;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlType;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-@XmlType(name = "statementDefType")
-
-public class StatementDef
-{
- private String name;
- private EPLDef epl;
- private String boundTo;
-
- public StatementDef()
- {
- }
-
- public StatementDef(String name)
- {
- this.name = name;
- }
-
- public StatementDef(String name, String boundTo)
- {
- this.name = name;
- this.boundTo = boundTo;
- }
-
- @XmlAttribute(required = true)
- public String getName()
- {
- return name;
- }
-
- public void setName(String name)
- {
- this.name = name;
- }
-
- public EPLDef getEpl()
- {
- return epl;
- }
-
- public void setEpl(EPLDef epl)
- {
- this.epl = epl;
- }
-
- @XmlAttribute(required = false)
- public String getBoundTo()
- {
- return boundTo;
- }
-
- public void setBoundTo(String boundTo)
- {
- this.boundTo = boundTo;
- }
-}
Deleted: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/StreamInputDef.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/StreamInputDef.java 2009-07-15 08:39:59 UTC (rev 661)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/StreamInputDef.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -1,67 +0,0 @@
-/*
- * 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.sam.config;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlType;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-@XmlType(name = "inputDefType")
-public class StreamInputDef
-{
- private String name;
- private String clazz;
-
- public StreamInputDef()
- {
- }
-
- public StreamInputDef(String name, String clazz)
- {
- this.name = name;
- this.clazz = clazz;
- }
-
- @XmlAttribute(required = true)
- public String getName()
- {
- return name;
- }
-
- public void setName(String name)
- {
- this.name = name;
- }
-
- @XmlAttribute(required = true)
- public String getClazz()
- {
- return clazz;
- }
-
- public void setClazz(String clazz)
- {
- this.clazz = clazz;
- }
-}
Deleted: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/StreamOutputDef.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/StreamOutputDef.java 2009-07-15 08:39:59 UTC (rev 661)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/StreamOutputDef.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -1,67 +0,0 @@
-/*
- * 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.sam.config;
-
-import javax.xml.bind.annotation.XmlAttribute;
-import javax.xml.bind.annotation.XmlType;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-@XmlType(name = "outputDefType")
-public class StreamOutputDef
-{
- private String name;
- private String clazz;
-
- public StreamOutputDef()
- {
- }
-
- public StreamOutputDef(String name, String clazz)
- {
- this.name = name;
- this.clazz = clazz;
- }
-
- @XmlAttribute(required = true)
- public String getName()
- {
- return name;
- }
-
- public void setName(String name)
- {
- this.name = name;
- }
-
- @XmlAttribute(required = true)
- public String getClazz()
- {
- return clazz;
- }
-
- public void setClazz(String clazz)
- {
- this.clazz = clazz;
- }
-}
Copied: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/ConfigurationDef.java (from rev 658, sam/trunk/modules/core/src/main/java/org/jboss/sam/config/ConfigurationDef.java)
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/ConfigurationDef.java (rev 0)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/ConfigurationDef.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -0,0 +1,147 @@
+/*
+ * 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.sam.config.internal;
+
+import javax.xml.bind.annotation.*;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+@XmlRootElement(name = "processingNode", namespace = "http://org.jboss.sam/08/2008/")
+@XmlType(
+ name = "processingNodeType",
+ namespace = "http://org.jboss.sam/08/2008/",
+ propOrder = {
+ "props", "databases", "inputs", "outputs", "statements"
+ }
+)
+public class ConfigurationDef
+{
+
+ private String name;
+ private URI domain;
+
+ private List<StatementDef> statements = new ArrayList<StatementDef>();
+
+ private List<StreamInputDef> inputs = new ArrayList<StreamInputDef>();
+
+ private List<StreamOutputDef> outputs = new ArrayList<StreamOutputDef>();
+
+ private List<PropertyDef> props = new ArrayList<PropertyDef>();
+
+ private List<DatabaseRefDef> databases = new ArrayList<DatabaseRefDef>();
+
+ public ConfigurationDef()
+ {
+ }
+
+ public ConfigurationDef(String name, URI domain)
+ {
+ this.name = name;
+ this.domain = domain;
+ }
+
+ @XmlAttribute
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ @XmlAttribute
+ public URI getDomain()
+ {
+ return domain;
+ }
+
+ public void setDomain(URI domain)
+ {
+ this.domain = domain;
+ }
+
+ @XmlElementWrapper(name = "statements")
+ @XmlElement(name = "statement")
+ public List<StatementDef> getStatements()
+ {
+ return statements;
+ }
+
+ public void setStatements(List<StatementDef> statements)
+ {
+ this.statements = statements;
+ }
+
+ @XmlElementWrapper(name = "inputs")
+ @XmlElement(name = "input")
+ public List<StreamInputDef> getInputs()
+ {
+ return inputs;
+ }
+
+ public void setInputs(List<StreamInputDef> inputs)
+ {
+ this.inputs = inputs;
+ }
+
+ @XmlElementWrapper(name = "outputs")
+ @XmlElement(name = "output")
+ public List<StreamOutputDef> getOutputs()
+ {
+ return outputs;
+ }
+
+ public void setOutputs(List<StreamOutputDef> outputs)
+ {
+ this.outputs = outputs;
+ }
+
+ @XmlElementWrapper(name = "runtime-configuration")
+ @XmlElement(name = "property")
+ public List<PropertyDef> getProps()
+ {
+ return props;
+ }
+
+ public void setProps(List<PropertyDef> props)
+ {
+ this.props = props;
+ }
+
+ @XmlElementWrapper(name = "database-references")
+ @XmlElement(name = "database-reference")
+ public List<DatabaseRefDef> getDatabases()
+ {
+ return databases;
+ }
+
+ public void setDatabases(List<DatabaseRefDef> databases)
+ {
+ this.databases = databases;
+ }
+}
Property changes on: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/ConfigurationDef.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/DataSourceDef.java (from rev 658, sam/trunk/modules/core/src/main/java/org/jboss/sam/config/DataSourceDef.java)
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/DataSourceDef.java (rev 0)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/DataSourceDef.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -0,0 +1,97 @@
+/*
+ * 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.sam.config.internal;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+@XmlType(name = "dataSourceDefType")
+public class DataSourceDef
+{
+ private String name;
+ private String driver;
+ private String url;
+
+ private List<PropertyDef> connectionArgs = new ArrayList<PropertyDef>();
+
+
+ public DataSourceDef()
+ {
+ }
+
+ public DataSourceDef(String name, String driver, String url)
+ {
+ this.name = name;
+ this.driver = driver;
+ this.url = url;
+ }
+
+ @XmlAttribute
+ public String getUrl()
+ {
+ return url;
+ }
+
+ public void setUrl(String url)
+ {
+ this.url = url;
+ }
+
+ @XmlAttribute
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ @XmlAttribute
+ public String getDriver()
+ {
+ return driver;
+ }
+
+ public void setDriver(String driver)
+ {
+ this.driver = driver;
+ }
+
+ @XmlElement(name = "connection-arg")
+ public List<PropertyDef> getConnectionArgs()
+ {
+ return connectionArgs;
+ }
+
+ public void setConnectionArgs(List<PropertyDef> connectionArgs)
+ {
+ this.connectionArgs = connectionArgs;
+ }
+}
Property changes on: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/DataSourceDef.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/DatabaseRefDef.java (from rev 658, sam/trunk/modules/core/src/main/java/org/jboss/sam/config/DatabaseRefDef.java)
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/DatabaseRefDef.java (rev 0)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/DatabaseRefDef.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -0,0 +1,65 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.sam.config.internal;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+@XmlType(name = "databaseRefDefType")
+public class DatabaseRefDef
+{
+ private String name;
+ private DataSourceDef dataSource;
+
+ public DatabaseRefDef()
+ {
+ }
+
+ public DatabaseRefDef(String name)
+ {
+ this.name = name;
+ }
+
+ @XmlAttribute
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public DataSourceDef getDatasource()
+ {
+ return dataSource;
+ }
+
+ public void setDatasource(DataSourceDef dataSource)
+ {
+ this.dataSource = dataSource;
+ }
+}
Property changes on: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/DatabaseRefDef.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/EPLDef.java (from rev 658, sam/trunk/modules/core/src/main/java/org/jboss/sam/config/EPLDef.java)
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/EPLDef.java (rev 0)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/EPLDef.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -0,0 +1,71 @@
+/*
+ * 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.sam.config.internal;
+
+import org.jboss.sam.config.internal.EPLValueAdapter;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+@XmlType(name = "eplType")
+public class EPLDef
+{
+ private String lang;
+ private String expression;
+
+ public EPLDef()
+ {
+ }
+
+ public EPLDef(String lang)
+ {
+ this.lang = lang;
+ }
+
+ @XmlAttribute(required = true)
+ public String getLang()
+ {
+ return lang;
+ }
+
+ public void setLang(String lang)
+ {
+ this.lang = lang;
+ }
+
+ @XmlValue
+ @XmlJavaTypeAdapter(EPLValueAdapter.class)
+ public String getExpression()
+ {
+ return expression;
+ }
+
+ public void setExpression(String expression)
+ {
+ this.expression = expression;
+ }
+}
Property changes on: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/EPLDef.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/PropertyDef.java (from rev 658, sam/trunk/modules/core/src/main/java/org/jboss/sam/config/PropertyDef.java)
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/PropertyDef.java (rev 0)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/PropertyDef.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -0,0 +1,72 @@
+/*
+ * 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.sam.config.internal;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+@XmlType(
+ name = "propertyDefType",
+ propOrder = {"name", "value"}
+)
+public class PropertyDef
+{
+ private String name;
+ private String value;
+
+
+ public PropertyDef()
+ {
+ }
+
+ public PropertyDef(String name, String value)
+ {
+ this.name = name;
+ this.value = value;
+ }
+
+ @XmlAttribute
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ @XmlAttribute
+ public String getValue()
+ {
+ return value;
+ }
+
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
+
+}
Property changes on: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/PropertyDef.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/StatementDef.java (from rev 658, sam/trunk/modules/core/src/main/java/org/jboss/sam/config/StatementDef.java)
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/StatementDef.java (rev 0)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/StatementDef.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -0,0 +1,84 @@
+/*
+ * 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.sam.config.internal;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+@XmlType(name = "statementDefType")
+
+public class StatementDef
+{
+ private String name;
+ private EPLDef epl;
+ private String boundTo;
+
+ public StatementDef()
+ {
+ }
+
+ public StatementDef(String name)
+ {
+ this.name = name;
+ }
+
+ public StatementDef(String name, String boundTo)
+ {
+ this.name = name;
+ this.boundTo = boundTo;
+ }
+
+ @XmlAttribute(required = true)
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public EPLDef getEpl()
+ {
+ return epl;
+ }
+
+ public void setEpl(EPLDef epl)
+ {
+ this.epl = epl;
+ }
+
+ @XmlAttribute(required = false)
+ public String getBoundTo()
+ {
+ return boundTo;
+ }
+
+ public void setBoundTo(String boundTo)
+ {
+ this.boundTo = boundTo;
+ }
+}
Property changes on: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/StatementDef.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/StreamInputDef.java (from rev 658, sam/trunk/modules/core/src/main/java/org/jboss/sam/config/StreamInputDef.java)
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/StreamInputDef.java (rev 0)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/StreamInputDef.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -0,0 +1,67 @@
+/*
+ * 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.sam.config.internal;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+@XmlType(name = "inputDefType")
+public class StreamInputDef
+{
+ private String name;
+ private String clazz;
+
+ public StreamInputDef()
+ {
+ }
+
+ public StreamInputDef(String name, String clazz)
+ {
+ this.name = name;
+ this.clazz = clazz;
+ }
+
+ @XmlAttribute(required = true)
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ @XmlAttribute(required = true)
+ public String getClazz()
+ {
+ return clazz;
+ }
+
+ public void setClazz(String clazz)
+ {
+ this.clazz = clazz;
+ }
+}
Property changes on: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/StreamInputDef.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/StreamOutputDef.java (from rev 658, sam/trunk/modules/core/src/main/java/org/jboss/sam/config/StreamOutputDef.java)
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/StreamOutputDef.java (rev 0)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/StreamOutputDef.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -0,0 +1,67 @@
+/*
+ * 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.sam.config.internal;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+@XmlType(name = "outputDefType")
+public class StreamOutputDef
+{
+ private String name;
+ private String clazz;
+
+ public StreamOutputDef()
+ {
+ }
+
+ public StreamOutputDef(String name, String clazz)
+ {
+ this.name = name;
+ this.clazz = clazz;
+ }
+
+ @XmlAttribute(required = true)
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ @XmlAttribute(required = true)
+ public String getClazz()
+ {
+ return clazz;
+ }
+
+ public void setClazz(String clazz)
+ {
+ this.clazz = clazz;
+ }
+}
Property changes on: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/StreamOutputDef.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/datasource/DataSourceFactory.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/datasource/DataSourceFactory.java 2009-07-15 08:39:59 UTC (rev 661)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/datasource/DataSourceFactory.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -21,7 +21,7 @@
*/
package org.jboss.sam.datasource;
-import org.jboss.sam.config.DataSourceDef;
+import org.jboss.sam.config.internal.DataSourceDef;
import org.jboss.sam.datasource.internal.DBCPDataSourceFactory;
import javax.sql.DataSource;
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/datasource/internal/DBCPDataSourceFactory.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/datasource/internal/DBCPDataSourceFactory.java 2009-07-15 08:39:59 UTC (rev 661)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/datasource/internal/DBCPDataSourceFactory.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -27,7 +27,7 @@
import org.apache.commons.dbcp.PoolingDataSource;
import org.apache.commons.pool.ObjectPool;
import org.apache.commons.pool.impl.GenericObjectPool;
-import org.jboss.sam.config.DataSourceDef;
+import org.jboss.sam.config.internal.DataSourceDef;
import org.jboss.sam.datasource.DataSourceFactory;
import javax.sql.DataSource;
Copied: sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/DefaultActivityMonitorFactory.java (from rev 658, sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/DefaultRuntimeFactory.java)
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/DefaultActivityMonitorFactory.java (rev 0)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/DefaultActivityMonitorFactory.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.sam.internal;
+
+import org.jboss.sam.ActivityMonitor;
+import org.jboss.sam.ActivityMonitorFactory;
+import org.jboss.sam.config.Configuration;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class DefaultActivityMonitorFactory extends ActivityMonitorFactory
+{
+ public ActivityMonitor createMonitor(Configuration configuration)
+ {
+ DefaultActivityMonitorImpl defaultActivityMonitor = new DefaultActivityMonitorImpl();
+ configuration.applyTo(defaultActivityMonitor);
+ return defaultActivityMonitor;
+ }
+}
Property changes on: sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/DefaultActivityMonitorFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/DefaultActivityMonitorImpl.java (from rev 658, sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/DefaultRuntimeImpl.java)
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/DefaultActivityMonitorImpl.java (rev 0)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/DefaultActivityMonitorImpl.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -0,0 +1,58 @@
+/*
+ * 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.sam.internal;
+
+import org.jboss.sam.EventProcessor;
+import org.jboss.sam.EventProcessorFactory;
+import org.jboss.sam.ActivityMonitor;
+import org.jboss.sam.datasource.DataSourceManager;
+
+/**
+ * Glues together SAM building blocks.
+ *
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class DefaultActivityMonitorImpl implements ActivityMonitor
+{
+ private EventProcessor eventProcessor;
+ private DataSourceManager dataSourceManager;
+
+ DefaultActivityMonitorImpl()
+ {
+ // create and configure a processor
+ this.eventProcessor = EventProcessorFactory.newInstance().createProcessor();
+ this.eventProcessor.setRuntime(this);
+
+ // create and configure datasources
+ this.dataSourceManager = new DataSourceManager();
+ }
+
+ public DataSourceManager getDataSourceManager()
+ {
+ return this.dataSourceManager;
+ }
+
+ public EventProcessor getEventProcessor()
+ {
+ return this.eventProcessor;
+ }
+}
Property changes on: sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/DefaultActivityMonitorImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/DefaultRuntimeFactory.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/DefaultRuntimeFactory.java 2009-07-15 08:39:59 UTC (rev 661)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/DefaultRuntimeFactory.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -1,39 +0,0 @@
-/*
- * 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.sam.internal;
-
-import org.jboss.sam.SAMRuntime;
-import org.jboss.sam.SAMRuntimeFactory;
-import org.jboss.sam.config.Configurator;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class DefaultRuntimeFactory extends SAMRuntimeFactory
-{
- public SAMRuntime createRuntime(Configurator configurator)
- {
- DefaultRuntimeImpl defaultRuntime = new DefaultRuntimeImpl();
- defaultRuntime.applyConfiguration(configurator);
- return defaultRuntime;
- }
-}
Deleted: sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/DefaultRuntimeImpl.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/DefaultRuntimeImpl.java 2009-07-15 08:39:59 UTC (rev 661)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/DefaultRuntimeImpl.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -1,65 +0,0 @@
-/*
- * 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.sam.internal;
-
-import org.jboss.sam.EventProcessor;
-import org.jboss.sam.EventProcessorFactory;
-import org.jboss.sam.SAMRuntime;
-import org.jboss.sam.config.Configurator;
-import org.jboss.sam.datasource.DataSourceManager;
-
-/**
- * Glues together SAM building blocks.
- *
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class DefaultRuntimeImpl implements SAMRuntime
-{
- private EventProcessor eventProcessor;
- private DataSourceManager dataSourceManager;
-
- DefaultRuntimeImpl()
- {
- // create and configure a processor
- this.eventProcessor = EventProcessorFactory.newInstance().createProcessor();
- this.eventProcessor.setRuntime(this);
-
- // create and configure datasources
- this.dataSourceManager = new DataSourceManager();
- }
-
- public void applyConfiguration(Configurator cfg)
- {
- cfg.configure(this.eventProcessor);
- cfg.configure(this.dataSourceManager);
- }
-
- public DataSourceManager getDataSourceManager()
- {
- return this.dataSourceManager;
- }
-
- public EventProcessor getEventProcessor()
- {
- return this.eventProcessor;
- }
-}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java 2009-07-15 08:39:59 UTC (rev 661)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -30,7 +30,6 @@
import org.drools.builder.ResourceType;
import org.drools.conf.EventProcessingOption;
import org.drools.io.ResourceFactory;
-import org.drools.logger.KnowledgeRuntimeLoggerFactory;
import org.drools.runtime.Globals;
import org.drools.runtime.StatefulKnowledgeSession;
import org.drools.runtime.rule.WorkingMemoryEntryPoint;
@@ -38,7 +37,6 @@
import org.jboss.sam.datasource.DataSourceManager;
import java.io.InputStream;
-import java.util.ArrayList;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
@@ -51,7 +49,7 @@
implements EventProcessor<KnowledgeBase>, Globals
{
private String name;
- private SAMRuntime runtime;
+ private ActivityMonitor runtime;
private boolean started;
private KnowledgeBase kbase;
@@ -120,7 +118,7 @@
KnowledgeRuntimeLoggerFactory.newConsoleLogger(session);*/
}
- public void setRuntime(SAMRuntime runtime)
+ public void setRuntime(ActivityMonitor runtime)
{
this.runtime = runtime;
}
Modified: sam/trunk/modules/core/src/test/java/org/jboss/test/sam/SamTestSetup.java
===================================================================
--- sam/trunk/modules/core/src/test/java/org/jboss/test/sam/SamTestSetup.java 2009-07-15 08:39:59 UTC (rev 661)
+++ sam/trunk/modules/core/src/test/java/org/jboss/test/sam/SamTestSetup.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -24,14 +24,11 @@
import junit.framework.TestCase;
import org.jboss.sam.*;
import org.jboss.sam.config.ConfigFactory;
-import org.jboss.sam.config.Configurator;
+import org.jboss.sam.config.Configuration;
import org.jboss.sam.internal.stream.InVMDispatcher;
import org.jboss.sam.internal.stream.InVMStreamInput;
import javax.sql.DataSource;
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
import java.io.InputStream;
import java.net.URL;
@@ -42,7 +39,7 @@
*/
public abstract class SamTestSetup extends TestCase
{
- protected SAMRuntime runtime;
+ protected ActivityMonitor runtime;
protected EventProcessor eventProcessor;
protected StreamInput streamInput;
protected BufferedStreamOutput bufferedOutput;
@@ -64,9 +61,9 @@
// Main runtime
URL config = loadTestConfiguration(configFile);
- Configurator configurator = new Configurator( ConfigFactory.newInstance().unmarshall(config) );
+ Configuration configuration = new Configuration( ConfigFactory.newInstance().unmarshall(config) );
- runtime = SAMRuntimeFactory.newInstance().createRuntime(configurator);
+ runtime = ActivityMonitorFactory.newInstance().createMonitor(configuration);
eventProcessor = runtime.getEventProcessor();
// Stream input and output
Modified: sam/trunk/modules/core/src/test/java/org/jboss/test/sam/config/ConfigParserTestCase.java
===================================================================
--- sam/trunk/modules/core/src/test/java/org/jboss/test/sam/config/ConfigParserTestCase.java 2009-07-15 08:39:59 UTC (rev 661)
+++ sam/trunk/modules/core/src/test/java/org/jboss/test/sam/config/ConfigParserTestCase.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -23,6 +23,7 @@
import junit.framework.TestCase;
import org.jboss.sam.config.*;
+import org.jboss.sam.config.internal.*;
import org.jboss.sam.internal.stream.InVMStreamInput;
import org.jboss.test.sam.BufferedStreamOutput;
@@ -87,7 +88,8 @@
// marshall it
ByteArrayOutputStream bout = new ByteArrayOutputStream();
- cfgFactory.marshall(configurationDef, bout);
+ Configuration config = new Configuration(configurationDef);
+ cfgFactory.marshall(config, bout);
// use in unmarshall test
this.XML_CONFIG = bout.toByteArray();
Modified: sam/trunk/modules/sim/sim.iml
===================================================================
--- sam/trunk/modules/sim/sim.iml 2009-07-15 08:39:59 UTC (rev 661)
+++ sam/trunk/modules/sim/sim.iml 2009-07-15 09:22:37 UTC (rev 662)
@@ -11,6 +11,7 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="toplevel" />
+ <orderEntry type="module" module-name="core" />
<orderEntry type="module-library">
<library name="M2 Dep: junit:junit:jar:3.8.2:compile">
<CLASSES>
Modified: sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java
===================================================================
--- sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java 2009-07-15 08:39:59 UTC (rev 661)
+++ sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java 2009-07-15 09:22:37 UTC (rev 662)
@@ -25,11 +25,11 @@
import org.javasim.SimulationException;
import org.javasim.SimulationProcess;
import org.jboss.sam.EventProcessor;
-import org.jboss.sam.SAMRuntime;
-import org.jboss.sam.SAMRuntimeFactory;
+import org.jboss.sam.ActivityMonitor;
+import org.jboss.sam.ActivityMonitorFactory;
import org.jboss.sam.StreamInput;
import org.jboss.sam.config.ConfigFactory;
-import org.jboss.sam.config.Configurator;
+import org.jboss.sam.config.Configuration;
import org.jboss.sam.internal.stream.InVMDispatcher;
import org.jboss.sam.internal.stream.InVMStreamInput;
@@ -73,7 +73,7 @@
private InVMDispatcher dispatcher;
// SAM properties
- private SAMRuntime runtime;
+ private ActivityMonitor runtime;
private EventProcessor eventProcessor;
private StreamInput streamInput;
@@ -92,8 +92,8 @@
this.context = new SimulationContext(config);
// setup SAM runtime
- Configurator configurator = new Configurator(ConfigFactory.newInstance().unmarshall(bootstrap));
- this.runtime = SAMRuntimeFactory.newInstance().createRuntime(configurator);
+ Configuration configuration = new Configuration(ConfigFactory.newInstance().unmarshall(bootstrap));
+ this.runtime = ActivityMonitorFactory.newInstance().createMonitor(configuration);
this.eventProcessor = runtime.getEventProcessor();
// create input for the default in-vm channel
17 years
Overlord SVN: r661 - in sam/trunk: modules/core/src/main/java/org/jboss/sam/internal/drools and 9 other directories.
by overlord-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-07-15 04:39:59 -0400 (Wed, 15 Jul 2009)
New Revision: 661
Modified:
sam/trunk/SAMM.iws
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java
sam/trunk/modules/sim/pom.xml
sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/ContextAwareEntity.java
sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventMessageFactory.java
sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java
sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSinkEntity.java
sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSinkHandler.java
sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java
sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/Measurement.java
sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/SimulationContext.java
sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/BufferedStreamOutput.java
sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/aggregation/AggregationTestCase.java
sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/aggregation/SalesEventMessage.java
sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/falloff/FalloffTestCase.java
sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/falloff/ProductionEventMessage.java
sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/filtering/FilteringTestCase.java
sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/filtering/OrderEventMessage.java
sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/pattern/LightSwitchEventMessage.java
sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java
sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/simulation/SensorEventMessage.java
sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/simulation/SensorMessageFactory.java
sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/simulation/SimulationTestCase.java
sam/trunk/modules/sim/src/test/resources/simulation/sam-cfg.xml
Log:
Create entry-point callbacks when adding stream inputs. Fix simulation test case
Modified: sam/trunk/SAMM.iws
===================================================================
--- sam/trunk/SAMM.iws 2009-07-14 12:23:58 UTC (rev 660)
+++ sam/trunk/SAMM.iws 2009-07-15 08:39:59 UTC (rev 661)
@@ -17,32 +17,33 @@
</component>
<component name="ChangeListManager">
<list default="true" name="Default" comment="">
- <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/test/resources/drools/simple.drl" afterPath="" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventMessageFactory.java" afterPath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventMessageFactory.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/aggregation/AggregationTestCase.java" afterPath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/aggregation/AggregationTestCase.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/simulation/SensorMessageFactory.java" afterPath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/simulation/SensorMessageFactory.java" />
<change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/adapter/invm/Alert.java" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/simulation/SimulationTestCase.java" afterPath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/simulation/SimulationTestCase.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/pom.xml" afterPath="$PROJECT_DIR$/modules/core/pom.xml" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/test/resources/drools/standalone.drl" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/SimulationContext.java" afterPath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/SimulationContext.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/StreamInput.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/StreamInput.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/drools/ApiTestCase.java" afterPath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/drools/ApiTestCase.java" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/test/resources/drools/forward.drl" afterPath="" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/test/resources/drools/stream-input.drl" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/test/resources/drools/stream-forward.drl" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/Configurator.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/Configurator.java" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/adapter" afterPath="" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/drools/StandaloneTestCase.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/resources/simulation/test.drl" afterPath="$PROJECT_DIR$/modules/sim/src/test/resources/simulation/test.drl" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/SamTestSetup.java" afterPath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/SamTestSetup.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMDispatcher.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMDispatcher.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/test/resources/database/triggerPull.drl" afterPath="$PROJECT_DIR$/modules/core/src/test/resources/database/triggerPull.drl" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/sim.iml" afterPath="$PROJECT_DIR$/modules/sim/sim.iml" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/filtering/OrderEventMessage.java" afterPath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/filtering/OrderEventMessage.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/resources/simulation/sam-cfg.xml" afterPath="$PROJECT_DIR$/modules/sim/src/test/resources/simulation/sam-cfg.xml" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java" afterPath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/falloff/ProductionEventMessage.java" afterPath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/falloff/ProductionEventMessage.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/pom.xml" afterPath="$PROJECT_DIR$/modules/sim/pom.xml" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/falloff/FalloffTestCase.java" afterPath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/falloff/FalloffTestCase.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSinkHandler.java" afterPath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSinkHandler.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/SAMM.iws" afterPath="$PROJECT_DIR$/SAMM.iws" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSinkEntity.java" afterPath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSinkEntity.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/aggregation/SalesEventMessage.java" afterPath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/aggregation/SalesEventMessage.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/Measurement.java" afterPath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/Measurement.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/pattern/LightSwitchEventMessage.java" afterPath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/pattern/LightSwitchEventMessage.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/ContextAwareEntity.java" afterPath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/ContextAwareEntity.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/filtering/FilteringTestCase.java" afterPath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/filtering/FilteringTestCase.java" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java" afterPath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java" afterPath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessor.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessor.java" />
<change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/adapter/invm/InVMAdapterTestCase.java" afterPath="" />
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java" afterPath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java" />
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMStreamRegistry.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMStreamRegistry.java" />
- <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DefaultCallback.java" />
- <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/adapter/invm" afterPath="" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/simulation/SensorEventMessage.java" afterPath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/simulation/SensorEventMessage.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/BufferedStreamOutput.java" afterPath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/BufferedStreamOutput.java" />
</list>
</component>
<component name="ChangeListSynchronizer" />
@@ -114,7 +115,7 @@
</component>
<component name="DebuggerManager">
<line_breakpoints>
- <breakpoint url="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java" line="251" class="Class at DroolsEventProcessorImpl.java:251" package="org.jboss.sam.internal.drools">
+ <breakpoint url="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/StreamOutputAdapter.java" line="48" class="org.jboss.sam.internal.drools.StreamOutputAdapter" package="org.jboss.sam.internal.drools">
<option name="ENABLED" value="true" />
<option name="SUSPEND_POLICY" value="SuspendAll" />
<option name="LOG_ENABLED" value="false" />
@@ -127,7 +128,7 @@
<option name="CONDITION" value="" />
<option name="LOG_MESSAGE" value="" />
</breakpoint>
- <breakpoint url="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/StreamOutputAdapter.java" line="48" class="org.jboss.sam.internal.drools.StreamOutputAdapter" package="org.jboss.sam.internal.drools">
+ <breakpoint url="file://$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java" line="129" 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" />
@@ -140,7 +141,7 @@
<option name="CONDITION" value="" />
<option name="LOG_MESSAGE" value="" />
</breakpoint>
- <breakpoint url="file://$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java" line="131" class="org.jboss.sam.simulation.EventSourceEntity" package="org.jboss.sam.simulation">
+ <breakpoint url="file://$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java" line="153" 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" />
@@ -153,6 +154,19 @@
<option name="CONDITION" value="" />
<option name="LOG_MESSAGE" value="" />
</breakpoint>
+ <breakpoint url="file://$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/simulation/SimulationTestCase.java" line="78" class="org.jboss.test.sam.simulation.SimulationTestCase" package="org.jboss.test.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>
@@ -224,57 +238,7 @@
</subPane>
</component>
<component name="FileEditorManager">
- <leaf>
- <file leaf-file-name="EventSourceEntity.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="47" column="14" selection-start="1805" selection-end="1805" vertical-scroll-proportion="-0.9306931">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="DroolsEventProcessorImpl.java" pinned="false" current="true" current-in-tab="true">
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="202" column="51" selection-start="6140" selection-end="6162" vertical-scroll-proportion="0.09079445">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="EventSimulation.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="120" column="47" selection-start="4643" selection-end="4643" vertical-scroll-proportion="0.33291298">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="SimulationTestCase.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/simulation/SimulationTestCase.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="63" column="43" selection-start="2373" selection-end="2373" vertical-scroll-proportion="0.33663365">
- <folding />
- </state>
- </provider>
- </entry>
- </file>
- <file leaf-file-name="EventSinkEntity.java" pinned="false" current="false" current-in-tab="false">
- <entry file="file://$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSinkEntity.java">
- <provider selected="true" editor-type-id="text-editor">
- <state line="24" column="0" selection-start="1102" selection-end="1136" vertical-scroll-proportion="-1.1386138">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
- </state>
- </provider>
- </entry>
- </file>
- </leaf>
+ <leaf />
</component>
<component name="FindManager">
<FindUsagesManager>
@@ -414,10 +378,6 @@
<option name="myItemId" value="SAMM.ipr" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="sim" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
</PATH>
<PATH>
<PATH_ELEMENT>
@@ -425,256 +385,6 @@
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
</PATH_ELEMENT>
<PATH_ELEMENT>
- <option name="myItemId" value="sim" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- </PATH>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="SAMM.ipr" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="sim" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src/test" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src/test/resources" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src/test/resources/simulation" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- </PATH>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="SAMM.ipr" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="sim" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src/test" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src/test/resources" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- </PATH>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="SAMM.ipr" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="sim" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src/test" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/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$/modules/sim/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$/modules/sim/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$/modules/sim/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$/modules/sim/src/test/java/org/jboss/test/sam" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- </PATH>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="SAMM.ipr" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="sim" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src/test" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/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$/modules/sim/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$/modules/sim/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$/modules/sim/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$/modules/sim/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$/modules/sim/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="SAMM.ipr" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="sim" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src/test" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- </PATH>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="SAMM.ipr" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="sim" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src/main" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- </PATH>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="SAMM.ipr" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="sim" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src/main" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
- <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/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$/modules/sim/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$/modules/sim/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$/modules/sim/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$/modules/sim/src/main/java/org/jboss/sam/simulation" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
- </PATH_ELEMENT>
- </PATH>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="SAMM.ipr" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- </PATH>
- <PATH>
- <PATH_ELEMENT>
- <option name="myItemId" value="SAMM.ipr" />
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
- </PATH_ELEMENT>
- <PATH_ELEMENT>
<option name="myItemId" value="core" />
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
</PATH_ELEMENT>
@@ -1278,16 +988,16 @@
</todo-panel>
</component>
<component name="ToolWindowManager">
- <frame x="331" y="46" width="1320" height="955" extended-state="0" />
- <editor active="true" />
+ <frame x="346" y="40" width="1328" height="965" extended-state="0" />
+ <editor active="false" />
<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="CVS" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="14" />
<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="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="7" />
- <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.27773407" order="0" />
- <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32750583" order="1" />
- <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.24862313" order="1" />
+ <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.30414388" order="0" />
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32718894" order="1" />
+ <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.24706802" order="1" />
<window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="9" />
<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="Module Dependencies" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="6" />
@@ -1299,7 +1009,7 @@
<window_info id="Maven" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="12" />
<window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.24862313" order="2" />
<window_info id="File View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="5" />
- <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3986014" order="4" />
+ <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.39746544" order="4" />
<window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="0" />
<window_info id="IDEtalk Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="13" />
<window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="8" />
@@ -1383,117 +1093,117 @@
</component>
<component name="com.intellij.openapi.roots.ui.configuration.projectRoot.ProjectRootMasterDetailsConfigurable" proportions="0.52098763,0.5" version="1">
<option name="myPlainMode" value="false" />
- <option name="myLastEditedConfigurable" value="core" />
+ <option name="myLastEditedConfigurable" value="sim" />
</component>
<component name="com.intellij.profile.ui.ErrorOptionsConfigurable" proportions="" version="1">
<option name="myLastEditedConfigurable" />
</component>
<component name="editorHistoryManager">
- <entry file="file://$PROJECT_DIR$/modules/core/src/test/resources/drools/stream-forward.drl">
+ <entry file="file://$PROJECT_DIR$/modules/sim/pom.xml">
<provider selected="true" editor-type-id="text-editor">
- <state line="12" column="1" selection-start="81" selection-end="245" vertical-scroll-proportion="0.23762377">
+ <state line="12" column="54" selection-start="479" selection-end="479" vertical-scroll-proportion="0.24211854">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/test/resources/drools/standalone.drl">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMStreamRegistry.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="9" column="10" selection-start="113" selection-end="169" vertical-scroll-proportion="0.17821783">
+ <state line="59" column="26" selection-start="2010" selection-end="2010" vertical-scroll-proportion="0.6860025">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/sim/sim.iml">
+ <entry file="file://$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSinkEntity.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
- <folding />
+ <state line="24" column="0" selection-start="1102" selection-end="1136" vertical-scroll-proportion="-1.103912">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/StreamOutputAdapter.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMStreamInput.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="57" column="57" selection-start="1762" selection-end="1762" vertical-scroll-proportion="0.65346533">
+ <state line="42" column="9" selection-start="1461" selection-end="1461" vertical-scroll-proportion="0.33251834">
<folding />
</state>
</provider>
</entry>
- <entry file="file:///Users/hbraun/dev/env/drools-5.0-examples/drools-examples/drools-examples-fusion/src/main/java/org/drools/examples/broker/events/EventSource.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessor.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="24" column="17" selection-start="728" selection-end="728" vertical-scroll-proportion="0.17821783">
+ <state line="49" column="7" selection-start="1726" selection-end="1726" vertical-scroll-proportion="0.2117061">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessor.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMDispatcher.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="56" column="7" selection-start="1842" selection-end="1842" vertical-scroll-proportion="0.33291298">
+ <state line="30" column="65" selection-start="1253" selection-end="1265" vertical-scroll-proportion="0.1992528">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/sim/pom.xml">
+ <entry file="file://$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="12" column="54" selection-start="479" selection-end="479" vertical-scroll-proportion="0.24211854">
- <folding />
+ <state line="144" column="33" selection-start="4161" selection-end="4161" vertical-scroll-proportion="0.56723714">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMStreamRegistry.java">
+ <entry file="file://$PROJECT_DIR$/modules/sim/src/test/resources/simulation/test.drl">
<provider selected="true" editor-type-id="text-editor">
- <state line="59" column="26" selection-start="2010" selection-end="2010" vertical-scroll-proportion="0.6860025">
+ <state line="17" column="0" selection-start="381" selection-end="381" vertical-scroll-proportion="0.33251834">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMDispatcher.java">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="53" column="0" selection-start="1839" selection-end="1839" vertical-scroll-proportion="0.66582596">
+ <state line="125" column="60" selection-start="4292" selection-end="4292" vertical-scroll-proportion="0.44582814">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/sim/src/test/resources/simulation/test.drl">
+ <entry file="file://$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/simulation/SimulationTestCase.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="13" column="62" selection-start="320" selection-end="320" vertical-scroll-proportion="0.25742576">
+ <state line="79" column="19" selection-start="2728" selection-end="2728" vertical-scroll-proportion="0.64792174">
<folding />
</state>
</provider>
</entry>
<entry file="file://$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="120" column="47" selection-start="4643" selection-end="4643" vertical-scroll-proportion="0.33291298">
+ <state line="173" column="23" selection-start="5886" selection-end="5886" vertical-scroll-proportion="0.7895392">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/simulation/SimulationTestCase.java">
+ <entry file="file://$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/falloff/FalloffTestCase.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="63" column="43" selection-start="2373" selection-end="2373" vertical-scroll-proportion="0.33663365">
+ <state line="128" column="29" selection-start="4103" selection-end="4143" vertical-scroll-proportion="0.6014944">
<folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSinkEntity.java">
+ <entry file="file://$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="24" column="0" selection-start="1102" selection-end="1136" vertical-scroll-proportion="-1.1386138">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="180" column="55" selection-start="5566" selection-end="5566" vertical-scroll-proportion="0.7210461">
+ <folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java">
+ <entry file="file://$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/filtering/FilteringTestCase.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="47" column="14" selection-start="1805" selection-end="1805" vertical-scroll-proportion="-0.9306931">
- <folding>
- <element signature="imports" expanded="true" />
- </folding>
+ <state line="149" column="52" selection-start="4682" selection-end="4682" vertical-scroll-proportion="0.66748166">
+ <folding />
</state>
</provider>
</entry>
- <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java">
+ <entry file="file://$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/samples/aggregation/AggregationTestCase.java">
<provider selected="true" editor-type-id="text-editor">
- <state line="202" column="51" selection-start="6140" selection-end="6162" vertical-scroll-proportion="0.09079445">
+ <state line="173" column="58" selection-start="5252" selection-end="5252" vertical-scroll-proportion="0.8630807">
<folding />
</state>
</provider>
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java 2009-07-14 12:23:58 UTC (rev 660)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java 2009-07-15 08:39:59 UTC (rev 661)
@@ -24,6 +24,7 @@
import org.drools.KnowledgeBase;
import org.drools.KnowledgeBaseConfiguration;
import org.drools.KnowledgeBaseFactory;
+import org.drools.common.NamedEntryPoint;
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderFactory;
import org.drools.builder.ResourceType;
@@ -50,7 +51,7 @@
implements EventProcessor<KnowledgeBase>, Globals
{
private String name;
- private SAMRuntime runtime;
+ private SAMRuntime runtime;
private boolean started;
private KnowledgeBase kbase;
@@ -80,11 +81,21 @@
public void start()
{
this.session = kbase.newStatefulKnowledgeSession();
- this.session.getGlobals().setDelegate(this);
+ this.session.getGlobals().setDelegate(this);
//KnowledgeRuntimeLoggerFactory.newConsoleLogger(session);
//System.out.println("3. Created session");
+ System.out.println("Known entry-points:");
+ for(WorkingMemoryEntryPoint entryPoint : session.getWorkingMemoryEntryPoints())
+ {
+ if(entryPoint instanceof NamedEntryPoint)
+ {
+ NamedEntryPoint nep = (NamedEntryPoint)entryPoint;
+ System.out.println("-> " + nep.getEntryPoint().getEntryPointId());
+ }
+ }
+
this.started = true;
}
@@ -121,6 +132,28 @@
if(isStarted())
throw new IllegalStateException("EventProcessor already started");
+ // bind stream to drools entry-point
+ streamInput.registerCallback(
+ new StreamInputCallback()
+ {
+
+ public void onEvent(Object args)
+ {
+ if(!isStarted())
+ throw new IllegalStateException("EventProcessor not started");
+
+ WorkingMemoryEntryPoint entryPoint =
+ getSession().getWorkingMemoryEntryPoint(streamInput.getStreamName());
+
+ if(null==entryPoint)
+ throw new IllegalArgumentException("Unable to resolve entry point: "+streamInput.getStreamName());
+
+ entryPoint.insert(args);
+ getSession().fireAllRules();
+ }
+ }
+ );
+
this.streamInputs.put(streamInput.getStreamName(), streamInput);
}
@@ -133,7 +166,7 @@
{
if(isStarted())
throw new IllegalStateException("EventProcessor already started");
-
+
this.streamOutputs.put(streamOutput.getStreamName(), streamOutput);
// Create a drools adapter
@@ -163,10 +196,6 @@
DataSourceManager dsMgr = this.runtime.getDataSourceManager();
global = new SAMAdapter(this.session, this.outputAdapters, dsMgr);
}
- else if("results".equals(key))
- {
- global = new ArrayList();
- }
else
{
// It may be a adapter output
@@ -192,7 +221,7 @@
* @deprecated
*/
public ProcessingStatement registerStatement(String statementName, String epl)
- {
+ {
throw new RuntimeException("Obsolete");
}
@@ -204,7 +233,7 @@
{
if(isStarted())
throw new IllegalStateException("EventProcessor already started");
-
+
final StreamOutput out = this.streamOutputs.get(streamName);
final StreamInput in = this.streamInputs.get(streamName);
@@ -236,41 +265,7 @@
//System.out.println("2. Build packages");
// -----------------------
- // register mapping to either input or output stream
- if(in!=null)
- {
- // bind to input stream
- in.registerCallback(
- new StreamInputCallback()
- {
- public void onEvent(Object args)
- {
- if(!isStarted())
- throw new IllegalStateException("EventProcessor not started");
-
- WorkingMemoryEntryPoint entryPoint =
- getSession().getWorkingMemoryEntryPoint(in.getStreamName());
-
- if(null==entryPoint)
- throw new IllegalArgumentException("Unable to resolve entry point: "+in.getStreamName());
-
- entryPoint.insert(args);
- getSession().fireAllRules();
- }
- }
- );
-
- }
- else
- {
- // bind to output stream
- StreamOutputAdapter outputAdapter = new StreamOutputAdapter(out);
- this.outputAdapters.put(out.getStreamName(), outputAdapter);
- }
-
- // -----------------------
-
DroolsProcessingStatement stmt =
new DroolsProcessingStatement(statementName, null, null);
this.statements.put(statementName, stmt);
Modified: sam/trunk/modules/sim/pom.xml
===================================================================
--- sam/trunk/modules/sim/pom.xml 2009-07-14 12:23:58 UTC (rev 660)
+++ sam/trunk/modules/sim/pom.xml 2009-07-15 08:39:59 UTC (rev 661)
@@ -1,100 +1,103 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
+ <modelVersion>4.0.0</modelVersion>
- <name>SAM - Sim</name>
- <groupId>org.jboss.sam</groupId>
- <artifactId>sim</artifactId>
- <packaging>jar</packaging>
+ <name>SAM - Sim</name>
+ <groupId>org.jboss.sam</groupId>
+ <artifactId>sim</artifactId>
+ <packaging>jar</packaging>
- <!-- Parent -->
- <parent>
- <groupId>org.jboss.sam</groupId>
- <artifactId>sam</artifactId>
- <version>1.0.0.SNAPSHOT</version>
- </parent>
+ <!-- Parent -->
+ <parent>
+ <groupId>org.jboss.sam</groupId>
+ <artifactId>sam</artifactId>
+ <version>1.0.0.SNAPSHOT</version>
+ </parent>
- <!-- Properties -->
- <properties>
- <surefire.security.args>-Djava.security.manager -Djava.security.policy=src/test/etc/tst.policy</surefire.security.args>
- <surefire.jdwp.args>-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005</surefire.jdwp.args>
- </properties>
+ <!-- Properties -->
+ <properties>
+ <surefire.security.args>-Djava.security.manager -Djava.security.policy=src/test/etc/tst.policy
+ </surefire.security.args>
+ <surefire.jdwp.args>-Xdebug -Xnoagent -Djava.compiler=NONE
+ -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
+ </surefire.jdwp.args>
+ </properties>
- <!-- Dependencies -->
- <dependencies>
+ <!-- Dependencies -->
+ <dependencies>
- <dependency>
- <groupId>org.jboss.sam</groupId>
- <artifactId>core</artifactId>
- <version>${version}</version>
- </dependency>
+ <dependency>
+ <groupId>org.jboss.sam</groupId>
+ <artifactId>core</artifactId>
+ <version>${version}</version>
+ </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
- <dependency>
- <groupId>javasim</groupId>
- <artifactId>javasim</artifactId>
- </dependency>
+ <dependency>
+ <groupId>javasim</groupId>
+ <artifactId>javasim</artifactId>
+ </dependency>
- </dependencies>
+ </dependencies>
- <!-- Plugins -->
- <build>
- <resources>
- <resource>
- <targetPath>../etc</targetPath>
- <directory>src/main/etc</directory>
- <filtering>true</filtering>
- </resource>
- </resources>
+ <!-- Plugins -->
+ <build>
+ <resources>
+ <resource>
+ <targetPath>../etc</targetPath>
+ <directory>src/main/etc</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
- <plugins>
+ <plugins>
<plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <excludes>
- <exclude>org/jboss/test/sam/samples/pattern/PatternTestCase.java</exclude>
- <exclude>org/jboss/test/sam/samples/aggregation/FilteringTestCase.java</exclude>
- <exclude>org/jboss/test/sam/samples/falloff/FalloffTestCase.java</exclude>
- <exclude>org/jboss/test/sam/samples/aggregation/AggregationTestCase.java</exclude>
- </excludes>
- </configuration>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>org/jboss/test/sam/samples/pattern/PatternTestCase.java</exclude>
+ <exclude>org/jboss/test/sam/samples/aggregation/FilteringTestCase.java</exclude>
+ <exclude>org/jboss/test/sam/samples/falloff/FalloffTestCase.java</exclude>
+ <exclude>org/jboss/test/sam/samples/aggregation/AggregationTestCase.java</exclude>
+ </excludes>
+ </configuration>
</plugin>
- </plugins>
+ </plugins>
- </build>
+ </build>
- <profiles>
- <!-- Name: debug
- Descr: Enable remote debuging for tests
- -->
- <profile>
- <id>debug</id>
- <activation>
- <property>
- <name>debug</name>
- </property>
- </activation>
- <properties>
- <surefire.jvm.args>${surefire.security.args} ${surefire.jdwp.args}</surefire.jvm.args>
- </properties>
- </profile>
- <profile>
- <id>no-debug</id>
- <activation>
- <property>
- <name>!debug</name>
- </property>
- </activation>
- <properties>
- <surefire.jvm.args>${surefire.security.args}</surefire.jvm.args>
- </properties>
- </profile>
+ <profiles>
+ <!-- Name: debug
+ Descr: Enable remote debuging for tests
+ -->
+ <profile>
+ <id>debug</id>
+ <activation>
+ <property>
+ <name>debug</name>
+ </property>
+ </activation>
+ <properties>
+ <surefire.jvm.args>${surefire.security.args} ${surefire.jdwp.args}</surefire.jvm.args>
+ </properties>
+ </profile>
+ <profile>
+ <id>no-debug</id>
+ <activation>
+ <property>
+ <name>!debug</name>
+ </property>
+ </activation>
+ <properties>
+ <surefire.jvm.args>${surefire.security.args}</surefire.jvm.args>
+ </properties>
+ </profile>
- </profiles>
+ </profiles>
</project>
Modified: sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/ContextAwareEntity.java
===================================================================
--- sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/ContextAwareEntity.java 2009-07-14 12:23:58 UTC (rev 660)
+++ sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/ContextAwareEntity.java 2009-07-15 08:39:59 UTC (rev 661)
@@ -25,10 +25,10 @@
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public interface ContextAwareEntity
-{
- public void begin();
+{
+ public void begin();
- public void end();
+ public void end();
- void setContext(SimulationContext ctx);
+ void setContext(SimulationContext ctx);
}
Modified: sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventMessageFactory.java
===================================================================
--- sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventMessageFactory.java 2009-07-14 12:23:58 UTC (rev 660)
+++ sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventMessageFactory.java 2009-07-15 08:39:59 UTC (rev 661)
@@ -23,10 +23,11 @@
/**
* Creates event messages for {@link org.jboss.sam.simulation.EventSourceEntity}'s
+ *
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public interface EventMessageFactory
-{
- Object createEventMessage(SimulationContext context);
-
+{
+ Object createEventMessage(SimulationContext context);
+
}
Modified: sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java
===================================================================
--- sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java 2009-07-14 12:23:58 UTC (rev 660)
+++ sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java 2009-07-15 08:39:59 UTC (rev 661)
@@ -33,10 +33,7 @@
import org.jboss.sam.internal.stream.InVMDispatcher;
import org.jboss.sam.internal.stream.InVMStreamInput;
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.ByteArrayInputStream;
+import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
@@ -46,21 +43,21 @@
/**
* Simulations are created from global configuration,
* which will be available to any simulation entity and a URL to
- * {@link #bootstrap(java.util.Properties, java.net.URL)} the {@link org.jboss.sam.EventProcessor}:
- * <p>
- *
+ * {@link #bootstrap(java.util.Properties,java.net.URL)} the {@link org.jboss.sam.EventProcessor}:
+ * <p/>
+ * <p/>
* <b>Event sources</b><br>
- * {@link org.jboss.sam.simulation.EventSourceEntity}'s drive the whole simulation by creating and dispatching
+ * {@link org.jboss.sam.simulation.EventSourceEntity}'s drive the whole simulation by creating and dispatching
* typed event messages. They need to be added to a simulation ({@link #addSource(EventSourceEntity)})
* in order to emit events to the event processor.
- * <p>
- *
+ * <p/>
+ * <p/>
* <b>Event sinks</b><br>
* {@link org.jboss.sam.simulation.EventSinkEntity}'s processes event messages that have been forwarded
* from an event processor. They need to be added ({@link #addSink(EventSinkEntity)}) to a simualtion
- * and bound to a processing statement ({@link #bindStatement(String, EventSinkEntity)})
- * <p>
- *
+ * and bound to a processing statement ({@link #bindStatement(String,EventSinkEntity)})
+ * <p/>
+ * <p/>
* <b>Shared context</b><br>
* The {@link org.jboss.sam.simulation.SimulationContext} is shared between all simulation
* entities and acts as a blackboard where any entity can read and write simulation data and configuration.
@@ -86,16 +83,16 @@
private EventSimulation(Properties config, URL bootstrap)
{
- assert bootstrap!=null : "Bootstrap config is null!";
+ assert bootstrap != null : "Bootstrap config is null!";
// thread setup
- setName("EventSimulation {" + getName()+ "}");
+ setName("EventSimulation {" + getName() + "}");
setPriority(1);
this.context = new SimulationContext(config);
// setup SAM runtime
- Configurator configurator = new Configurator( ConfigFactory.newInstance().unmarshall(bootstrap) );
+ Configurator configurator = new Configurator(ConfigFactory.newInstance().unmarshall(bootstrap));
this.runtime = SAMRuntimeFactory.newInstance().createRuntime(configurator);
this.eventProcessor = runtime.getEventProcessor();
@@ -103,7 +100,7 @@
this.streamInput = new InVMStreamInput(InVMDispatcher.DEFAULT_CHANNEL_NAME);
// create a dispatcher used within event source
- this.dispatcher = new InVMDispatcher(InVMDispatcher.DEFAULT_CHANNEL_NAME);
+ this.dispatcher = new InVMDispatcher(InVMDispatcher.DEFAULT_CHANNEL_NAME);
// register in/out with hub
this.eventProcessor.addInput(streamInput);
@@ -130,6 +127,7 @@
/**
* Create a aggregation/filtering statement
+ *
* @param stmt
*/
public void createStatement(String stmt)
@@ -141,13 +139,11 @@
/**
* Bind a statment that forwards to an EventSink
- * @param stmt
- * @param sink
*/
- public void bindStatement(String stmt, EventSinkEntity sink)
+ public void bindStatement(InputStream in, EventSinkEntity sink)
{
this.eventProcessor.registerBoundStatement(
- sink.getStreamName(), UUID.randomUUID().toString(), new ByteArrayInputStream(stmt.getBytes())
+ sink.getStreamName(), UUID.randomUUID().toString(), in
);
}
@@ -157,7 +153,7 @@
*/
public void singleRun()
{
- if(!eventProcessor.isStarted())
+ if (!eventProcessor.isStarted())
{
System.out.println("WARN: Force start EventProcessor. Did you forget to start it?");
eventProcessor.start();
@@ -178,7 +174,7 @@
this.terminate();
Scheduler.reset();
}
- catch(SimulationException e)
+ catch (SimulationException e)
{
e.printStackTrace();
}
@@ -186,12 +182,12 @@
private void begin()
{
- for(EventSinkEntity sink : eventSinks)
+ for (EventSinkEntity sink : eventSinks)
{
sink.begin();
}
- for(EventSourceEntity source : eventSources)
+ for (EventSourceEntity source : eventSources)
{
source.begin();
}
@@ -199,12 +195,12 @@
private void end()
{
- for(EventSinkEntity sink : eventSinks)
+ for (EventSinkEntity sink : eventSinks)
{
sink.end();
}
- for(EventSourceEntity source : eventSources)
+ for (EventSourceEntity source : eventSources)
{
source.end();
}
@@ -263,7 +259,8 @@
// [HB] System.out.println("Return control to main thread");
SimulationProcess.mainResume();
this.suspendProcess();
- } catch (Exception e)
+ }
+ catch (Exception e)
{
e.printStackTrace();
System.exit(-1);
@@ -275,26 +272,9 @@
return new EventSimulation(config, bootstrap);
}
- public static String getDRLFromResource(String resourceName)
+ public static InputStream loadDRL(String resourceName)
{
- try
- {
- URL url = Thread.currentThread().getContextClassLoader().getResource(resourceName);
- BufferedReader reader = new BufferedReader(
- new InputStreamReader(url.openStream())
- );
- StringBuffer sb = new StringBuffer();
- String line;
- while((line = reader.readLine()) != null)
- {
- sb.append(line);
- }
-
- return sb.toString();
- }
- catch (IOException e)
- {
- throw new RuntimeException("Failed to load DRL", e);
- }
+ return Thread.currentThread().getContextClassLoader().getResourceAsStream(resourceName);
}
+
}
Modified: sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSinkEntity.java
===================================================================
--- sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSinkEntity.java 2009-07-14 12:23:58 UTC (rev 660)
+++ sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSinkEntity.java 2009-07-15 08:39:59 UTC (rev 661)
@@ -27,100 +27,100 @@
/**
* Simulates an event sink.<br>
* Event sink's process messages that have been forwarded by an event processor.
- * <p>
+ * <p/>
* <b>EventSinkHandler</b><br>
* The actual processing is done a {@link org.jboss.sam.simulation.EventSinkHandler}
* that needs to be associated with an event sink entity:
- *
+ * <p/>
* <pre>
- *
+ * <p/>
* EventSinkEntity sink = new EventSinkEntity("foo.bar-EventSink");
* sink.setEventHandler(
* new EventSinkHandler()
* {
- *
+ * <p/>
* public void handle(EventMessage[] events, SimulationContext context)
* {
* // dome something here
* }
* }
* );
- *
+ * <p/>
* </pre>
- *
+ * <p/>
* <br>
* <b>EPL Statements and event forwarding</b><br>
* In order to invoke an event sink, you need to register a statement
- * through {@link org.jboss.sam.simulation.EventSimulation#bindStatement(String, EventSinkEntity)}
- *
+ * through {@link org.jboss.sam.simulation.EventSimulation#bindStatement(String,EventSinkEntity)}
+ *
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public class EventSinkEntity implements StreamOutput, ContextAwareEntity
{
- private String streamName;
- private SimulationContext context;
- private EventSinkHandler handler = null;
-
- public EventSinkEntity(String streamName)
- {
- this.streamName = streamName;
- }
+ private String streamName;
+ private SimulationContext context;
+ private EventSinkHandler handler = null;
- public void setEventHandler(EventSinkHandler handler)
- {
- this.handler = handler;
- }
+ public EventSinkEntity(String streamName)
+ {
+ this.streamName = streamName;
+ }
- public StreamOutput start()
- {
- return this;
- }
+ public void setEventHandler(EventSinkHandler handler)
+ {
+ this.handler = handler;
+ }
- public StreamOutput stop()
- {
- return this;
- }
+ public StreamOutput start()
+ {
+ return this;
+ }
- public boolean isStarted()
- {
- return true;
- }
+ public StreamOutput stop()
+ {
+ return this;
+ }
- public String getStreamName()
- {
- return this.streamName;
- }
+ public boolean isStarted()
+ {
+ return true;
+ }
+ public String getStreamName()
+ {
+ return this.streamName;
+ }
- public void setStreamName(String name)
- {
- this.streamName = name;
- }
- public void write(EventMessage[] events)
- {
- if(null==this.context)
- throw new IllegalStateException("Simulation context not set");
-
- if(handler!=null)
- handler.handle(events, context);
- }
+ public void setStreamName(String name)
+ {
+ this.streamName = name;
+ }
+ public void write(EventMessage[] events)
+ {
+ if (null == this.context)
+ throw new IllegalStateException("Simulation context not set");
- public void begin()
- {
+ if (handler != null)
+ handler.handle(events, context);
+ }
- }
- public void end()
- {
+ public void begin()
+ {
- }
+ }
- public void setContext(SimulationContext ctx)
- {
- this.context = ctx;
- }
+ public void end()
+ {
+ }
+
+ public void setContext(SimulationContext ctx)
+ {
+ this.context = ctx;
+ }
+
}
Modified: sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSinkHandler.java
===================================================================
--- sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSinkHandler.java 2009-07-14 12:23:58 UTC (rev 660)
+++ sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSinkHandler.java 2009-07-15 08:39:59 UTC (rev 661)
@@ -30,5 +30,5 @@
*/
public interface EventSinkHandler
{
- void handle(EventMessage[] events, SimulationContext context);
+ void handle(EventMessage[] events, SimulationContext context);
}
Modified: sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java
===================================================================
--- sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java 2009-07-14 12:23:58 UTC (rev 660)
+++ sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java 2009-07-15 08:39:59 UTC (rev 661)
@@ -22,17 +22,17 @@
package org.jboss.sam.simulation;
import org.javasim.RestartException;
+import org.javasim.SimulationEntity;
import org.javasim.SimulationException;
-import org.javasim.SimulationEntity;
import org.jboss.sam.internal.stream.InVMDispatcher;
/**
* Simulates an event source.<br>
- * <p>
+ * <p/>
* <b>EventMessageFactories</b><br>
* An event source leverages an {@link org.jboss.sam.simulation.EventMessageFactory}
* to create event messages and dispatch them to the event processor:
- *
+ * <p/>
* <pre>
* EventSourceEntity source = new EventSourceEntity("foo.bar-EventSource", 0.1);
* source.setEventMessageFactory(
@@ -46,7 +46,7 @@
* }
* );
* </pre>
- *
+ * <p/>
* <br>
* <b>Event ratio</b><br>
* Specifies the ratio with regard to the total simulation time (between 0.01-1)
@@ -64,20 +64,19 @@
private EventMessageFactory factory = null;
/**
- *
- * @param name the event source name
+ * @param name the event source name
* @param eventRatio event creation ratio wrt the total simulation time. Value between 0-1
*/
public EventSourceEntity(String name, double eventRatio)
{
// thread setup
setPriority(5);
- setName("EventSourceEntity {" + getName()+"}");
+ setName("EventSourceEntity {" + getName() + "}");
this.name = name;
- if(eventRatio<=0 || eventRatio>1)
+ if (eventRatio <= 0 || eventRatio > 1)
throw new IllegalArgumentException("Invalid event ratio: " + eventRatio);
this.eventMessageType = eventMessageType;
@@ -106,7 +105,7 @@
try
{
double totalSim = (Double) context.getConfig(EventSimulation.TOTAL_SIM_TIME);
- double holdTime = (totalSim*eventRatio);
+ double holdTime = (totalSim * eventRatio);
hold(holdTime);
}
catch (SimulationException e)
@@ -119,13 +118,13 @@
}
- if(null==context)
+ if (null == context)
throw new IllegalStateException("Simulation context not set");
- if(null==factory)
+ if (null == factory)
throw new IllegalStateException("EventMessageFactory not set");
- if(null==dispatcher)
+ if (null == dispatcher)
throw new IllegalStateException("EventDispatcher not set");
// Create and dispatch event
@@ -142,11 +141,13 @@
try
{
this.activate();
- } catch (SimulationException e)
+ }
+ catch (SimulationException e)
{
e.printStackTrace();
- } catch (RestartException e)
+ }
+ catch (RestartException e)
{
e.printStackTrace();
}
Modified: sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/Measurement.java
===================================================================
--- sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/Measurement.java 2009-07-14 12:23:58 UTC (rev 660)
+++ sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/Measurement.java 2009-07-15 08:39:59 UTC (rev 661)
@@ -23,51 +23,51 @@
/**
* A simulation measurement helper
- *
+ *
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public class Measurement
{
- private Double current = 0.0;
+ private Double current = 0.0;
- public Double getCurrent()
- {
- return current;
- }
+ public Double getCurrent()
+ {
+ return current;
+ }
- public Double increase(Double d)
- {
- this.current += d;
- return this.current;
- }
+ public Double increase(Double d)
+ {
+ this.current += d;
+ return this.current;
+ }
- public Double decrease(Double d)
- {
- this.current -= d;
- return this.current;
- }
+ public Double decrease(Double d)
+ {
+ this.current -= d;
+ return this.current;
+ }
- public Double setCurrent(Double d)
- {
- this.current = d;
- return this.current;
- }
+ public Double setCurrent(Double d)
+ {
+ this.current = d;
+ return this.current;
+ }
- public Double increment()
- {
- this.current += 1;
- return this.current;
- }
+ public Double increment()
+ {
+ this.current += 1;
+ return this.current;
+ }
- public Double decrement()
- {
- this.current -= 1;
- return this.current;
- }
+ public Double decrement()
+ {
+ this.current -= 1;
+ return this.current;
+ }
- public String toString()
- {
- return String.valueOf(getCurrent());
- }
+ public String toString()
+ {
+ return String.valueOf(getCurrent());
+ }
}
Modified: sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/SimulationContext.java
===================================================================
--- sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/SimulationContext.java 2009-07-14 12:23:58 UTC (rev 660)
+++ sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/SimulationContext.java 2009-07-15 08:39:59 UTC (rev 661)
@@ -23,74 +23,73 @@
import org.javasim.Scheduler;
+import java.io.PrintStream;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
-import java.io.PrintStream;
/**
* Shared context between simulation entities and their implementation.
* The context is used collect simulation data and pass it along.<br>
* It propagates:
* <ul>
- * <li>the event simulation configuration
- * <li>measurements from event sinks, event sources and associated delegates
- * <li>arbitrary attachments
+ * <li>the event simulation configuration
+ * <li>measurements from event sinks, event sources and associated delegates
+ * <li>arbitrary attachments
* <ul>
*
- * @see org.jboss.sam.simulation.Measurement
- *
* @author Heiko.Braun <heiko.braun(a)jboss.com>
+ * @see org.jboss.sam.simulation.Measurement
*/
public class SimulationContext
{
- private Properties config = null;
- private Map<String, Measurement> measurements = new HashMap<String, Measurement>();
- private Map<Class, Object> attachments = new HashMap<Class, Object>();
+ private Properties config = null;
+ private Map<String, Measurement> measurements = new HashMap<String, Measurement>();
+ private Map<Class, Object> attachments = new HashMap<Class, Object>();
- public SimulationContext(Properties config)
- {
- this.config = config;
- }
+ public SimulationContext(Properties config)
+ {
+ this.config = config;
+ }
- public Object getConfig(String key)
- {
- if(null == config.get(key))
- throw new IllegalArgumentException("No such config: " + key);
- return config.get(key);
- }
+ public Object getConfig(String key)
+ {
+ if (null == config.get(key))
+ throw new IllegalArgumentException("No such config: " + key);
+ return config.get(key);
+ }
- public Measurement getMeasurement(String key)
- {
- Measurement measurement = measurements.get(key);
- if(null == measurement)
- {
- measurement = new Measurement();
- measurements.put(key, measurement);
- }
- return measurement;
- }
+ public Measurement getMeasurement(String key)
+ {
+ Measurement measurement = measurements.get(key);
+ if (null == measurement)
+ {
+ measurement = new Measurement();
+ measurements.put(key, measurement);
+ }
+ return measurement;
+ }
- public <T> T getAttachment(Class<T> clazz)
- {
- return (T)attachments.get(clazz);
- }
+ public <T> T getAttachment(Class<T> clazz)
+ {
+ return (T) attachments.get(clazz);
+ }
- public <T> T addAttachment(Class<T> clazz, Object obj)
- {
- return (T)attachments.put(clazz, obj);
- }
+ public <T> T addAttachment(Class<T> clazz, Object obj)
+ {
+ return (T) attachments.put(clazz, obj);
+ }
- public double getCurrentSimulationTime()
- {
- return Scheduler.currentTime();
- }
+ public double getCurrentSimulationTime()
+ {
+ return Scheduler.currentTime();
+ }
- public void dump(PrintStream out)
- {
- for(String key : measurements.keySet())
- {
- out.println(key + ": " + measurements.get(key));
- }
- }
+ public void dump(PrintStream out)
+ {
+ for (String key : measurements.keySet())
+ {
+ out.println(key + ": " + measurements.get(key));
+ }
+ }
}
Modified: sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/BufferedStreamOutput.java
===================================================================
--- sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/BufferedStreamOutput.java 2009-07-14 12:23:58 UTC (rev 660)
+++ sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/BufferedStreamOutput.java 2009-07-15 08:39:59 UTC (rev 661)
@@ -36,147 +36,147 @@
*/
public class BufferedStreamOutput implements StreamOutput
{
- private List<EventMessage[]> newDataLists;
- private List<EventMessage[]> oldDataLists;
+ private List<EventMessage[]> newDataLists;
+ private List<EventMessage[]> oldDataLists;
- private EventMessage[] lastNewDatas;
- private EventMessage[] lastOldDatas;
- private boolean isInvoked;
+ private EventMessage[] lastNewDatas;
+ private EventMessage[] lastOldDatas;
+ private boolean isInvoked;
- private String streamName;
+ private String streamName;
- private boolean started;
+ private boolean started;
- public static String NAME = "InVM";
-
- public BufferedStreamOutput()
- {
- this(UUID.randomUUID().toString());
- }
+ public static String NAME = "InVM";
- public BufferedStreamOutput(String name)
- {
- this.streamName = name;
- newDataLists = new LinkedList<EventMessage[]>();
- oldDataLists = new LinkedList<EventMessage[]>();
- }
+ public BufferedStreamOutput()
+ {
+ this(UUID.randomUUID().toString());
+ }
+ public BufferedStreamOutput(String name)
+ {
+ this.streamName = name;
+ newDataLists = new LinkedList<EventMessage[]>();
+ oldDataLists = new LinkedList<EventMessage[]>();
+ }
- public BufferedStreamOutput start()
- {
- this.started = true;
- return this;
- }
- public BufferedStreamOutput stop()
- {
- this.started = false;
- return this;
- }
+ public BufferedStreamOutput start()
+ {
+ this.started = true;
+ return this;
+ }
- public boolean isStarted()
- {
- return this.started;
- }
+ public BufferedStreamOutput stop()
+ {
+ this.started = false;
+ return this;
+ }
- public String getStreamName()
- {
- return this.streamName;
- }
+ public boolean isStarted()
+ {
+ return this.started;
+ }
+ public String getStreamName()
+ {
+ return this.streamName;
+ }
- public void setStreamName(String name)
- {
- this.streamName = name;
- }
- public void write(EventMessage[] args)
- {
- update(args, new EventMessage[]{});
- }
+ public void setStreamName(String name)
+ {
+ this.streamName = name;
+ }
- public void update(EventMessage[] newDatas, EventMessage[] oldDatas)
- {
- this.oldDataLists.add(oldDatas);
- this.newDataLists.add(newDatas);
+ public void write(EventMessage[] args)
+ {
+ update(args, new EventMessage[]{});
+ }
- this.lastNewDatas = newDatas;
- this.lastOldDatas = oldDatas;
+ public void update(EventMessage[] newDatas, EventMessage[] oldDatas)
+ {
+ this.oldDataLists.add(oldDatas);
+ this.newDataLists.add(newDatas);
- isInvoked = true;
- }
+ this.lastNewDatas = newDatas;
+ this.lastOldDatas = oldDatas;
- public void reset()
- {
- this.oldDataLists.clear();
- this.newDataLists.clear();
- this.lastNewDatas = null;
- this.lastOldDatas = null;
- isInvoked = false;
- }
+ isInvoked = true;
+ }
- public EventMessage[] getLastNewData()
- {
- return lastNewDatas;
- }
+ public void reset()
+ {
+ this.oldDataLists.clear();
+ this.newDataLists.clear();
+ this.lastNewDatas = null;
+ this.lastOldDatas = null;
+ isInvoked = false;
+ }
- public EventMessage[] getAndResetLastNewData()
- {
- EventMessage[] lastNews = lastNewDatas;
- lastNewDatas = null;
- return lastNews;
- }
+ public EventMessage[] getLastNewData()
+ {
+ return lastNewDatas;
+ }
- public EventMessage[] getLastOldData()
- {
- return lastOldDatas;
- }
+ public EventMessage[] getAndResetLastNewData()
+ {
+ EventMessage[] lastNews = lastNewDatas;
+ lastNewDatas = null;
+ return lastNews;
+ }
- public List<EventMessage[]> getNewDataList()
- {
- return newDataLists;
- }
+ public EventMessage[] getLastOldData()
+ {
+ return lastOldDatas;
+ }
- public List<EventMessage[]> getOldDataList()
- {
- return oldDataLists;
- }
+ public List<EventMessage[]> getNewDataList()
+ {
+ return newDataLists;
+ }
- public boolean isInvoked()
- {
- return isInvoked;
- }
+ public List<EventMessage[]> getOldDataList()
+ {
+ return oldDataLists;
+ }
- public boolean getAndClearIsInvoked()
- {
- boolean invoked = isInvoked;
- isInvoked = false;
- return invoked;
- }
+ public boolean isInvoked()
+ {
+ return isInvoked;
+ }
- public void setLastNewData(EventMessage[] lastNewDatas)
- {
- this.lastNewDatas = lastNewDatas;
- }
+ public boolean getAndClearIsInvoked()
+ {
+ boolean invoked = isInvoked;
+ isInvoked = false;
+ return invoked;
+ }
- public void setLastOldData(EventMessage[] lastOldDatas)
- {
- this.lastOldDatas = lastOldDatas;
- }
+ public void setLastNewData(EventMessage[] lastNewDatas)
+ {
+ this.lastNewDatas = lastNewDatas;
+ }
- public EventMessage assertOneGetNewAndReset()
- {
- Assert.assertTrue(isInvoked);
+ public void setLastOldData(EventMessage[] lastOldDatas)
+ {
+ this.lastOldDatas = lastOldDatas;
+ }
- Assert.assertEquals(1, newDataLists.size());
- Assert.assertEquals(1, oldDataLists.size());
+ public EventMessage assertOneGetNewAndReset()
+ {
+ Assert.assertTrue(isInvoked);
- Assert.assertEquals(1, lastNewDatas.length);
- Assert.assertNull(lastOldDatas);
+ Assert.assertEquals(1, newDataLists.size());
+ Assert.assertEquals(1, oldDataLists.size());
- EventMessage lastNew = lastNewDatas[0];
- reset();
- return lastNew;
- }
+ Assert.assertEquals(1, lastNewDatas.length);
+ Assert.assertNull(lastOldDatas);
+ EventMessage lastNew = lastNewDatas[0];
+ reset();
+ return lastNew;
+ }
+
}
\ No newline at end of file
Modified: sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/aggregation/AggregationTestCase.java
===================================================================
--- sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/aggregation/AggregationTestCase.java 2009-07-14 12:23:58 UTC (rev 660)
+++ sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/aggregation/AggregationTestCase.java 2009-07-15 08:39:59 UTC (rev 661)
@@ -22,148 +22,154 @@
package org.jboss.test.sam.samples.aggregation;
import junit.framework.TestCase;
+import org.javasim.streams.UniformStream;
+import org.jboss.sam.EventMessage;
import org.jboss.sam.simulation.*;
-import org.jboss.sam.EventMessage;
-import org.javasim.streams.UniformStream;
-import java.util.*;
import java.io.IOException;
+import java.io.ByteArrayInputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Properties;
/**
* An aggregation example.
- *
+ *
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public class AggregationTestCase extends TestCase
{
- EventSimulation simulation;
- SimulationContext context;
+ EventSimulation simulation;
+ SimulationContext context;
- EventSourceEntity source;
- EventSinkEntity sink;
+ EventSourceEntity source;
+ EventSinkEntity sink;
- protected void setUp() throws Exception
- {
- // config
- Properties config = new Properties();
- config.put(EventSimulation.TOTAL_SIM_TIME, 100.00);
+ protected void setUp() throws Exception
+ {
+ // config
+ Properties config = new Properties();
+ config.put(EventSimulation.TOTAL_SIM_TIME, 100.00);
- // init
- simulation = EventSimulation.bootstrap(config,
+ // init
+ simulation = EventSimulation.bootstrap(config,
Thread.currentThread().getContextClassLoader().getResource("simulation/sam-cfg.xml")
- );
+ );
- // shared between all entities
- context = simulation.getContext();
+ // shared between all entities
+ context = simulation.getContext();
- // create an event source and sink
- source = new EventSourceEntity("RetailStoreEventSource", 0.05);
- sink = new EventSinkEntity("SalesVolumeMonitor");
+ // create an event source and sink
+ source = new EventSourceEntity("RetailStoreEventSource", 0.05);
+ sink = new EventSinkEntity("SalesVolumeMonitor");
- }
+ }
- protected void tearDown() throws Exception
- {
- simulation.done();
- }
+ protected void tearDown() throws Exception
+ {
+ simulation.done();
+ }
- @SuppressWarnings({"unchecked"})
- public void testEventAggregation()
- {
- // associate a source factory
- source.setEventMessageFactory(
+ @SuppressWarnings({"unchecked"})
+ public void testEventAggregation()
+ {
+ // associate a source factory
+ source.setEventMessageFactory(
new EventMessageFactory()
{
- String[] stores = new String[] {"London", "Paris", "Mailand"};
+ String[] stores = new String[]{"London", "Paris", "Mailand"};
- UniformStream rndStore = new UniformStream(1,3);
- UniformStream salesVolume = new UniformStream(1,100);
+ UniformStream rndStore = new UniformStream(1, 3);
+ UniformStream salesVolume = new UniformStream(1, 100);
- public Object createEventMessage(SimulationContext context)
- {
- context.getMeasurement("dispatched").increment();
+ 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(
+ // we need at least a single match for the test case
+ String store = randomStore();
+ SalesEventMessage salesEvent = new SalesEventMessage(
store,
getVolumen(),
System.currentTimeMillis()
- );
+ );
- return salesEvent;
- }
+ 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 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;
- }
- }
+ public double getVolumen()
+ {
+ try
+ {
+ return salesVolume.getNumber();
+ }
+ catch (IOException e)
+ {
+ return 10.00;
+ }
+ }
}
- );
+ );
- // associate a sink handler
- sink.setEventHandler(
+ // 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>());
+ 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();
- }
+ context.getAttachment(List.class).addAll(Arrays.asList(events));
+ context.getMeasurement("processed").increment();
+ }
}
- );
+ );
- simulation.addSource(source);
- simulation.addSink(sink);
+ simulation.addSource(source);
+ simulation.addSink(sink);
- // Filters high value orders with amount>5
- simulation.createStatement("insert into AverageSalesVolume " +
+ // 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);
+ // Forward any highvalue order to the HighValueMonitor
+ String epl = "select * from AverageSalesVolume";
+ simulation.bindStatement(new ByteArrayInputStream(epl.getBytes()), sink);
- // start simulation
- simulation.singleRun();
+ // start simulation
+ simulation.singleRun();
- // display status
- context.dump(System.out);
+ // 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"));
- }
- }
-
+ // 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"));
+ }
+ }
+
}
Modified: sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/aggregation/SalesEventMessage.java
===================================================================
--- sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/aggregation/SalesEventMessage.java 2009-07-14 12:23:58 UTC (rev 660)
+++ sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/aggregation/SalesEventMessage.java 2009-07-15 08:39:59 UTC (rev 661)
@@ -21,37 +21,35 @@
*/
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;
+ 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 SalesEventMessage(String store, double salesVolume, long timestamp)
+ {
+ this.store = store;
+ this.salesVolume = salesVolume;
+ this.timestamp = timestamp;
+ }
- public String getStore()
- {
- return store;
- }
+ public String getStore()
+ {
+ return store;
+ }
- public double getSalesVolume()
- {
- return salesVolume;
- }
+ public double getSalesVolume()
+ {
+ return salesVolume;
+ }
- public long getTimestamp()
- {
- return timestamp;
- }
+ public long getTimestamp()
+ {
+ return timestamp;
+ }
}
Modified: sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/falloff/FalloffTestCase.java
===================================================================
--- sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/falloff/FalloffTestCase.java 2009-07-14 12:23:58 UTC (rev 660)
+++ sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/falloff/FalloffTestCase.java 2009-07-15 08:39:59 UTC (rev 661)
@@ -25,6 +25,7 @@
import org.jboss.sam.EventMessage;
import org.jboss.sam.simulation.*;
+import java.io.ByteArrayInputStream;
import java.util.*;
/**
@@ -34,110 +35,113 @@
*/
public class FalloffTestCase extends TestCase
{
- EventSimulation simulation;
- SimulationContext context;
+ EventSimulation simulation;
+ SimulationContext context;
- EventSourceEntity source;
- EventSinkEntity sink;
+ EventSourceEntity source;
+ EventSinkEntity sink;
- protected void setUp() throws Exception
- {
- // config
- Properties config = new Properties();
- config.put(EventSimulation.TOTAL_SIM_TIME, 100.00);
+ protected void setUp() throws Exception
+ {
+ // config
+ Properties config = new Properties();
+ config.put(EventSimulation.TOTAL_SIM_TIME, 100.00);
- // init
- simulation = EventSimulation.bootstrap(config,
+ // init
+ simulation = EventSimulation.bootstrap(config,
Thread.currentThread().getContextClassLoader().getResource("simulation/sam-cfg.xml")
- );
+ );
- // shared between all entities
- context = simulation.getContext();
+ // shared between all entities
+ context = simulation.getContext();
- // create an event source and sink
- source = new EventSourceEntity("FactoryLine", 0.03);
- sink = new EventSinkEntity("ProductionRateMonitor");
+ // create an event source and sink
+ source = new EventSourceEntity("FactoryLine", 0.03);
+ sink = new EventSinkEntity("ProductionRateMonitor");
- }
+ }
- protected void tearDown() throws Exception
- {
- simulation.done();
- }
+ protected void tearDown() throws Exception
+ {
+ simulation.done();
+ }
- @SuppressWarnings({"unchecked"})
- public void testEventFiltering()
- {
- // associate a source factory
- source.setEventMessageFactory(
+ @SuppressWarnings({"unchecked"})
+ public void testEventFiltering()
+ {
+ // associate a source factory
+ source.setEventMessageFactory(
new EventMessageFactory()
{
- Calendar c = new GregorianCalendar();
- int numMessages = 0;
+ Calendar c = new GregorianCalendar();
+ int numMessages = 0;
- public Object createEventMessage(SimulationContext context)
- {
- context.getMeasurement("dispatched").increment();
+ public Object createEventMessage(SimulationContext context)
+ {
+ context.getMeasurement("dispatched").increment();
- // simulate a falloff after 20 messages. Production goes down 50%...
- if(numMessages<20)
- c.add(Calendar.SECOND, 3);
- else
- c.add(Calendar.SECOND, 6);
+ // simulate a falloff after 20 messages. Production goes down 50%...
+ if (numMessages < 20)
+ c.add(Calendar.SECOND, 3);
+ else
+ c.add(Calendar.SECOND, 6);
- long ts = c.getTimeInMillis();
+ long ts = c.getTimeInMillis();
- ProductionEventMessage productionRate = new ProductionEventMessage("Assembly Line-A", ts);
- numMessages++;
- return productionRate;
- }
+ ProductionEventMessage productionRate = new ProductionEventMessage("Assembly Line-A", ts);
+ numMessages++;
+ return productionRate;
+ }
}
- );
+ );
- // associate a sink handler
- sink.setEventHandler(
+ // 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>());
+ 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();
- }
+ context.getAttachment(List.class).addAll(Arrays.asList(events));
+ context.getMeasurement("processed").increment();
+ }
}
- );
+ );
- simulation.addSource(source);
- simulation.addSink(sink);
+ simulation.addSource(source);
+ simulation.addSink(sink);
- // Filters high value orders with amount>5
- simulation.createStatement("insert into RatePerTenSeconds " +
+ // Filters high value orders with amount>5
+ simulation.createStatement("insert into RatePerTenSeconds " +
"select line, count(*) as cnt " +
"from org.jboss.test.sam.samples.falloff.ProductionEventMessage" +
".win:ext_timed(timestamp, 10 seconds)");
- // Forward any highvalue order to the monitor
- simulation.bindStatement("select line, avg(cnt) as avgCnt " +
+ // Forward any highvalue order to the monitor
+
+ String epl = "select line, avg(cnt) as avgCnt " +
"from RatePerTenSeconds.win:length(6) " +
"group by line " +
- "having cnt < avg(cnt) * 0.75", sink);
-
- // start simulation
- simulation.singleRun();
+ "having cnt < avg(cnt) * 0.75";
- // display status
- context.dump(System.out);
+ simulation.bindStatement(new ByteArrayInputStream(epl.getBytes()), sink);
- // evaluate results
- List<EventMessage> eventMessages = context.getAttachment(List.class);
- assertNotNull(eventMessages);
- assertTrue(eventMessages.size()>=1);
+ // start simulation
+ simulation.singleRun();
- for(EventMessage e : eventMessages)
- {
- System.out.println(e.getProperty("line")+": " + e.getProperty("avgCnt"));
- }
- }
+ // 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("line") + ": " + e.getProperty("avgCnt"));
+ }
+ }
}
Modified: sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/falloff/ProductionEventMessage.java
===================================================================
--- sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/falloff/ProductionEventMessage.java 2009-07-14 12:23:58 UTC (rev 660)
+++ sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/falloff/ProductionEventMessage.java 2009-07-15 08:39:59 UTC (rev 661)
@@ -26,23 +26,23 @@
*/
public final class ProductionEventMessage
{
- String line;
- long timestamp;
+ String line;
+ long timestamp;
- public ProductionEventMessage(String line, long timestamp)
- {
- this.line = line;
- this.timestamp = timestamp;
- }
+ public ProductionEventMessage(String line, long timestamp)
+ {
+ this.line = line;
+ this.timestamp = timestamp;
+ }
- public String getLine()
- {
- return line;
- }
-
- public long getTimestamp()
- {
- return timestamp;
- }
+ public String getLine()
+ {
+ return line;
+ }
+ public long getTimestamp()
+ {
+ return timestamp;
+ }
+
}
Modified: sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/filtering/FilteringTestCase.java
===================================================================
--- sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/filtering/FilteringTestCase.java 2009-07-14 12:23:58 UTC (rev 660)
+++ sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/filtering/FilteringTestCase.java 2009-07-15 08:39:59 UTC (rev 661)
@@ -28,6 +28,7 @@
import org.jboss.test.sam.samples.filtering.OrderEventMessage;
import java.io.IOException;
+import java.io.ByteArrayInputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@@ -39,121 +40,122 @@
* <li>One statement to filter high value orders (unbound)
* <li>Anotherone that forwards the results to a monitor (bound)
* </ul>
- *
+ *
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public class FilteringTestCase extends TestCase
{
- EventSimulation simulation;
- SimulationContext context;
+ EventSimulation simulation;
+ SimulationContext context;
- EventSourceEntity source;
- EventSinkEntity sink;
+ EventSourceEntity source;
+ EventSinkEntity sink;
- protected void setUp() throws Exception
- {
- // config
- Properties config = new Properties();
- config.put(EventSimulation.TOTAL_SIM_TIME, 75.00);
+ protected void setUp() throws Exception
+ {
+ // config
+ Properties config = new Properties();
+ config.put(EventSimulation.TOTAL_SIM_TIME, 75.00);
- // init
- simulation = EventSimulation.bootstrap(config,
+ // init
+ simulation = EventSimulation.bootstrap(config,
Thread.currentThread().getContextClassLoader().getResource("simulation/sam-cfg.xml")
- );
+ );
- // shared between all entities
- context = simulation.getContext();
+ // shared between all entities
+ context = simulation.getContext();
- // create an event source and sink
- source = new EventSourceEntity("OrderEventSource", 0.10);
- sink = new EventSinkEntity("HighValueMonitor");
+ // create an event source and sink
+ source = new EventSourceEntity("OrderEventSource", 0.10);
+ sink = new EventSinkEntity("HighValueMonitor");
- }
+ }
- protected void tearDown() throws Exception
- {
- simulation.done();
- }
+ protected void tearDown() throws Exception
+ {
+ simulation.done();
+ }
- @SuppressWarnings({"unchecked"})
- public void testEventFiltering()
- {
- // associate a source factory
- source.setEventMessageFactory(
+ @SuppressWarnings({"unchecked"})
+ public void testEventFiltering()
+ {
+ // associate a source factory
+ source.setEventMessageFactory(
new EventMessageFactory()
{
- boolean singleMatchEnforced;
- UniformStream unitStream = new UniformStream(1,10);
+ boolean singleMatchEnforced;
+ UniformStream unitStream = new UniformStream(1, 10);
- public Object createEventMessage(SimulationContext context)
- {
- context.getMeasurement("dispatched").increment();
+ public Object createEventMessage(SimulationContext context)
+ {
+ context.getMeasurement("dispatched").increment();
- // we need at least a single match for the test case
- long amount = singleMatchEnforced ? calcAmount() : 10;
- if(!singleMatchEnforced) singleMatchEnforced = true;
+ // we need at least a single match for the test case
+ long amount = singleMatchEnforced ? calcAmount() : 10;
+ if (!singleMatchEnforced) singleMatchEnforced = true;
- OrderEventMessage order = new OrderEventMessage("Stereo", amount);
- return order;
- }
+ OrderEventMessage order = new OrderEventMessage("Stereo", amount);
+ return order;
+ }
- public long calcAmount()
- {
- try
- {
- double value = Math.floor(unitStream.getNumber());
- return new Double(value).longValue();
- }
- catch (IOException e)
- {
- return 1;
- }
- }
+ public long calcAmount()
+ {
+ try
+ {
+ double value = Math.floor(unitStream.getNumber());
+ return new Double(value).longValue();
+ }
+ catch (IOException e)
+ {
+ return 1;
+ }
+ }
}
- );
+ );
- // associate a sink handler
- sink.setEventHandler(
+ // 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>());
+ 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();
- }
+ context.getAttachment(List.class).addAll(Arrays.asList(events));
+ context.getMeasurement("processed").increment();
+ }
}
- );
+ );
- simulation.addSource(source);
- simulation.addSink(sink);
+ simulation.addSource(source);
+ simulation.addSink(sink);
- // Filters high value orders with amount>5
- simulation.createStatement("insert into HighValueOrders " +
+ // Filters high value orders with amount>5
+ simulation.createStatement("insert into HighValueOrders " +
"select * from org.jboss.test.sam.samples.filtering.OrderEventMessage as o " +
"where o.amount>5");
- // Forward any highvalue order to the HighValueMonitor
- simulation.bindStatement("select * from HighValueOrders", sink);
+ // Forward any highvalue order to the HighValueMonitor
+ String epl = "select * from HighValueOrders";
+ simulation.bindStatement(new ByteArrayInputStream(epl.getBytes()), sink);
- // start simulation
- simulation.singleRun();
+ // start simulation
+ simulation.singleRun();
- // display status
- printStatus();
+ // display status
+ printStatus();
- // evaluate results
- List<EventMessage> eventMessages = context.getAttachment(List.class);
- assertNotNull(eventMessages);
- assertTrue(eventMessages.size()>=1);
- }
+ // evaluate results
+ List<EventMessage> eventMessages = context.getAttachment(List.class);
+ assertNotNull(eventMessages);
+ assertTrue(eventMessages.size() >= 1);
+ }
- private void printStatus()
- {
- System.out.println("Dispatched: "+context.getMeasurement("dispatched"));
- System.out.println("Processed: "+context.getMeasurement("processed"));
- }
+ private void printStatus()
+ {
+ System.out.println("Dispatched: " + context.getMeasurement("dispatched"));
+ System.out.println("Processed: " + context.getMeasurement("processed"));
+ }
}
Modified: sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/filtering/OrderEventMessage.java
===================================================================
--- sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/filtering/OrderEventMessage.java 2009-07-14 12:23:58 UTC (rev 660)
+++ sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/filtering/OrderEventMessage.java 2009-07-15 08:39:59 UTC (rev 661)
@@ -26,32 +26,32 @@
*/
public final class OrderEventMessage
{
- private String product;
- private long amount;
+ private String product;
+ private long amount;
- public OrderEventMessage(String product, long amount)
- {
- this.product = product;
- this.amount = amount;
- }
+ public OrderEventMessage(String product, long amount)
+ {
+ this.product = product;
+ this.amount = amount;
+ }
- public String getProduct()
- {
- return product;
- }
+ public String getProduct()
+ {
+ return product;
+ }
- public void setProduct(String product)
- {
- this.product = product;
- }
+ public void setProduct(String product)
+ {
+ this.product = product;
+ }
- public long getAmount()
- {
- return amount;
- }
+ public long getAmount()
+ {
+ return amount;
+ }
- public void setAmount(long amount)
- {
- this.amount = amount;
- }
+ public void setAmount(long amount)
+ {
+ this.amount = amount;
+ }
}
Modified: sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/pattern/LightSwitchEventMessage.java
===================================================================
--- sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/pattern/LightSwitchEventMessage.java 2009-07-14 12:23:58 UTC (rev 660)
+++ sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/pattern/LightSwitchEventMessage.java 2009-07-15 08:39:59 UTC (rev 661)
@@ -26,21 +26,21 @@
*/
public final class LightSwitchEventMessage
{
- boolean enabled;
+ boolean enabled;
- public LightSwitchEventMessage(boolean enabled)
- {
- this.enabled = enabled;
- }
+ public LightSwitchEventMessage(boolean enabled)
+ {
+ this.enabled = enabled;
+ }
- public boolean getEnabled()
- {
- return enabled;
- }
+ public boolean getEnabled()
+ {
+ return enabled;
+ }
- public String toString()
- {
- return "LightSwitch{enabled="+this.enabled+"}";
- }
+ public String toString()
+ {
+ return "LightSwitch{enabled=" + this.enabled + "}";
+ }
}
Modified: sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java
===================================================================
--- sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java 2009-07-14 12:23:58 UTC (rev 660)
+++ sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/samples/pattern/PatternTestCase.java 2009-07-15 08:39:59 UTC (rev 661)
@@ -26,162 +26,165 @@
import org.jboss.sam.simulation.*;
import java.util.Properties;
+import java.io.ByteArrayInputStream;
/**
* A simple pattern example.
- *
+ *
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public class PatternTestCase extends TestCase
{
- EventSimulation simulation;
- SimulationContext context;
+ EventSimulation simulation;
+ SimulationContext context;
- EventSourceEntity source;
- EventSinkEntity sink;
+ EventSourceEntity source;
+ EventSinkEntity sink;
- protected void setUp() throws Exception
- {
- // config
- Properties config = new Properties();
- config.put(EventSimulation.TOTAL_SIM_TIME, 60.00);
+ protected void setUp() throws Exception
+ {
+ // config
+ Properties config = new Properties();
+ config.put(EventSimulation.TOTAL_SIM_TIME, 60.00);
- // init
- simulation = EventSimulation.bootstrap(
+ // init
+ simulation = EventSimulation.bootstrap(
config,
Thread.currentThread().getContextClassLoader().getResource("samples/pattern/esper-cfg.xml")
- );
+ );
- // shared between all entities
- context = simulation.getContext();
+ // shared between all entities
+ context = simulation.getContext();
- // create an event source and sink
- source = new EventSourceEntity("LightSwitch", 0.10);
- sink = new EventSinkEntity("LightMonitor");
+ // create an event source and sink
+ source = new EventSourceEntity("LightSwitch", 0.10);
+ sink = new EventSinkEntity("LightMonitor");
- }
+ }
- protected void tearDown() throws Exception
- {
- simulation.done();
- }
+ protected void tearDown() throws Exception
+ {
+ simulation.done();
+ }
- public void testRegularLightSwitch()
- {
- // associate a source factory
- source.setEventMessageFactory(
+ public void testRegularLightSwitch()
+ {
+ // associate a source factory
+ source.setEventMessageFactory(
new EventMessageFactory()
{
- private boolean lastState;
+ private boolean lastState;
- public Object createEventMessage(SimulationContext context)
- {
- context.getMeasurement("dispatched").increment();
- LightSwitchEventMessage message = new LightSwitchEventMessage(lastState);
- lastState = !lastState;
- return message;
- }
+ public Object createEventMessage(SimulationContext context)
+ {
+ context.getMeasurement("dispatched").increment();
+ LightSwitchEventMessage message = new LightSwitchEventMessage(lastState);
+ lastState = !lastState;
+ return message;
+ }
}
- );
+ );
- // associate a sink handler
- sink.setEventHandler(
+ // 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]);
- }
+ public void handle(EventMessage[] events, SimulationContext context)
+ {
+ context.getMeasurement("processed").increment();
+ context.addAttachment(EventMessage.class, events[0]);
+ }
}
- );
+ );
- simulation.addSource(source);
- simulation.addSink(sink);
+ simulation.addSource(source);
+ simulation.addSink(sink);
- // forward single event messages
- simulation.bindStatement("select B.* from pattern [every (A=LightSwitchEventMessage(enabled=true) -> B=LightSwitchEventMessage(enabled=false))]", sink);
+ // forward single event messages
+ String epl = "select B.* from pattern [every (A=LightSwitchEventMessage(enabled=true) -> B=LightSwitchEventMessage(enabled=false))]";
+ simulation.bindStatement(new ByteArrayInputStream(epl.getBytes()), sink);
- // start simulation
- simulation.singleRun();
+ // start simulation
+ simulation.singleRun();
- // display status
- printStatus();
+ // display status
+ printStatus();
- // evaluate results
- EventMessage lastEventMessage = context.getAttachment(EventMessage.class);
- assertNotNull(lastEventMessage);
- assertEquals(false, lastEventMessage.getProperty("enabled"));
- }
+ // 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"));
- }
+ 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(
+ public void testDetectLightSwitchFailure()
+ {
+ // associate a source factory
+ source.setEventMessageFactory(
new EventMessageFactory()
{
- private boolean lastState;
+ private boolean lastState;
- public Object createEventMessage(SimulationContext context)
- {
- LightSwitchEventMessage message = null;
+ public Object createEventMessage(SimulationContext context)
+ {
+ LightSwitchEventMessage message = null;
- double d = context.getMeasurement("dispatched").getCurrent();
- if(d!=3)
- {
- // create a regular light switch condition
- message = new LightSwitchEventMessage(lastState);
- }
- else
- {
- // create an error condition: two times same enabled value
- message = new LightSwitchEventMessage(!lastState);
- }
+ double d = context.getMeasurement("dispatched").getCurrent();
+ if (d != 3)
+ {
+ // create a regular light switch condition
+ message = new LightSwitchEventMessage(lastState);
+ }
+ else
+ {
+ // create an error condition: two times same enabled value
+ message = new LightSwitchEventMessage(!lastState);
+ }
- lastState = !lastState;
- context.getMeasurement("dispatched").increment();
- return message;
- }
+ lastState = !lastState;
+ context.getMeasurement("dispatched").increment();
+ return message;
+ }
}
- );
+ );
- // associate a sink handler
- sink.setEventHandler(
+ // 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]);
- }
+ public void handle(EventMessage[] events, SimulationContext context)
+ {
+ context.getMeasurement("processed").increment();
+ context.addAttachment(EventMessage.class, events[0]);
+ }
}
- );
+ );
- simulation.addSource(source);
- simulation.addSink(sink);
+ 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=LightSwitchEventMessage(enabled=false) -> B=LightSwitchEventMessage(enabled=false))]", sink);
+ // forward single event messages
+ String epl = "select A.enabled as firstEnabled, B.enabled as secondEnabled " +
+ "from pattern [every (A=LightSwitchEventMessage(enabled=false) -> B=LightSwitchEventMessage(enabled=false))]";
+ simulation.bindStatement(new ByteArrayInputStream(epl.getBytes()), sink);
- // start simulation
- simulation.singleRun();
+ // start simulation
+ simulation.singleRun();
- // display status
- printStatus();
+ // display status
+ printStatus();
- // evaluate results
- EventMessage lastEventMessage = context.getAttachment(EventMessage.class);
- assertNotNull(lastEventMessage);
- assertEquals(false, lastEventMessage.getProperty("firstEnabled"));
- assertEquals(false, lastEventMessage.getProperty("secondEnabled"));
+ // evaluate results
+ EventMessage lastEventMessage = context.getAttachment(EventMessage.class);
+ assertNotNull(lastEventMessage);
+ assertEquals(false, lastEventMessage.getProperty("firstEnabled"));
+ assertEquals(false, lastEventMessage.getProperty("secondEnabled"));
- }
+ }
}
Modified: sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/simulation/SensorEventMessage.java
===================================================================
--- sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/simulation/SensorEventMessage.java 2009-07-14 12:23:58 UTC (rev 660)
+++ sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/simulation/SensorEventMessage.java 2009-07-15 08:39:59 UTC (rev 661)
@@ -26,34 +26,34 @@
*/
public class SensorEventMessage
{
- private String source;
- private double surveyValue;
- private double simTime;
+ private String source;
+ private double surveyValue;
+ private double simTime;
- public SensorEventMessage(String source, double surveyValue, double simTime)
- {
- this.source = source;
- this.surveyValue = surveyValue;
- this.simTime = simTime;
- }
+ public SensorEventMessage(String source, double surveyValue, double simTime)
+ {
+ this.source = source;
+ this.surveyValue = surveyValue;
+ this.simTime = simTime;
+ }
- public String getSource()
- {
- return source;
- }
+ public String getSource()
+ {
+ return source;
+ }
- public double getSurveyValue()
- {
- return surveyValue;
- }
+ public double getSurveyValue()
+ {
+ return surveyValue;
+ }
- public double getSimTime()
- {
- return simTime;
- }
+ public double getSimTime()
+ {
+ return simTime;
+ }
- public String toString()
- {
- return "[@"+simTime+": "+source+"->"+surveyValue+"]";
- }
+ public String toString()
+ {
+ return "[@" + simTime + ": " + source + "->" + surveyValue + "]";
+ }
}
Modified: sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/simulation/SensorMessageFactory.java
===================================================================
--- sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/simulation/SensorMessageFactory.java 2009-07-14 12:23:58 UTC (rev 660)
+++ sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/simulation/SensorMessageFactory.java 2009-07-15 08:39:59 UTC (rev 661)
@@ -21,9 +21,9 @@
*/
package org.jboss.test.sam.simulation;
+import org.javasim.streams.ExponentialStream;
import org.jboss.sam.simulation.EventMessageFactory;
import org.jboss.sam.simulation.SimulationContext;
-import org.javasim.streams.ExponentialStream;
import java.io.IOException;
@@ -32,23 +32,23 @@
*/
public class SensorMessageFactory implements EventMessageFactory
{
- private ExponentialStream STime = new ExponentialStream(1,5);
+ private ExponentialStream STime = new ExponentialStream(1, 5);
- public Object createEventMessage(SimulationContext context)
- {
- context.getMeasurement("numDispatched").increment();
- return new SensorEventMessage("source-A", getSurveyValue(), context.getCurrentSimulationTime() );
- }
+ public Object createEventMessage(SimulationContext context)
+ {
+ context.getMeasurement("numDispatched").increment();
+ return new SensorEventMessage("source-A", getSurveyValue(), context.getCurrentSimulationTime());
+ }
- public double getSurveyValue()
- {
- try
- {
- return STime.getNumber();
- }
- catch (IOException e)
- {
- return 0.0;
- }
- }
+ public double getSurveyValue()
+ {
+ try
+ {
+ return STime.getNumber();
+ }
+ catch (IOException e)
+ {
+ return 0.0;
+ }
+ }
}
Modified: sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/simulation/SimulationTestCase.java
===================================================================
--- sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/simulation/SimulationTestCase.java 2009-07-14 12:23:58 UTC (rev 660)
+++ sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/simulation/SimulationTestCase.java 2009-07-15 08:39:59 UTC (rev 661)
@@ -34,59 +34,58 @@
*/
public class SimulationTestCase extends TestCase
{
- public void testSimulationAPI()
- {
- // config
- Properties config = new Properties();
- config.put(EventSimulation.TOTAL_SIM_TIME, 60.00);
+ public void testSimulationAPI()
+ {
+ // config
+ Properties config = new Properties();
+ config.put(EventSimulation.TOTAL_SIM_TIME, 60.00);
- // init
- EventSimulation simulation = EventSimulation.bootstrap(config,
+ // init
+ EventSimulation simulation = EventSimulation.bootstrap(config,
Thread.currentThread().getContextClassLoader().getResource("simulation/sam-cfg.xml")
- );
+ );
- // shared between all entities
- SimulationContext context = simulation.getContext();
+ // shared between all entities
+ SimulationContext context = simulation.getContext();
- // create an event source and associate a message factory
- EventSourceEntity source = new EventSourceEntity("EventSource_A", 0.10);
- source.setEventMessageFactory(
- new EventMessageFactory()
- {
- public Object createEventMessage(SimulationContext context)
- {
- return new SensorEventMessage("source-A", 12.00, context.getCurrentSimulationTime() );
- }
- }
- );
-
- // create an event sink and associate handler
- EventSinkEntity sink = new EventSinkEntity("EventSink_B");
- sink.setEventHandler(
- new EventSinkHandler()
- {
- public void handle(EventMessage[] events, SimulationContext context)
- {
- context.addAttachment(EventMessage.class, events[0]);
- }
- }
- );
+ // create an event source and associate a message factory
+ EventSourceEntity source = new EventSourceEntity("EventSource_A", 0.10);
+ source.setEventMessageFactory(
+ new EventMessageFactory()
+ {
+ public Object createEventMessage(SimulationContext context)
+ {
+ return new SensorEventMessage("source-A", 12.00, context.getCurrentSimulationTime());
+ }
+ }
+ );
- simulation.addSource(source);
- simulation.addSink(sink);
+ // create an event sink and associate handler
+ EventSinkEntity sink = new EventSinkEntity("EventSink_B");
+ sink.setEventHandler(
+ new EventSinkHandler()
+ {
+ public void handle(EventMessage[] events, SimulationContext context)
+ {
+ context.addAttachment(EventMessage.class, events[0]);
+ }
+ }
+ );
- // DRL
- String epl = EventSimulation.getDRLFromResource("simulation/test.drl");
+ simulation.addSource(source);
+ simulation.addSink(sink);
- // forward single event messages
- simulation.bindStatement(epl, sink);
+ // DRL
+ // forward single event messages
+ simulation.bindStatement(
+ EventSimulation.loadDRL("simulation/test.drl"), sink);
- // start simulation
- simulation.singleRun();
+ // start simulation
+ simulation.singleRun();
- // evaluate results
- EventMessage lastEventMessage = context.getAttachment(EventMessage.class);
- assertNotNull("No event reveived", lastEventMessage);
- assertEquals(12.00, lastEventMessage.getProperty("surveyValue"));
- }
+ // evaluate results
+ EventMessage lastEventMessage = context.getAttachment(EventMessage.class);
+ assertNotNull("No event reveived", lastEventMessage);
+ assertEquals(12.00, lastEventMessage.getProperty("surveyValue"));
+ }
}
Modified: sam/trunk/modules/sim/src/test/resources/simulation/sam-cfg.xml
===================================================================
--- sam/trunk/modules/sim/src/test/resources/simulation/sam-cfg.xml 2009-07-14 12:23:58 UTC (rev 660)
+++ sam/trunk/modules/sim/src/test/resources/simulation/sam-cfg.xml 2009-07-15 08:39:59 UTC (rev 661)
@@ -3,14 +3,14 @@
domain="http://org.jboss.sam/test/database"
xmlns:ns2="http://org.jboss.sam/08/2008/">
- <properties/>
+ <properties/>
- <database-references/>
+ <database-references/>
- <inputs/>
+ <inputs/>
- <outputs/>
+ <outputs/>
- <statements/>
+ <statements/>
</ns2:processingNode>
\ No newline at end of file
17 years
Overlord SVN: r660 - in sam/trunk: modules/core and 13 other directories.
by overlord-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-07-14 08:23:58 -0400 (Tue, 14 Jul 2009)
New Revision: 660
Added:
sam/trunk/SAMM.ipr
sam/trunk/SAMM.iws
sam/trunk/modules/core/core.iml
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DefaultCallback.java
sam/trunk/modules/core/src/test/java/org/jboss/test/sam/drools/StandaloneTestCase.java
sam/trunk/modules/core/src/test/resources/drools/standalone.drl
sam/trunk/modules/core/src/test/resources/drools/stream-forward.drl
sam/trunk/modules/core/src/test/resources/drools/stream-input.drl
sam/trunk/modules/sim/sim.iml
sam/trunk/toplevel.iml
Removed:
sam/trunk/modules/core/src/test/java/org/jboss/test/sam/adapter/
sam/trunk/modules/core/src/test/resources/drools/forward.drl
sam/trunk/modules/core/src/test/resources/drools/simple.drl
Modified:
sam/trunk/modules/core/pom.xml
sam/trunk/modules/core/src/main/java/org/jboss/sam/EventProcessor.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/StreamInput.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/Configurator.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMDispatcher.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMStreamRegistry.java
sam/trunk/modules/core/src/test/java/org/jboss/test/sam/SamTestSetup.java
sam/trunk/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java
sam/trunk/modules/core/src/test/java/org/jboss/test/sam/drools/ApiTestCase.java
sam/trunk/modules/core/src/test/resources/database/triggerPull.drl
sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java
sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java
sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/simulation/SimulationTestCase.java
sam/trunk/modules/sim/src/test/resources/simulation/test.drl
Log:
Force stream binding. Fix test cases. Simulation impl. still requires review
Added: sam/trunk/SAMM.ipr
===================================================================
--- sam/trunk/SAMM.ipr (rev 0)
+++ sam/trunk/SAMM.ipr 2009-07-14 12:23:58 UTC (rev 660)
@@ -0,0 +1,336 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4" relativePaths="false">
+ <component name="AntConfiguration">
+ <defaultAnt bundledAnt="true" />
+ </component>
+ <component name="BuildJarProjectSettings">
+ <option name="BUILD_JARS_ON_MAKE" value="false" />
+ </component>
+ <component name="CodeStyleProjectProfileManger">
+ <option name="PROJECT_PROFILE" />
+ <option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
+ </component>
+ <component name="CodeStyleSettingsManager">
+ <option name="PER_PROJECT_SETTINGS" />
+ <option name="USE_PER_PROJECT_SETTINGS" value="false" />
+ </component>
+ <component name="CompilerConfiguration">
+ <option name="DEFAULT_COMPILER" value="Javac" />
+ <option name="DEPLOY_AFTER_MAKE" value="0" />
+ <resourceExtensions>
+ <entry name=".+\.(properties|xml|html|dtd|tld)" />
+ <entry name=".+\.(gif|png|jpeg|jpg)" />
+ </resourceExtensions>
+ <wildcardResourcePatterns>
+ <entry name="?*.properties" />
+ <entry name="?*.xml" />
+ <entry name="?*.gif" />
+ <entry name="?*.png" />
+ <entry name="?*.jpeg" />
+ <entry name="?*.jpg" />
+ <entry name="?*.html" />
+ <entry name="?*.dtd" />
+ <entry name="?*.tld" />
+ </wildcardResourcePatterns>
+ </component>
+ <component name="DataSourceManagerImpl" />
+ <component name="DependenciesAnalyzeManager">
+ <option name="myForwardDirection" value="false" />
+ </component>
+ <component name="DependencyValidationManager" />
+ <component name="EclipseCompilerSettings">
+ <option name="DEBUGGING_INFO" value="true" />
+ <option name="GENERATE_NO_WARNINGS" value="true" />
+ <option name="DEPRECATION" value="false" />
+ <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+ <option name="MAXIMUM_HEAP_SIZE" value="128" />
+ </component>
+ <component name="EclipseEmbeddedCompilerSettings">
+ <option name="DEBUGGING_INFO" value="true" />
+ <option name="GENERATE_NO_WARNINGS" value="true" />
+ <option name="DEPRECATION" value="false" />
+ <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+ <option name="MAXIMUM_HEAP_SIZE" value="128" />
+ </component>
+ <component name="EntryPointsManager">
+ <entry_points />
+ </component>
+ <component name="ExportToHTMLSettings">
+ <option name="PRINT_LINE_NUMBERS" value="false" />
+ <option name="OPEN_IN_BROWSER" value="false" />
+ <option name="OUTPUT_DIRECTORY" />
+ </component>
+ <component name="GUI Designer component loader factory" />
+ <component name="IdProvider" IDEtalkID="1E46A79AE09FDDA36C7AA36A15233C1A" />
+ <component name="InspectionProjectProfileManager">
+ <option name="PROJECT_PROFILE" value="Project Default" />
+ <option name="USE_PROJECT_LEVEL_SETTINGS" value="false" />
+ <scopes />
+ <profiles>
+ <profile version="1.0" is_locked="false">
+ <option name="myName" value="Project Default" />
+ <option name="myLocal" value="false" />
+ <used_levels>
+ <error>
+ <option name="myName" value="ERROR" />
+ <option name="myVal" value="400" />
+ </error>
+ <warning>
+ <option name="myName" value="WARNING" />
+ <option name="myVal" value="300" />
+ </warning>
+ <information>
+ <option name="myName" value="INFO" />
+ <option name="myVal" value="200" />
+ </information>
+ <server>
+ <option name="myName" value="SERVER PROBLEM" />
+ <option name="myVal" value="100" />
+ </server>
+ </used_levels>
+ </profile>
+ </profiles>
+ </component>
+ <component name="JavacSettings">
+ <option name="DEBUGGING_INFO" value="true" />
+ <option name="GENERATE_NO_WARNINGS" value="false" />
+ <option name="DEPRECATION" value="true" />
+ <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+ <option name="MAXIMUM_HEAP_SIZE" value="128" />
+ </component>
+ <component name="JavadocGenerationManager">
+ <option name="OUTPUT_DIRECTORY" />
+ <option name="OPTION_SCOPE" value="protected" />
+ <option name="OPTION_HIERARCHY" value="true" />
+ <option name="OPTION_NAVIGATOR" value="true" />
+ <option name="OPTION_INDEX" value="true" />
+ <option name="OPTION_SEPARATE_INDEX" value="true" />
+ <option name="OPTION_DOCUMENT_TAG_USE" value="false" />
+ <option name="OPTION_DOCUMENT_TAG_AUTHOR" value="false" />
+ <option name="OPTION_DOCUMENT_TAG_VERSION" value="false" />
+ <option name="OPTION_DOCUMENT_TAG_DEPRECATED" value="true" />
+ <option name="OPTION_DEPRECATED_LIST" value="true" />
+ <option name="OTHER_OPTIONS" value="" />
+ <option name="HEAP_SIZE" />
+ <option name="LOCALE" />
+ <option name="OPEN_IN_BROWSER" value="true" />
+ </component>
+ <component name="JikesSettings">
+ <option name="JIKES_PATH" value="" />
+ <option name="DEBUGGING_INFO" value="true" />
+ <option name="DEPRECATION" value="true" />
+ <option name="GENERATE_NO_WARNINGS" value="false" />
+ <option name="IS_EMACS_ERRORS_MODE" value="true" />
+ <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+ </component>
+ <component name="LogConsolePreferences">
+ <option name="FILTER_ERRORS" value="false" />
+ <option name="FILTER_WARNINGS" value="false" />
+ <option name="FILTER_INFO" value="true" />
+ <option name="CUSTOM_FILTER" />
+ </component>
+ <component name="Maven Reloaded">
+ <option name="config">
+ <value>
+ <option name="pluginEnabled" value="false" />
+ <option name="offlineModeEnabled" value="false" />
+ <option name="updateClasspathsEnabled" value="true" />
+ <option name="sortDependenciesEnabled" value="false" />
+ <option name="removeDuplicateDependenciesEnabled" value="false" />
+ <option name="respondToPomChangesEnabled" value="true" />
+ <option name="manageSourceRootsEnabled" value="true" />
+ <option name="manageModuleInterdependenciesEnabled" value="true" />
+ <option name="downloadSourcesEnabled" value="false" />
+ <option name="downloadJavadocEnabled" value="false" />
+ <option name="generateSourcesEnabled" value="false" />
+ <option name="settingsPath" value="/Users/hbraun/.m2/settings.xml" />
+ <option name="searchFilter" value="" />
+ <option name="disabledPoms">
+ <value>
+ <collection type="java.util.TreeSet" />
+ </value>
+ </option>
+ <option name="moduleInterDependencies">
+ <value>
+ <map type="java.util.TreeMap">
+ <entry>
+ <value>
+ <collection type="java.util.TreeSet">
+ <entry type="java.lang.String" value="core" />
+ </collection>
+ </value>
+ <key type="java.lang.String" value="fx" />
+ </entry>
+ <entry>
+ <value>
+ <collection type="java.util.TreeSet">
+ <entry type="java.lang.String" value="toplevel" />
+ </collection>
+ </value>
+ <key type="java.lang.String" value="sim" />
+ </entry>
+ </map>
+ </value>
+ </option>
+ <option name="logLevel" value="1" />
+ </value>
+ </option>
+ </component>
+ <component name="Palette2">
+ <group name="Swing">
+ <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
+ </item>
+ <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
+ </item>
+ <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
+ </item>
+ <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true">
+ <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
+ </item>
+ <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
+ <initial-values>
+ <property name="text" value="Button" />
+ </initial-values>
+ </item>
+ <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+ <initial-values>
+ <property name="text" value="RadioButton" />
+ </initial-values>
+ </item>
+ <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
+ <initial-values>
+ <property name="text" value="CheckBox" />
+ </initial-values>
+ </item>
+ <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
+ <initial-values>
+ <property name="text" value="Label" />
+ </initial-values>
+ </item>
+ <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+ <preferred-size width="150" height="-1" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+ <preferred-size width="150" height="-1" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
+ <preferred-size width="150" height="-1" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
+ </item>
+ <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
+ <preferred-size width="150" height="50" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+ <preferred-size width="200" height="200" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
+ <preferred-size width="200" height="200" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+ </item>
+ <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
+ </item>
+ <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
+ </item>
+ <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
+ </item>
+ <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
+ <preferred-size width="-1" height="20" />
+ </default-constraints>
+ </item>
+ <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false">
+ <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
+ </item>
+ <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false">
+ <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
+ </item>
+ </group>
+ </component>
+ <component name="ProjectModuleManager">
+ <modules>
+ <module fileurl="file://$PROJECT_DIR$/modules/core/core.iml" filepath="$PROJECT_DIR$/modules/core/core.iml" />
+ <module fileurl="file:///Users/hbraun/dev/env/drools-5.0-examples/drools-examples/drools-examples-fusion/drools-examples-fusion.iml" filepath="/Users/hbraun/dev/env/drools-5.0-examples/drools-examples/drools-examples-fusion/drools-examples-fusion.iml" />
+ <module fileurl="file://$PROJECT_DIR$/modules/sim/sim.iml" filepath="$PROJECT_DIR$/modules/sim/sim.iml" />
+ <module fileurl="file://$PROJECT_DIR$/toplevel.iml" filepath="$PROJECT_DIR$/toplevel.iml" />
+ </modules>
+ </component>
+ <component name="ProjectRootManager" version="2" assert-keyword="true" jdk-15="true" project-jdk-name="1.5" project-jdk-type="JavaSDK">
+ <output url="file://$PROJECT_DIR$/classes" />
+ </component>
+ <component name="ProjectRunConfigurationManager" />
+ <component name="RmicSettings">
+ <option name="IS_EANABLED" value="false" />
+ <option name="DEBUGGING_INFO" value="true" />
+ <option name="GENERATE_NO_WARNINGS" value="false" />
+ <option name="GENERATE_IIOP_STUBS" value="false" />
+ <option name="ADDITIONAL_OPTIONS_STRING" value="" />
+ </component>
+ <component name="StarteamVcsAdapter" />
+ <component name="VssVcs" />
+ <component name="com.intellij.jsf.UserDefinedFacesConfigs">
+ <option name="USER_DEFINED_CONFIGS">
+ <value>
+ <list size="0" />
+ </value>
+ </option>
+ </component>
+ <component name="libraryTable" />
+ <component name="uidesigner-configuration">
+ <option name="INSTRUMENT_CLASSES" value="true" />
+ <option name="COPY_FORMS_RUNTIME_TO_OUTPUT" value="true" />
+ <option name="DEFAULT_LAYOUT_MANAGER" value="GridLayoutManager" />
+ </component>
+ <UsedPathMacros />
+</project>
+
Added: sam/trunk/SAMM.iws
===================================================================
--- sam/trunk/SAMM.iws (rev 0)
+++ sam/trunk/SAMM.iws 2009-07-14 12:23:58 UTC (rev 660)
@@ -0,0 +1,1503 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4" relativePaths="false">
+ <component name="BookmarkManager" />
+ <component name="ChangeBrowserSettings">
+ <option name="MAIN_SPLITTER_PROPORTION" value="0.3" />
+ <option name="MESSAGES_SPLITTER_PROPORTION" value="0.8" />
+ <option name="USE_DATE_BEFORE_FILTER" value="false" />
+ <option name="USE_DATE_AFTER_FILTER" value="false" />
+ <option name="USE_CHANGE_BEFORE_FILTER" value="false" />
+ <option name="USE_CHANGE_AFTER_FILTER" value="false" />
+ <option name="DATE_BEFORE" value="" />
+ <option name="DATE_AFTER" value="" />
+ <option name="CHANGE_BEFORE" value="" />
+ <option name="CHANGE_AFTER" value="" />
+ <option name="USE_USER_FILTER" value="false" />
+ <option name="USER" value="" />
+ </component>
+ <component name="ChangeListManager">
+ <list default="true" name="Default" comment="">
+ <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/test/resources/drools/simple.drl" afterPath="" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/adapter/invm/Alert.java" afterPath="" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/simulation/SimulationTestCase.java" afterPath="$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/simulation/SimulationTestCase.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/pom.xml" afterPath="$PROJECT_DIR$/modules/core/pom.xml" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/test/resources/drools/standalone.drl" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/StreamInput.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/StreamInput.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/drools/ApiTestCase.java" afterPath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/drools/ApiTestCase.java" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/test/resources/drools/forward.drl" afterPath="" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/test/resources/drools/stream-input.drl" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/test/resources/drools/stream-forward.drl" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/Configurator.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/config/Configurator.java" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/adapter" afterPath="" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/drools/StandaloneTestCase.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/test/resources/simulation/test.drl" afterPath="$PROJECT_DIR$/modules/sim/src/test/resources/simulation/test.drl" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/SamTestSetup.java" afterPath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/SamTestSetup.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMDispatcher.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMDispatcher.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/test/resources/database/triggerPull.drl" afterPath="$PROJECT_DIR$/modules/core/src/test/resources/database/triggerPull.drl" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java" afterPath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java" afterPath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessor.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessor.java" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/adapter/invm/InVMAdapterTestCase.java" afterPath="" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java" afterPath="$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java" />
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMStreamRegistry.java" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMStreamRegistry.java" />
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DefaultCallback.java" />
+ <change type="DELETED" beforePath="$PROJECT_DIR$/modules/core/src/test/java/org/jboss/test/sam/adapter/invm" afterPath="" />
+ </list>
+ </component>
+ <component name="ChangeListSynchronizer" />
+ <component name="ChangesViewManager" flattened_view="true" />
+ <component name="CheckinPanelState" />
+ <component name="Commander">
+ <leftPanel />
+ <rightPanel />
+ <splitter proportion="0.5" />
+ </component>
+ <component name="CompilerWorkspaceConfiguration">
+ <option name="COMPILE_IN_BACKGROUND" value="false" />
+ <option name="AUTO_SHOW_ERRORS_IN_EDITOR" value="true" />
+ <option name="CLOSE_MESSAGE_VIEW_IF_SUCCESS" value="true" />
+ <option name="COMPILE_DEPENDENT_FILES" value="false" />
+ <option name="CLEAR_OUTPUT_DIRECTORY" value="false" />
+ <option name="ASSERT_NOT_NULL" value="true" />
+ </component>
+ <component name="CoverageDataManager" />
+ <component name="Cvs2Configuration">
+ <option name="PRUNE_EMPTY_DIRECTORIES" value="true" />
+ <option name="MERGING_MODE" value="0" />
+ <option name="MERGE_WITH_BRANCH1_NAME" value="HEAD" />
+ <option name="MERGE_WITH_BRANCH2_NAME" value="HEAD" />
+ <option name="RESET_STICKY" value="false" />
+ <option name="CREATE_NEW_DIRECTORIES" value="true" />
+ <option name="DEFAULT_TEXT_FILE_SUBSTITUTION" value="kv" />
+ <option name="PROCESS_UNKNOWN_FILES" value="false" />
+ <option name="PROCESS_DELETED_FILES" value="false" />
+ <option name="PROCESS_IGNORED_FILES" value="false" />
+ <option name="RESERVED_EDIT" value="false" />
+ <option name="CHECKOUT_DATE_OR_REVISION_SETTINGS">
+ <value>
+ <option name="BRANCH" value="" />
+ <option name="DATE" value="" />
+ <option name="USE_BRANCH" value="false" />
+ <option name="USE_DATE" value="false" />
+ </value>
+ </option>
+ <option name="UPDATE_DATE_OR_REVISION_SETTINGS">
+ <value>
+ <option name="BRANCH" value="" />
+ <option name="DATE" value="" />
+ <option name="USE_BRANCH" value="false" />
+ <option name="USE_DATE" value="false" />
+ </value>
+ </option>
+ <option name="SHOW_CHANGES_REVISION_SETTINGS">
+ <value>
+ <option name="BRANCH" value="" />
+ <option name="DATE" value="" />
+ <option name="USE_BRANCH" value="false" />
+ <option name="USE_DATE" value="false" />
+ </value>
+ </option>
+ <option name="SHOW_OUTPUT" value="false" />
+ <option name="ADD_WATCH_INDEX" value="0" />
+ <option name="REMOVE_WATCH_INDEX" value="0" />
+ <option name="UPDATE_KEYWORD_SUBSTITUTION" />
+ <option name="MAKE_NEW_FILES_READONLY" value="false" />
+ <option name="SHOW_CORRUPTED_PROJECT_FILES" value="0" />
+ <option name="TAG_AFTER_PROJECT_COMMIT" value="false" />
+ <option name="OVERRIDE_EXISTING_TAG_FOR_PROJECT" value="true" />
+ <option name="TAG_AFTER_PROJECT_COMMIT_NAME" value="" />
+ <option name="CLEAN_COPY" value="false" />
+ </component>
+ <component name="DaemonCodeAnalyzer">
+ <disable_hints />
+ </component>
+ <component name="DebuggerManager">
+ <line_breakpoints>
+ <breakpoint url="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java" line="251" class="Class at DroolsEventProcessorImpl.java:251" package="org.jboss.sam.internal.drools">
+ <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$/modules/core/src/main/java/org/jboss/sam/internal/drools/StreamOutputAdapter.java" line="48" class="org.jboss.sam.internal.drools.StreamOutputAdapter" package="org.jboss.sam.internal.drools">
+ <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$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java" line="131" 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>
+ </line_breakpoints>
+ <breakpoint_any>
+ <breakpoint>
+ <option name="NOTIFY_CAUGHT" value="true" />
+ <option name="NOTIFY_UNCAUGHT" value="true" />
+ <option name="ENABLED" value="false" />
+ <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>
+ <option name="NOTIFY_CAUGHT" value="true" />
+ <option name="NOTIFY_UNCAUGHT" value="true" />
+ <option name="ENABLED" value="false" />
+ <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_any>
+ <breakpoint_rules />
+ <ui_properties>
+ <property name="exception_breakpoints_flattenPackages" value="true" />
+ <property name="line_breakpoints_groupByClasses" value="true" />
+ <property name="exception_breakpoints_groupByMethods" value="false" />
+ <property name="method_breakpoints_viewId" value="TABLE" />
+ <property name="line_breakpoints_viewId" value="TABLE" />
+ <property name="exception_breakpoints_groupByClasses" value="true" />
+ <property name="method_breakpoints_groupByMethods" value="false" />
+ <property name="field_breakpoints_flattenPackages" value="true" />
+ <property name="line_breakpoints_flattenPackages" value="true" />
+ <property name="exception_breakpoints_viewId" value="TABLE" />
+ <property name="field_breakpoints_groupByClasses" value="true" />
+ <property name="method_breakpoints_flattenPackages" value="true" />
+ <property name="field_breakpoints_viewId" value="TABLE" />
+ <property name="line_breakpoints_groupByMethods" value="false" />
+ <property name="method_breakpoints_groupByClasses" value="true" />
+ <property name="field_breakpoints_groupByMethods" value="false" />
+ </ui_properties>
+ </component>
+ <component name="ErrorTreeViewConfiguration">
+ <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
+ <option name="HIDE_WARNINGS" value="false" />
+ </component>
+ <component name="FavoritesManager">
+ <favorites_list name="SAMM" />
+ </component>
+ <component name="FavoritesProjectViewPane">
+ <subPane subId="SAMM">
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" />
+ <option name="myItemType" value="com.intellij.ide.favoritesTreeView.FavoritesTreeNodeDescriptor" />
+ </PATH_ELEMENT>
+ </PATH>
+ </subPane>
+ </component>
+ <component name="FileEditorManager">
+ <leaf>
+ <file leaf-file-name="EventSourceEntity.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="47" column="14" selection-start="1805" selection-end="1805" vertical-scroll-proportion="-0.9306931">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="DroolsEventProcessorImpl.java" pinned="false" current="true" current-in-tab="true">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="202" column="51" selection-start="6140" selection-end="6162" vertical-scroll-proportion="0.09079445">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="EventSimulation.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="120" column="47" selection-start="4643" selection-end="4643" vertical-scroll-proportion="0.33291298">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="SimulationTestCase.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/simulation/SimulationTestCase.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="63" column="43" selection-start="2373" selection-end="2373" vertical-scroll-proportion="0.33663365">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </file>
+ <file leaf-file-name="EventSinkEntity.java" pinned="false" current="false" current-in-tab="false">
+ <entry file="file://$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSinkEntity.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="24" column="0" selection-start="1102" selection-end="1136" vertical-scroll-proportion="-1.1386138">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ </file>
+ </leaf>
+ </component>
+ <component name="FindManager">
+ <FindUsagesManager>
+ <setting name="OPEN_NEW_TAB" value="false" />
+ </FindUsagesManager>
+ </component>
+ <component name="HierarchyBrowserManager">
+ <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
+ <option name="SORT_ALPHABETICALLY" value="false" />
+ <option name="HIDE_CLASSES_WHERE_METHOD_NOT_IMPLEMENTED" value="false" />
+ </component>
+ <component name="InspectionManager">
+ <option name="AUTOSCROLL_TO_SOURCE" value="false" />
+ <option name="SPLITTER_PROPORTION" value="0.5" />
+ <option name="GROUP_BY_SEVERITY" value="false" />
+ <option name="FILTER_RESOLVED_ITEMS" value="true" />
+ <option name="ANALYZE_TEST_SOURCES" value="true" />
+ <option name="SHOW_DIFF_WITH_PREVIOUS_RUN" value="false" />
+ <option name="SCOPE_TYPE" value="1" />
+ <option name="CUSTOM_SCOPE_NAME" value="" />
+ <option name="SHOW_ONLY_DIFF" value="false" />
+ <option name="myCurrentProfileName" value="Default" />
+ </component>
+ <component name="J2EEProjectPane" />
+ <component name="JspContextManager" />
+ <component name="ModuleEditorState">
+ <option name="LAST_EDITED_MODULE_NAME" />
+ <option name="LAST_EDITED_TAB_NAME" />
+ </component>
+ <component name="NamedScopeManager" />
+ <component name="PackagesPane">
+ <subPane>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewModuleNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="core" />
+ <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="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="core" />
+ <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="internal" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PackageElementNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ </subPane>
+ </component>
+ <component name="PerforceChangeBrowserSettings">
+ <option name="USE_CLIENT_FILTER" value="true" />
+ <option name="CLIENT" value="" />
+ </component>
+ <component name="PerforceDirect.Settings">
+ <option name="useP4CONFIG" value="true" />
+ <option name="port" value="<perforce_server>:1666" />
+ <option name="client" value="" />
+ <option name="user" value="" />
+ <option name="passwd" value="" />
+ <option name="showCmds" value="false" />
+ <option name="useNativeApi" value="false" />
+ <option name="pathToExec" value="p4" />
+ <option name="useCustomPathToExec" value="false" />
+ <option name="SYNC_FORCE" value="false" />
+ <option name="SYNC_RUN_RESOLVE" value="true" />
+ <option name="REVERT_UNCHANGED_FILES" value="true" />
+ <option name="CHARSET" value="none" />
+ <option name="SHOW_BRANCHES_HISTORY" value="true" />
+ <option name="ENABLED" value="true" />
+ <option name="USE_LOGIN" value="false" />
+ <option name="LOGIN_SILENTLY" value="false" />
+ <option name="INTEGRATE_RUN_RESOLVE" value="true" />
+ <option name="INTEGRATE_REVERT_UNCHANGED" value="true" />
+ <option name="SERVER_TIMEOUT" value="20000" />
+ </component>
+ <component name="ProjectLevelVcsManager">
+ <OptionsSetting value="true" id="Add" />
+ <OptionsSetting value="true" id="Remove" />
+ <OptionsSetting value="true" id="Checkin" />
+ <OptionsSetting value="true" id="Checkout" />
+ <OptionsSetting value="true" id="Update" />
+ <OptionsSetting value="true" id="Status" />
+ <OptionsSetting value="true" id="Edit" />
+ <OptionsSetting value="true" id="Undo Check Out" />
+ <OptionsSetting value="true" id="Compare with SourceSafe Version" />
+ <OptionsSetting value="true" id="Get Latest Version" />
+ <ConfirmationsSetting value="0" id="Add" />
+ <ConfirmationsSetting value="0" id="Remove" />
+ </component>
+ <component name="ProjectPane">
+ <subPane>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="toplevel" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src/test/resources" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src/test/resources/simulation" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src/test/resources" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/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$/modules/sim/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$/modules/sim/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$/modules/sim/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$/modules/sim/src/test/java/org/jboss/test/sam" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/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$/modules/sim/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$/modules/sim/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$/modules/sim/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$/modules/sim/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$/modules/sim/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="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src/main" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/src/main" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/sim/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$/modules/sim/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$/modules/sim/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$/modules/sim/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$/modules/sim/src/main/java/org/jboss/sam/simulation" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/test/resources" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/test/resources/drools" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/test/resources" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/src/test/java/org/jboss/test/sam" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/src/test/java/org/jboss/test/sam/drools" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/src/test/java/org/jboss/test/sam/config" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/test" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/main" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/main/resources" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/main" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/src/main/java/org/jboss/sam" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/main" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/src/main/java/org/jboss/sam/internal" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/main" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/src/main/java/org/jboss/sam/internal" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ <PATH>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="SAMM.ipr" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/src/main" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ <PATH_ELEMENT>
+ <option name="myItemId" value="PsiDirectory:$PROJECT_DIR$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/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$/modules/core/src/main/java/org/jboss/sam/config" />
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
+ </PATH_ELEMENT>
+ </PATH>
+ </subPane>
+ </component>
+ <component name="ProjectReloadState">
+ <option name="STATE" value="0" />
+ </component>
+ <component name="ProjectView">
+ <navigator currentView="ProjectPane" proportions="0.11111111" version="1" splitterProportion="0.5">
+ <flattenPackages />
+ <showMembers />
+ <showModules />
+ <showLibraryContents />
+ <hideEmptyPackages ProjectPane="false" />
+ <abbreviatePackageNames />
+ <showStructure PackagesPane="false" ProjectPane="false" Scope="false" Favorites="false" />
+ <autoscrollToSource />
+ <autoscrollFromSource />
+ <sortByType />
+ </navigator>
+ </component>
+ <component name="PropertiesComponent">
+ <property name="MemberChooser.copyJavadoc" value="false" />
+ <property name="GoToClass.includeLibraries" value="false" />
+ <property name="MemberChooser.showClasses" value="true" />
+ <property name="MemberChooser.sorted" value="false" />
+ <property name="RunManagerConfig.compileBeforeRunning" value="false" />
+ <property name="GoToFile.includeJavaFiles" value="false" />
+ <property name="GoToClass.toSaveIncludeLibraries" value="false" />
+ <property name="RunManagerConfig.showSettingsBeforeRunnig" value="false" />
+ </component>
+ <component name="ReadonlyStatusHandler">
+ <option name="SHOW_DIALOG" value="true" />
+ </component>
+ <component name="RecentsManager" />
+ <component name="RestoreUpdateTree" />
+ <component name="RunManager" selected="Remote.client">
+ <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" />
+ <option name="PROGRAM_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="" />
+ </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" />
+ <option name="ALTERNATIVE_JRE_PATH" />
+ <option name="PACKAGE_NAME" />
+ <option name="MAIN_CLASS_NAME" />
+ <option name="METHOD_NAME" />
+ <option name="TEST_OBJECT" value="class" />
+ <option name="VM_PARAMETERS" />
+ <option name="PARAMETERS" />
+ <option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
+ <option name="ADDITIONAL_CLASS_PATH" />
+ <option name="TEST_SEARCH_SCOPE">
+ <value defaultName="wholeProject" />
+ </option>
+ <method>
+ <option name="Make" value="true" />
+ </method>
+ </configuration>
+ <configuration default="false" name="client" 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" />
+ <RunnerSettings RunnerId="Debug">
+ <option name="DEBUG_PORT" value="5005" />
+ <option name="TRANSPORT" value="0" />
+ <option name="LOCAL" value="false" />
+ </RunnerSettings>
+ <ConfigurationWrapper RunnerId="Debug" />
+ <method>
+ <option name="Make" value="true" />
+ </method>
+ </configuration>
+ <configuration name="<template>" type="WebApp" default="true" selected="false">
+ <Host>localhost</Host>
+ <Port>5050</Port>
+ </configuration>
+ </component>
+ <component name="ScopeViewComponent">
+ <subPane subId="Project">
+ <PATH>
+ <PATH_ELEMENT USER_OBJECT="Root">
+ <option name="myItemId" value="" />
+ <option name="myItemType" value="" />
+ </PATH_ELEMENT>
+ </PATH>
+ </subPane>
+ </component>
+ <component name="SelectInManager" />
+ <component name="StarteamConfiguration">
+ <option name="SERVER" value="" />
+ <option name="PORT" value="49201" />
+ <option name="USER" value="" />
+ <option name="PASSWORD" value="" />
+ <option name="PROJECT" value="" />
+ <option name="VIEW" value="" />
+ <option name="ALTERNATIVE_WORKING_PATH" value="" />
+ <option name="LOCK_ON_CHECKOUT" value="false" />
+ <option name="UNLOCK_ON_CHECKIN" value="false" />
+ </component>
+ <component name="StructuralSearchPlugin" />
+ <component name="StructureViewFactory">
+ <option name="AUTOSCROLL_MODE" value="true" />
+ <option name="AUTOSCROLL_FROM_SOURCE" value="false" />
+ <option name="ACTIVE_ACTIONS" value="SHOW_INTERFACES,ALPHA_COMPARATOR" />
+ </component>
+ <component name="Struts Assistant">
+ <option name="showInputs" value="true" />
+ <option name="resources">
+ <value>
+ <option name="strutsPath" />
+ <option name="strutsHelp" />
+ </value>
+ </option>
+ <option name="selectedTaglibs" />
+ <option name="selectedTaglibs" />
+ <option name="myStrutsValidationEnabled" value="true" />
+ <option name="myTilesValidationEnabled" value="true" />
+ <option name="myValidatorValidationEnabled" value="true" />
+ <option name="myReportErrorsAsWarnings" value="true" />
+ </component>
+ <component name="SvnChangesBrowserSettings">
+ <option name="USE_AUTHOR_FIELD" value="true" />
+ <option name="AUTHOR" value="" />
+ <option name="LOCATION" value="" />
+ <option name="USE_PROJECT_SETTINGS" value="true" />
+ <option name="USE_ALTERNATE_LOCATION" value="false" />
+ </component>
+ <component name="SvnConfiguration">
+ <option name="USER" value="" />
+ <option name="PASSWORD" value="" />
+ <option name="PROCESS_UNRESOLVED" value="false" />
+ <option name="LAST_MERGED_REVISION" />
+ <option name="UPDATE_RUN_STATUS" value="false" />
+ <option name="UPDATE_RECURSIVELY" value="true" />
+ <option name="MERGE_DRY_RUN" value="false" />
+ <configuration useDefault="true">/Users/hbraun/.subversion</configuration>
+ </component>
+ <component name="TodoView" selected-index="0">
+ <todo-panel id="selected-file">
+ <are-packages-shown value="false" />
+ <are-modules-shown value="false" />
+ <flatten-packages value="false" />
+ <is-autoscroll-to-source value="true" />
+ </todo-panel>
+ <todo-panel id="all">
+ <are-packages-shown value="true" />
+ <are-modules-shown value="false" />
+ <flatten-packages value="false" />
+ <is-autoscroll-to-source value="true" />
+ </todo-panel>
+ </component>
+ <component name="ToolWindowManager">
+ <frame x="331" y="46" width="1320" height="955" extended-state="0" />
+ <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="CVS" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="14" />
+ <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="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="7" />
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.27773407" order="0" />
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32750583" order="1" />
+ <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.24862313" order="1" />
+ <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="9" />
+ <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="Module Dependencies" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="6" />
+ <window_info id="Dependency Viewer" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="10" />
+ <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="4" />
+ <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="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="11" />
+ <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="2" />
+ <window_info id="Maven" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="12" />
+ <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.24862313" order="2" />
+ <window_info id="File View" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="5" />
+ <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3986014" order="4" />
+ <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" order="0" />
+ <window_info id="IDEtalk Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" order="13" />
+ <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="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" />
+ <window_info id="EJB" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="3" />
+ <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" order="5" />
+ </layout>
+ </component>
+ <component name="VCS.FileViewConfiguration">
+ <option name="SELECTED_STATUSES" value="DEFAULT" />
+ <option name="SELECTED_COLUMNS" value="DEFAULT" />
+ <option name="SHOW_FILTERS" value="true" />
+ <option name="CUSTOMIZE_VIEW" value="true" />
+ <option name="SHOW_FILE_HISTORY_AS_TREE" value="true" />
+ </component>
+ <component name="VcsManagerConfiguration">
+ <option name="OFFER_MOVE_TO_ANOTHER_CHANGELIST_ON_PARTIAL_COMMIT" value="true" />
+ <option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="true" />
+ <option name="PERFORM_UPDATE_IN_BACKGROUND" value="false" />
+ <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="SAVE_LAST_COMMIT_MESSAGE" value="true" />
+ <option name="CHECKIN_DIALOG_SPLITTER_PROPORTION" value="0.8" />
+ <option name="OPTIMIZE_IMPORTS_BEFORE_PROJECT_COMMIT" value="false" />
+ <option name="REFORMAT_BEFORE_PROJECT_COMMIT" value="false" />
+ <option name="REFORMAT_BEFORE_FILE_COMMIT" value="false" />
+ <option name="FILE_HISTORY_DIALOG_COMMENTS_SPLITTER_PROPORTION" value="0.8" />
+ <option name="FILE_HISTORY_DIALOG_SPLITTER_PROPORTION" value="0.5" />
+ <option name="ERROR_OCCURED" value="false" />
+ <option name="ACTIVE_VCS_NAME" value="svn" />
+ <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" />
+ </component>
+ <component name="VssConfiguration">
+ <option name="CLIENT_PATH" value="" />
+ <option name="SRCSAFEINI_PATH" value="" />
+ <option name="USER_NAME" value="" />
+ <option name="PWD" value="" />
+ <option name="VSS_IS_INITIALIZED" value="true" />
+ <CheckoutOptions>
+ <option name="COMMENT" value="" />
+ <option name="DO_NOT_GET_LATEST_VERSION" value="false" />
+ <option name="REPLACE_WRITABLE" value="false" />
+ <option name="RECURSIVE" value="false" />
+ </CheckoutOptions>
+ <CheckinOptions>
+ <option name="COMMENT" value="" />
+ <option name="KEEP_CHECKED_OUT" value="false" />
+ <option name="RECURSIVE" value="false" />
+ </CheckinOptions>
+ <AddOptions>
+ <option name="STORE_ONLY_LATEST_VERSION" value="false" />
+ <option name="CHECK_OUT_IMMEDIATELY" value="false" />
+ <option name="FILE_TYPE" value="0" />
+ </AddOptions>
+ <UndocheckoutOptions>
+ <option name="MAKE_WRITABLE" value="false" />
+ <option name="REPLACE_LOCAL_COPY" value="0" />
+ <option name="RECURSIVE" value="false" />
+ </UndocheckoutOptions>
+ <GetOptions>
+ <option name="REPLACE_WRITABLE" value="0" />
+ <option name="MAKE_WRITABLE" value="false" />
+ <option name="ANSWER_NEGATIVELY" value="false" />
+ <option name="ANSWER_POSITIVELY" value="false" />
+ <option name="RECURSIVE" value="false" />
+ <option name="VERSION" />
+ </GetOptions>
+ <VssConfigurableExcludedFilesTag />
+ </component>
+ <component name="antWorkspaceConfiguration">
+ <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
+ <option name="FILTER_TARGETS" value="false" />
+ </component>
+ <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.52098763,0.5" version="1">
+ <option name="myPlainMode" value="false" />
+ <option name="myLastEditedConfigurable" value="core" />
+ </component>
+ <component name="com.intellij.profile.ui.ErrorOptionsConfigurable" proportions="" version="1">
+ <option name="myLastEditedConfigurable" />
+ </component>
+ <component name="editorHistoryManager">
+ <entry file="file://$PROJECT_DIR$/modules/core/src/test/resources/drools/stream-forward.drl">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="12" column="1" selection-start="81" selection-end="245" vertical-scroll-proportion="0.23762377">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/modules/core/src/test/resources/drools/standalone.drl">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="9" column="10" selection-start="113" selection-end="169" vertical-scroll-proportion="0.17821783">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/modules/sim/sim.iml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/StreamOutputAdapter.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="57" column="57" selection-start="1762" selection-end="1762" vertical-scroll-proportion="0.65346533">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file:///Users/hbraun/dev/env/drools-5.0-examples/drools-examples/drools-examples-fusion/src/main/java/org/drools/examples/broker/events/EventSource.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="24" column="17" selection-start="728" selection-end="728" vertical-scroll-proportion="0.17821783">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/EventProcessor.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="56" column="7" selection-start="1842" selection-end="1842" vertical-scroll-proportion="0.33291298">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/modules/sim/pom.xml">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="12" column="54" selection-start="479" selection-end="479" vertical-scroll-proportion="0.24211854">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMStreamRegistry.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="59" column="26" selection-start="2010" selection-end="2010" vertical-scroll-proportion="0.6860025">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMDispatcher.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="53" column="0" selection-start="1839" selection-end="1839" vertical-scroll-proportion="0.66582596">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/modules/sim/src/test/resources/simulation/test.drl">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="13" column="62" selection-start="320" selection-end="320" vertical-scroll-proportion="0.25742576">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="120" column="47" selection-start="4643" selection-end="4643" vertical-scroll-proportion="0.33291298">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/modules/sim/src/test/java/org/jboss/test/sam/simulation/SimulationTestCase.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="63" column="43" selection-start="2373" selection-end="2373" vertical-scroll-proportion="0.33663365">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSinkEntity.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="24" column="0" selection-start="1102" selection-end="1136" vertical-scroll-proportion="-1.1386138">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/modules/sim/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="47" column="14" selection-start="1805" selection-end="1805" vertical-scroll-proportion="-0.9306931">
+ <folding>
+ <element signature="imports" expanded="true" />
+ </folding>
+ </state>
+ </provider>
+ </entry>
+ <entry file="file://$PROJECT_DIR$/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java">
+ <provider selected="true" editor-type-id="text-editor">
+ <state line="202" column="51" selection-start="6140" selection-end="6162" vertical-scroll-proportion="0.09079445">
+ <folding />
+ </state>
+ </provider>
+ </entry>
+ </component>
+</project>
+
Added: sam/trunk/modules/core/core.iml
===================================================================
--- sam/trunk/modules/core/core.iml (rev 0)
+++ sam/trunk/modules/core/core.iml 2009-07-14 12:23:58 UTC (rev 660)
@@ -0,0 +1,182 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module version="4" relativePaths="true" type="JAVA_MODULE">
+ <component name="ModuleRootManager" />
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: commons-dbcp:commons-dbcp:jar:1.2.2:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/commons-dbcp/commons-dbcp/1.2.2/commons-dbcp-1.2.2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: joda-time:joda-time:jar:1.6:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/joda-time/joda-time/1.6/joda-time-1.6.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: javax.xml.stream:stax-api:jar:1.0-2:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: junit:junit:jar:3.8.2:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/junit/junit/3.8.2/junit-3.8.2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/junit/junit/3.8.2/junit-3.8.2-sources.jar!/" />
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: javasim:javasim:jar:2.0-hbraun:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javasim/javasim/2.0-hbraun/javasim-2.0-hbraun.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: commons-logging:commons-logging-api:jar:1.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: com.sun.xml.bind:jaxb-impl:jar:2.1.6:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/sun/xml/bind/jaxb-impl/2.1.6/jaxb-impl-2.1.6.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: org.eclipse.jdt:core:jar:3.4.2.v_883_R34x:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/eclipse/jdt/core/3.4.2.v_883_R34x/core-3.4.2.v_883_R34x.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: javax.activation:activation:jar:1.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1-sources.jar!/" />
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: hsqldb:hsqldb:jar:1.8.0.7:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/hsqldb/hsqldb/1.8.0.7/hsqldb-1.8.0.7.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: commons-pool:commons-pool:jar:1.3:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/commons-pool/commons-pool/1.3/commons-pool-1.3.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: org.mvel:mvel2:jar:2.0.10:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/mvel/mvel2/2.0.10/mvel2-2.0.10.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: org.antlr:antlr-runtime:jar:3.1.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/antlr/antlr-runtime/3.1.1/antlr-runtime-3.1.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: janino:janino:jar:2.5.15:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/janino/janino/2.5.15/janino-2.5.15.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: org.drools:drools-core:jar:5.0.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/drools/drools-core/5.0.1/drools-core-5.0.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: org.drools:drools-api:jar:5.0.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/drools/drools-api/5.0.1/drools-api-5.0.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: org.drools:drools-compiler:jar:5.0.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/drools/drools-compiler/5.0.1/drools-compiler-5.0.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntryProperties />
+ </component>
+</module>
+
Modified: sam/trunk/modules/core/pom.xml
===================================================================
--- sam/trunk/modules/core/pom.xml 2009-07-13 21:17:58 UTC (rev 659)
+++ sam/trunk/modules/core/pom.xml 2009-07-14 12:23:58 UTC (rev 660)
@@ -96,7 +96,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
- <!--exclude>org/jboss/test/sam/database/DatabaseTestCase.java</exclude-->
+ <exclude>org/jboss/test/sam/database/DatabaseTestCase.java</exclude>
</excludes>
</configuration>
</plugin>
@@ -115,7 +115,7 @@
</property>
</activation>
<properties>
- <surefire.jvm.args>${surefire.security.args} ${surefire.jdwp.args} -Ddrools.compiler=JANINO</surefire.jvm.args>
+ <surefire.jvm.args>${surefire.security.args} ${surefire.jdwp.args}</surefire.jvm.args>
</properties>
</profile>
<profile>
@@ -126,7 +126,7 @@
</property>
</activation>
<properties>
- <surefire.jvm.args>${surefire.security.args} -Ddrools.compiler=JANINO</surefire.jvm.args>
+ <surefire.jvm.args>${surefire.security.args}</surefire.jvm.args>
</properties>
</profile>
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/EventProcessor.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/EventProcessor.java 2009-07-13 21:17:58 UTC (rev 659)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/EventProcessor.java 2009-07-14 12:23:58 UTC (rev 660)
@@ -23,6 +23,7 @@
import java.util.Iterator;
import java.util.Properties;
+import java.io.InputStream;
/**
* An event processor glues together {@link org.jboss.sam.StreamInput} and {@link org.jboss.sam.StreamOutput}
@@ -33,8 +34,14 @@
*
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
-public interface EventProcessor<T> extends SAMRuntimeAware
+public interface EventProcessor<T>
{
+ void start();
+
+ void stop();
+
+ boolean isStarted();
+
/**
* Add input to the runtime
*
@@ -43,25 +50,12 @@
void addInput(StreamInput streamInput);
/**
- * Remove input from the runtime
- *
- * @param streamName
- */
- void removeInput(String streamName);
-
- /**
* Add output to the runtime
*
* @param streamOutput
*/
void addOutput(StreamOutput streamOutput);
- /**
- * Remove output from the runtime
- *
- * @param streamName
- */
- void removeOutput(String streamName);
/**
* Iterate over input adapter names
@@ -87,28 +81,17 @@
ProcessingStatement registerStatement(String statementName, String epl);
/**
- * Creates a statement and binds it to an output adapter.
+ * Creates a statement and binds it to an inout or output adapter.
*
- * @param streamOutputName
+ * @param streamName
* @param statementName
* @param epl
* @return
*/
- ProcessingStatement registerBoundStatement(String streamOutputName, String statementName, String epl);
+ ProcessingStatement registerBoundStatement(String streamName, String statementName, InputStream epl);
- /**
- * Cleanup a statement and remove it
- *
- * @param statementName
- */
- void clearStatement(String statementName);
/**
- * Cleanup all statements and remove them
- */
- void clearAllStatements();
-
- /**
* Iterate over statement names
*
* @return
@@ -121,5 +104,7 @@
T getUnderlying();
+ void setRuntime(SAMRuntime runtime);
+
void setProperties(Properties properties);
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/StreamInput.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/StreamInput.java 2009-07-13 21:17:58 UTC (rev 659)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/StreamInput.java 2009-07-14 12:23:58 UTC (rev 660)
@@ -24,7 +24,7 @@
/**
* Stream inputs are registered with {@link org.jboss.sam.EventProcessor}'s
* and notify registered {@link org.jboss.sam.StreamInputCallback}'s when new events arrive.
- * Typically the CEP runtime itself act's as such a listener in order to finished events.
+ * Typically the CEP runtime itself act's as such a listener in order to process events.
*
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/Configurator.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/Configurator.java 2009-07-13 21:17:58 UTC (rev 659)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/Configurator.java 2009-07-14 12:23:58 UTC (rev 660)
@@ -29,6 +29,7 @@
import javax.sql.DataSource;
import java.util.Properties;
+import java.io.ByteArrayInputStream;
/**
* An intermediary to configure {@link org.jboss.sam.SAMRuntime}'s
@@ -77,7 +78,7 @@
if (def.getBoundTo() != null)
{
processor.registerBoundStatement(
- def.getBoundTo(), def.getName(), def.getEpl().getExpression()
+ def.getBoundTo(), def.getName(), new ByteArrayInputStream(def.getEpl().getExpression().getBytes())
);
}
else
Added: sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DefaultCallback.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DefaultCallback.java (rev 0)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DefaultCallback.java 2009-07-14 12:23:58 UTC (rev 660)
@@ -0,0 +1,56 @@
+/*
+ * 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.sam.internal.drools;
+
+import org.drools.runtime.StatefulKnowledgeSession;
+import org.drools.runtime.rule.WorkingMemoryEntryPoint;
+import org.jboss.sam.StreamInputCallback;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class DefaultCallback implements StreamInputCallback
+{
+
+ StatefulKnowledgeSession sessionHandle;
+
+ public DefaultCallback(StatefulKnowledgeSession sessionHandle)
+ {
+ this.sessionHandle = sessionHandle;
+ }
+
+ public void onEvent(Object args)
+ {
+
+ System.out.println("Handle " + args + " on " + sessionHandle);
+
+ WorkingMemoryEntryPoint entryPoint =
+ sessionHandle.getWorkingMemoryEntryPoint("in-channel");
+
+ if(null==entryPoint)
+ throw new IllegalArgumentException("Unable to resolve entry point 'in-channel'");
+
+ entryPoint.insert(args);
+ sessionHandle.fireAllRules();
+ }
+
+}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java 2009-07-13 21:17:58 UTC (rev 659)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java 2009-07-14 12:23:58 UTC (rev 660)
@@ -27,8 +27,8 @@
import org.drools.builder.KnowledgeBuilder;
import org.drools.builder.KnowledgeBuilderFactory;
import org.drools.builder.ResourceType;
+import org.drools.conf.EventProcessingOption;
import org.drools.io.ResourceFactory;
-import org.drools.logger.KnowledgeRuntimeLogger;
import org.drools.logger.KnowledgeRuntimeLoggerFactory;
import org.drools.runtime.Globals;
import org.drools.runtime.StatefulKnowledgeSession;
@@ -36,8 +36,8 @@
import org.jboss.sam.*;
import org.jboss.sam.datasource.DataSourceManager;
-import java.io.ByteArrayInputStream;
-import java.io.InputStreamReader;
+import java.io.InputStream;
+import java.util.ArrayList;
import java.util.Iterator;
import java.util.Map;
import java.util.Properties;
@@ -47,43 +47,66 @@
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public class DroolsEventProcessorImpl
- implements EventProcessor<KnowledgeBase>, StreamInputCallback, Globals
+ implements EventProcessor<KnowledgeBase>, Globals
{
private String name;
-
+ private SAMRuntime runtime;
+ private boolean started;
+
private KnowledgeBase kbase;
private StatefulKnowledgeSession session;
- private Map<String, StreamInput> streamInputs = new ConcurrentHashMap<String, StreamInput>();
- private Map<String, StreamOutput> streamOutputs = new ConcurrentHashMap<String, StreamOutput>();
- private Map<String, ProcessingStatement> statements = new ConcurrentHashMap<String, ProcessingStatement>();
+ private Map<String, StreamInput> streamInputs = new ConcurrentHashMap<String, StreamInput>();
+ private Map<String, StreamOutput> streamOutputs = new ConcurrentHashMap<String, StreamOutput>();
+ private Map<String, ProcessingStatement> statements = new ConcurrentHashMap<String, ProcessingStatement>();
private Map<String, StreamOutputAdapter> outputAdapters = new ConcurrentHashMap<String, StreamOutputAdapter>();
- private SAMRuntime runtime;
-
public DroolsEventProcessorImpl()
{
- try
- {
- KnowledgeBaseConfiguration conf = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
- //conf.setOption( EventProcessingOption.STREAM );
- this.kbase = KnowledgeBaseFactory.newKnowledgeBase(conf);
+ KnowledgeBaseConfiguration conf = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
+ conf.setOption( EventProcessingOption.STREAM );
+ this.kbase = KnowledgeBaseFactory.newKnowledgeBase(conf);
- this.session = kbase.newStatefulKnowledgeSession();
- this.session.getGlobals().setDelegate(this);
+ //System.out.println("1. Created kbase");
+ }
- }
- catch (Exception e)
- {
- throw new RuntimeException("Failed to initialize event processor", e);
- }
+ private StatefulKnowledgeSession getSession()
+ {
+ return this.session;
}
+ // --------------------------------------------------
+
+ public void start()
+ {
+ this.session = kbase.newStatefulKnowledgeSession();
+ this.session.getGlobals().setDelegate(this);
+ //KnowledgeRuntimeLoggerFactory.newConsoleLogger(session);
+
+ //System.out.println("3. Created session");
+
+ this.started = true;
+ }
+
+ public void stop()
+ {
+ this.session.dispose();
+ this.session = null;
+ this.started = false;
+ }
+
+ public boolean isStarted()
+ {
+ return this.started;
+ }
+
+ // --------------------------------------------------
+
public void setProperties(Properties properties)
{
- String runtimeLogProp = (String)properties.get("drools.runtimelog.enable");
+ /*String runtimeLogProp = (String)properties.get("drools.runtimelog.enable");
if(runtimeLogProp!=null && runtimeLogProp.equals("true"))
- KnowledgeRuntimeLoggerFactory.newConsoleLogger(session);
+ KnowledgeRuntimeLoggerFactory.newConsoleLogger(session);*/
}
public void setRuntime(SAMRuntime runtime)
@@ -91,23 +114,16 @@
this.runtime = runtime;
}
- public void onEvent(Object args)
+ // --------------------------------------------------
+
+ public void addInput(final StreamInput streamInput)
{
- session.insert(args);
- session.fireAllRules();
- }
+ if(isStarted())
+ throw new IllegalStateException("EventProcessor already started");
- public void addInput(StreamInput streamInput)
- {
- streamInput.registerCallback(this);
this.streamInputs.put(streamInput.getStreamName(), streamInput);
}
- public void removeInput(String streamName)
- {
- this.streamInputs.remove(streamName);
- }
-
public Iterator<String> getStreamInputNames()
{
return this.streamInputs.keySet().iterator();
@@ -115,6 +131,9 @@
public void addOutput(StreamOutput streamOutput)
{
+ if(isStarted())
+ throw new IllegalStateException("EventProcessor already started");
+
this.streamOutputs.put(streamOutput.getStreamName(), streamOutput);
// Create a drools adapter
@@ -125,17 +144,16 @@
}
- public void removeOutput(String streamName)
- {
- this.streamOutputs.remove(streamName);
- }
-
public Iterator<String> getStreamOutputNames()
{
return this.streamOutputs.keySet().iterator();
}
+ // --------------------------------------------------
+ /**
+ * drools global resolution callback
+ */
public Object get(String key)
{
Object global = null;
@@ -145,6 +163,10 @@
DataSourceManager dsMgr = this.runtime.getDataSourceManager();
global = new SAMAdapter(this.session, this.outputAdapters, dsMgr);
}
+ else if("results".equals(key))
+ {
+ global = new ArrayList();
+ }
else
{
// It may be a adapter output
@@ -163,20 +185,39 @@
throw new IllegalArgumentException("Not supported");
}
+ // --------------------------------------------------
+
/**
* Creates a drools package and registers it with the current rulebase
+ * @deprecated
*/
public ProcessingStatement registerStatement(String statementName, String epl)
+ {
+ throw new RuntimeException("Obsolete");
+ }
+
+ /**
+ * Create a drools package, register it with the rulebase and make
+ * sure that the adapter output adapter is available as a drools global variable
+ */
+ public ProcessingStatement registerBoundStatement(String streamName, String statementName, InputStream epl)
{
- InputStreamReader reader = new InputStreamReader(
- new ByteArrayInputStream(epl.getBytes())
- );
+ if(isStarted())
+ throw new IllegalStateException("EventProcessor already started");
+
+ final StreamOutput out = this.streamOutputs.get(streamName);
+ final StreamInput in = this.streamInputs.get(streamName);
+ if(out == null && in== null)
+ throw new IllegalArgumentException("No such stream: " + streamName);
+
+ // -----------------------
// Create a drools package
+
KnowledgeBuilder builder = KnowledgeBuilderFactory.newKnowledgeBuilder();
try
{
- builder.add(ResourceFactory.newReaderResource(reader), ResourceType.DRL);
+ builder.add(ResourceFactory.newInputStreamResource(epl), ResourceType.DRL);
}
catch (Exception e)
{
@@ -192,52 +233,56 @@
}
this.kbase.addKnowledgePackages(builder.getKnowledgePackages());
- DroolsProcessingStatement stmt = new DroolsProcessingStatement(
- statementName, epl, null
- );
-
- this.statements.put(statementName, stmt);// TODO: Why keep the reference?
- return stmt;
- }
+ //System.out.println("2. Build packages");
- /**
- * Create a drools package, register it with the rulebase and make
- * sure that the adapter output adapter is available as a drools global variable
- */
- public ProcessingStatement registerBoundStatement(String streamOutputName, String statementName, String epl)
- {
- StreamOutputAdapter streamOutput = this.outputAdapters.get(streamOutputName);
- if (null == streamOutput)
- throw new IllegalArgumentException("No such output stream: " + streamOutputName);
+ // -----------------------
+ // register mapping to either input or output stream
+ if(in!=null)
+ {
+ // bind to input stream
+ in.registerCallback(
+ new StreamInputCallback()
+ {
- // register the statement
- ProcessingStatement stmt = registerStatement(statementName, epl);
+ public void onEvent(Object args)
+ {
+ if(!isStarted())
+ throw new IllegalStateException("EventProcessor not started");
+
+ WorkingMemoryEntryPoint entryPoint =
+ getSession().getWorkingMemoryEntryPoint(in.getStreamName());
- return stmt;
- }
+ if(null==entryPoint)
+ throw new IllegalArgumentException("Unable to resolve entry point: "+in.getStreamName());
- public Iterator<String> getStatementNames()
- {
- return this.statements.keySet().iterator();
- }
+ entryPoint.insert(args);
+ getSession().fireAllRules();
+ }
+ }
+ );
+ }
+ else
+ {
+ // bind to output stream
+ StreamOutputAdapter outputAdapter = new StreamOutputAdapter(out);
+ this.outputAdapters.put(out.getStreamName(), outputAdapter);
+ }
- public void clearStatement(String statementName)
- {
- ProcessingStatement stmt = statements.get(statementName);
- if (null == stmt)
- throw new IllegalArgumentException("No such statement: " + statementName);
+ // -----------------------
- statements.remove(statementName);
+ DroolsProcessingStatement stmt =
+ new DroolsProcessingStatement(statementName, null, null);
+ this.statements.put(statementName, stmt);
+
+ return stmt;
}
- public void clearAllStatements()
+ // --------------------------------------------------
+
+ public Iterator<String> getStatementNames()
{
- Iterator<String> stmtNames = getStatementNames();
- while (stmtNames.hasNext())
- {
- clearStatement(stmtNames.next());
- }
+ return this.statements.keySet().iterator();
}
public String getName()
@@ -245,7 +290,6 @@
return this.name;
}
-
public void setName(String name)
{
this.name = name;
@@ -255,4 +299,6 @@
{
return this.kbase;
}
+
+
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMDispatcher.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMDispatcher.java 2009-07-13 21:17:58 UTC (rev 659)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMDispatcher.java 2009-07-14 12:23:58 UTC (rev 660)
@@ -42,6 +42,9 @@
public void dispatch(Object event)
{
+ if(channelRegistry.getChannelCallbackSize()==0)
+ System.out.println("WARN: There a no callbacks registered with InVMDispatcher '" +this.streamName+"'");
+
for (StreamInputCallback callback : channelRegistry.getChannelCallbacks(streamName))
{
callback.onEvent(event);
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMStreamRegistry.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMStreamRegistry.java 2009-07-13 21:17:58 UTC (rev 659)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMStreamRegistry.java 2009-07-14 12:23:58 UTC (rev 660)
@@ -54,4 +54,9 @@
streams.put(streamName, new CopyOnWriteArrayList<StreamInputCallback>());
return streams.get(streamName);
}
+
+ public int getChannelCallbackSize()
+ {
+ return streams.size();
+ }
}
Modified: sam/trunk/modules/core/src/test/java/org/jboss/test/sam/SamTestSetup.java
===================================================================
--- sam/trunk/modules/core/src/test/java/org/jboss/test/sam/SamTestSetup.java 2009-07-13 21:17:58 UTC (rev 659)
+++ sam/trunk/modules/core/src/test/java/org/jboss/test/sam/SamTestSetup.java 2009-07-14 12:23:58 UTC (rev 660)
@@ -32,6 +32,7 @@
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
+import java.io.InputStream;
import java.net.URL;
/**
@@ -69,10 +70,10 @@
eventProcessor = runtime.getEventProcessor();
// Stream input and output
- streamInput = new InVMStreamInput("InVM").start();
+ streamInput = new InVMStreamInput("in-channel").start();
dispatcher = new InVMDispatcher(streamInput.getStreamName());
- bufferedOutput = new BufferedStreamOutput("InVM").start();
+ bufferedOutput = new BufferedStreamOutput("out-channel").start();
eventProcessor.addInput(streamInput);
eventProcessor.addOutput(bufferedOutput);
}
@@ -105,26 +106,8 @@
return Thread.currentThread().getContextClassLoader().getResource(name);
}
- protected String getDRLFromResource(String resourceName)
+ protected InputStream loadDRL(String resource)
{
- try
- {
- URL url = Thread.currentThread().getContextClassLoader().getResource(resourceName);
- BufferedReader reader = new BufferedReader(
- new InputStreamReader(url.openStream())
- );
- StringBuffer sb = new StringBuffer();
- String line;
- while((line = reader.readLine()) != null)
- {
- sb.append(line);
- }
-
- return sb.toString();
- }
- catch (IOException e)
- {
- throw new RuntimeException("Failed to load DRL", e);
- }
+ return Thread.currentThread().getContextClassLoader().getResourceAsStream(resource);
}
}
Modified: sam/trunk/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java
===================================================================
--- sam/trunk/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java 2009-07-13 21:17:58 UTC (rev 659)
+++ sam/trunk/modules/core/src/test/java/org/jboss/test/sam/database/DatabaseTestCase.java 2009-07-14 12:23:58 UTC (rev 660)
@@ -25,6 +25,8 @@
import org.jboss.test.sam.InMemoryDatabase;
import org.jboss.test.sam.SamTestSetup;
+import java.io.ByteArrayInputStream;
+
/**
* Test database integration patterns
*
@@ -32,98 +34,108 @@
*/
public class DatabaseTestCase extends SamTestSetup
{
- private InMemoryDatabase db;
+ private InMemoryDatabase db;
- public void setUp() throws Exception
- {
- // Runtime
- createProcessor("DataBaseTestCase", "database/sam-cfg.xml");
+ public void setUp() throws Exception
+ {
+ // Runtime
+ createProcessor("DataBaseTestCase", "database/sam-cfg.xml");
- // InMemory Database
- db = createDatabase(
+ // InMemory Database
+ db = createDatabase(
runtime.getDataSourceManager().getDataSource("hsqlDB")
- );
-
- // test schema
- db.update("CREATE TABLE quotes (" +
+ );
+
+ // test schema
+ db.update("CREATE TABLE quotes (" +
" symbol varchar(10) NOT NULL," +
" name varchar(50) NOT NULL," +
" price double NOT NULL," +
" PRIMARY KEY (symbol)" +
")"
- );
+ );
- // test data
- db.update("INSERT INTO quotes (symbol, name, price) VALUES ('IBM', 'IBM', 127.26)");
- db.update("INSERT INTO quotes (symbol, name, price) VALUES ('MSFT', 'Microsoft', 27.36)");
- db.update("INSERT INTO quotes (symbol, name, price) VALUES('AAPL', 'Apple', 184.96)" );
- db.update("INSERT INTO quotes (symbol, name, price) VALUES('RHT', 'Red Hat', 22.82)");
- db.update("INSERT INTO quotes (symbol, name, price) VALUES('ORCL', 'Oracle', 22.85)");
- db.update("INSERT INTO quotes (symbol, name, price) VALUES('JAVA', 'Sun', 12.42)" );
- db.update("INSERT INTO quotes (symbol, name, price) VALUES('GOOG', 'Google', 572.51)");
+ // test data
+ db.update("INSERT INTO quotes (symbol, name, price) VALUES ('IBM', 'IBM', 127.26)");
+ db.update("INSERT INTO quotes (symbol, name, price) VALUES ('MSFT', 'Microsoft', 27.36)");
+ db.update("INSERT INTO quotes (symbol, name, price) VALUES('AAPL', 'Apple', 184.96)" );
+ db.update("INSERT INTO quotes (symbol, name, price) VALUES('RHT', 'Red Hat', 22.82)");
+ db.update("INSERT INTO quotes (symbol, name, price) VALUES('ORCL', 'Oracle', 22.85)");
+ db.update("INSERT INTO quotes (symbol, name, price) VALUES('JAVA', 'Sun', 12.42)" );
+ db.update("INSERT INTO quotes (symbol, name, price) VALUES('GOOG', 'Google', 572.51)");
- // database dump
- //db.query("SELECT symbol, price FROM quotes");
- }
+ // database dump
+ //db.query("SELECT symbol, price FROM quotes");
+ }
- protected void tearDown() throws Exception
- {
- db.shutdown();
- }
+ protected void tearDown() throws Exception
+ {
+ db.shutdown();
+ }
- /**
- * Fire a event to trigger the SQL query
- * (Constraints applied to SQL statement)
- */
- public void testSQLQuery() throws Exception
- {
- // setup
- String epl = getDRLFromResource("database/triggerPull.drl");
- eventProcessor.registerBoundStatement("InVM","TriggerSQL", epl);
+ /**
+ * Fire a event to trigger the SQL query
+ * (Constraints applied to SQL statement)
+ */
+ public void testSQLQuery() throws Exception
+ {
+ // setup
+ eventProcessor.registerBoundStatement(
+ "in-channel",
+ "TriggerSQL",
+ loadDRL("database/triggerPull.drl")
+ );
- // trigger
- Query queryMessage = new Query("%");
- generateInVMEvent(queryMessage);
+ eventProcessor.start();
- // evaluate
- assertTrue("Listener not invoked", bufferedOutput.isInvoked());
- EventMessage[] eventMessages = bufferedOutput.getLastNewData();
- assertEquals(7, eventMessages.length);
+ // trigger
+ Query queryMessage = new Query("%");
+ generateInVMEvent(queryMessage);
- dump(eventMessages);
- }
+ // evaluate
+ assertTrue("Listener not invoked", bufferedOutput.isInvoked());
+ EventMessage[] eventMessages = bufferedOutput.getLastNewData();
+ assertEquals(7, eventMessages.length);
- /**
- * Join SQL data into event processing
- * (Constraints applied to working memory)
- * @throws Exception
- */
- public void testSQLJoin() throws Exception
- {
- // setup
- String epl = getDRLFromResource("database/sampleJoin.drl");
- eventProcessor.registerBoundStatement("InVM","SQLJoin", epl);
+ dump(eventMessages);
+ }
- // trigger
- Query queryEvent = new Query();
- queryEvent.setThreshold(100.00);
-
- generateInVMEvent(queryEvent);
+ /**
+ * Join SQL data into event processing
+ * (Constraints applied to working memory)
+ * @throws Exception
+ */
+ public void testSQLJoin() throws Exception
+ {
+ // setup
+ eventProcessor.registerBoundStatement(
+ "in-channel","" +
+ "SQLJoin",
+ loadDRL("database/sampleJoin.drl")
+ );
- // evaluate
- assertTrue("Listener not invoked", bufferedOutput.isInvoked());
- EventMessage[] eventMessages = bufferedOutput.getLastNewData();
- assertEquals(3, eventMessages.length);
+ eventProcessor.start();
- dump(eventMessages);
- }
+ // trigger
+ Query queryEvent = new Query();
+ queryEvent.setThreshold(100.00);
- private void dump(EventMessage[] eventMessages)
- {
- for(EventMessage event : eventMessages)
- {
- System.out.println(event.getProperty("symbol") + " -> " + event.getProperty("price") );
- }
- }
-
+ generateInVMEvent(queryEvent);
+
+ // evaluate
+ assertTrue("Listener not invoked", bufferedOutput.isInvoked());
+ EventMessage[] eventMessages = bufferedOutput.getLastNewData();
+ assertEquals(3, eventMessages.length);
+
+ dump(eventMessages);
+ }
+
+ private void dump(EventMessage[] eventMessages)
+ {
+ for(EventMessage event : eventMessages)
+ {
+ System.out.println(event.getProperty("symbol") + " -> " + event.getProperty("price") );
+ }
+ }
+
}
Modified: sam/trunk/modules/core/src/test/java/org/jboss/test/sam/drools/ApiTestCase.java
===================================================================
--- sam/trunk/modules/core/src/test/java/org/jboss/test/sam/drools/ApiTestCase.java 2009-07-13 21:17:58 UTC (rev 659)
+++ sam/trunk/modules/core/src/test/java/org/jboss/test/sam/drools/ApiTestCase.java 2009-07-14 12:23:58 UTC (rev 660)
@@ -30,23 +30,23 @@
*/
public class ApiTestCase extends SamTestSetup
{
-
protected void setUp() throws Exception
{
// Creates default adapter inputs and outputs
createProcessor("ApiTestCase", "drools/sam-cfg.xml");
}
- public void testBoundStatement()
- {
- // EPL as String
- String epl = getDRLFromResource("drools/simple.drl");
+ public void testStreamInput()
+ {
+ eventProcessor.registerBoundStatement(
+ "in-channel",
+ "stream-input.drl",
+ loadDRL("drools/stream-input.drl")
+ );
- // register statement
- eventProcessor.registerBoundStatement("InVM", "simple.drl", epl);
+ eventProcessor.start();
- StockTick eventMessage = new StockTick( "ACME");
- generateInVMEvent(eventMessage);
+ generateInVMEvent(new StockTick( "SUN"));
assertNotNull("No data received on stream output", bufferedOutput.getLastNewData());
assertEquals("Expected a single event", bufferedOutput.getLastNewData().length, 1);
@@ -54,11 +54,15 @@
public void testAggregationAndForwarding()
{
- String forwardDSL = getDRLFromResource("drools/forward.drl");
- eventProcessor.registerBoundStatement("InVM", "forward.drl", forwardDSL);
+ eventProcessor.registerBoundStatement(
+ "in-channel",
+ "forward.drl",
+ loadDRL("drools/stream-forward.drl")
+ );
- StockTick eventMessage = new StockTick( "RHAT");
- generateInVMEvent(eventMessage);
+ eventProcessor.start();
+
+ generateInVMEvent(new StockTick( "RHAT"));
assertNotNull("No data received on stream output", bufferedOutput.getLastNewData());
assertEquals("Expected a single event", bufferedOutput.getLastNewData().length, 1);
@@ -66,4 +70,6 @@
}
+
+
}
Added: sam/trunk/modules/core/src/test/java/org/jboss/test/sam/drools/StandaloneTestCase.java
===================================================================
--- sam/trunk/modules/core/src/test/java/org/jboss/test/sam/drools/StandaloneTestCase.java (rev 0)
+++ sam/trunk/modules/core/src/test/java/org/jboss/test/sam/drools/StandaloneTestCase.java 2009-07-14 12:23:58 UTC (rev 660)
@@ -0,0 +1,129 @@
+/*
+ * 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.drools;
+
+import junit.framework.TestCase;
+import org.drools.KnowledgeBase;
+import org.drools.KnowledgeBaseConfiguration;
+import org.drools.KnowledgeBaseFactory;
+import org.drools.conf.EventProcessingOption;
+import org.drools.logger.KnowledgeRuntimeLoggerFactory;
+import org.drools.builder.KnowledgeBuilder;
+import org.drools.builder.KnowledgeBuilderFactory;
+import org.drools.builder.ResourceType;
+import org.drools.io.ResourceFactory;
+import org.drools.runtime.Globals;
+import org.drools.runtime.StatefulKnowledgeSession;
+import org.drools.runtime.rule.WorkingMemoryEntryPoint;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class StandaloneTestCase extends TestCase
+{
+ KnowledgeBase kbase;
+ StatefulKnowledgeSession session;
+ final List<String> results = new ArrayList<String>();
+
+ protected void tearDown() throws Exception
+ {
+ results.clear();
+ }
+
+ protected void setUp() throws Exception
+ {
+
+ KnowledgeBaseConfiguration conf = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
+ conf.setOption( EventProcessingOption.STREAM );
+ this.kbase = KnowledgeBaseFactory.newKnowledgeBase(conf);
+
+ //System.out.println("1. Created kbase");
+
+ KnowledgeBuilder builder = KnowledgeBuilderFactory.newKnowledgeBuilder();
+
+ try
+ {
+ InputStream inStream = Thread.currentThread().getContextClassLoader()
+ .getResourceAsStream("drools/standalone.drl");
+ builder.add(ResourceFactory.newInputStreamResource(inStream),ResourceType.DRL);
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Failed to read DRL", e);
+ }
+
+ if (builder.hasErrors())
+ {
+ throw new RuntimeException(
+ "Failed to parse DRL: \n"
+ + builder.getErrors().toString()
+ );
+ }
+ this.kbase.addKnowledgePackages(builder.getKnowledgePackages());
+
+
+ //System.out.println("2. Build packages");
+
+ this.session = kbase.newStatefulKnowledgeSession();
+ this.session.getGlobals().setDelegate(
+ new Globals()
+ {
+
+ public Object get(String string)
+ {
+ if("results".equals(string))
+ return results;
+ else
+ throw new IllegalArgumentException("Uknown global " +string);
+ }
+
+ public void set(String string, Object object)
+ {
+
+ }
+
+ public void setDelegate(Globals globals)
+ {
+
+ }
+ }
+ );
+
+ //System.out.println("3. Create session");
+
+ KnowledgeRuntimeLoggerFactory.newConsoleLogger(this.session);
+ }
+
+ public void testEntryPoint() throws Exception
+ {
+ WorkingMemoryEntryPoint entryPoint = session.getWorkingMemoryEntryPoint("stream1");
+ assertNotNull("entry-point not registered", entryPoint);
+ entryPoint.insert(new StockTick("RHAT"));
+ session.fireAllRules();
+
+ assertFalse("No event received", results.isEmpty());
+ }
+}
Modified: sam/trunk/modules/core/src/test/resources/database/triggerPull.drl
===================================================================
--- sam/trunk/modules/core/src/test/resources/database/triggerPull.drl 2009-07-13 21:17:58 UTC (rev 659)
+++ sam/trunk/modules/core/src/test/resources/database/triggerPull.drl 2009-07-14 12:23:58 UTC (rev 660)
@@ -4,12 +4,19 @@
global org.jboss.sam.internal.drools.SAMAdapter SAM;
+# default dialect for the semantic code will be MVEL
+dialect "mvel"
+
+declare Query
+ @role( event )
+end
+
rule "Pull any quote by symbol"
when
- $query: Query(threshold==0.00);
+ $query: Query() from entry-point "in-channel"
$sqlStream: ArrayList() from collect (
Map() from SAM.query("hsqlDB", "SELECT symbol, price FROM quotes WHERE symbol like ('"+$query.criteria+"')")
- );
+ )
then
- SAM.getListener("InVM").update($sqlStream);
+ SAM.getListener("out-channel").update($sqlStream);
end
Deleted: sam/trunk/modules/core/src/test/resources/drools/forward.drl
===================================================================
--- sam/trunk/modules/core/src/test/resources/drools/forward.drl 2009-07-13 21:17:58 UTC (rev 659)
+++ sam/trunk/modules/core/src/test/resources/drools/forward.drl 2009-07-14 12:23:58 UTC (rev 660)
@@ -1,24 +0,0 @@
-package org.jboss.test.sam.drools;
-
-import org.jboss.test.sam.drools.StockTick;
-
-global org.jboss.sam.internal.drools.SAMAdapter SAM;
-
-rule "Aggregate"
-when
- $st: StockTick(symbol == "RHAT")
-then
- System.out.println("drools: " +drools.getEntryPoint("stream1"));
- System.out.println("Stream1: " +entryPoints["stream1"]);
- entryPoints["stream1"].insert($st);
-end
-
-# forward to listener
-rule "Forward"
- dialect "mvel"
-when
- $st : StockTick() from entry-point "stream1"
-then
- System.out.println($st);
- SAM.getListener("InVM").update($st);
-end
Deleted: sam/trunk/modules/core/src/test/resources/drools/simple.drl
===================================================================
--- sam/trunk/modules/core/src/test/resources/drools/simple.drl 2009-07-13 21:17:58 UTC (rev 659)
+++ sam/trunk/modules/core/src/test/resources/drools/simple.drl 2009-07-14 12:23:58 UTC (rev 660)
@@ -1,12 +0,0 @@
-package org.jboss.test.sam.drools;
-
-import org.jboss.test.sam.drools.StockTick;
-
-global org.jboss.sam.internal.drools.SAMAdapter SAM;
-
-rule "Send all ACME events to output listener"
-when
- $st: StockTick(symbol == "ACME")
-then
- SAM.getListener("InVM").update($st);
-end
Added: sam/trunk/modules/core/src/test/resources/drools/standalone.drl
===================================================================
--- sam/trunk/modules/core/src/test/resources/drools/standalone.drl (rev 0)
+++ sam/trunk/modules/core/src/test/resources/drools/standalone.drl 2009-07-14 12:23:58 UTC (rev 660)
@@ -0,0 +1,17 @@
+package org.jboss.test.sam.drools;
+
+import org.jboss.test.sam.drools.StockTick;
+
+global java.util.List results;
+
+# flag as event
+declare StockTick
+ @role( event )
+end
+
+rule "test entry-point"
+when
+ $st: StockTick() from entry-point "stream1"
+then
+ results.add($st);
+end
Copied: sam/trunk/modules/core/src/test/resources/drools/stream-forward.drl (from rev 658, sam/trunk/modules/core/src/test/resources/drools/forward.drl)
===================================================================
--- sam/trunk/modules/core/src/test/resources/drools/stream-forward.drl (rev 0)
+++ sam/trunk/modules/core/src/test/resources/drools/stream-forward.drl 2009-07-14 12:23:58 UTC (rev 660)
@@ -0,0 +1,28 @@
+package org.jboss.test.sam.drools;
+
+import org.jboss.test.sam.drools.StockTick;
+
+global org.jboss.sam.internal.drools.SAMAdapter SAM;
+
+# default dialect for the semantic code will be MVEL
+dialect "mvel"
+
+declare StockTick
+ @role( event )
+end
+
+rule "Aggregate"
+when
+ $st: StockTick(symbol == "RHAT") from entry-point "in-channel"
+then
+ entryPoints["stream1"].insert($st);
+end
+
+# forward to listener
+rule "Forward"
+ dialect "mvel"
+when
+ $st : StockTick() from entry-point "stream1"
+then
+ SAM.getListener("out-channel").update($st);
+end
Property changes on: sam/trunk/modules/core/src/test/resources/drools/stream-forward.drl
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: sam/trunk/modules/core/src/test/resources/drools/stream-input.drl
===================================================================
--- sam/trunk/modules/core/src/test/resources/drools/stream-input.drl (rev 0)
+++ sam/trunk/modules/core/src/test/resources/drools/stream-input.drl 2009-07-14 12:23:58 UTC (rev 660)
@@ -0,0 +1,20 @@
+package org.jboss.test.sam.drools;
+
+import org.jboss.test.sam.drools.StockTick;
+
+global org.jboss.sam.internal.drools.SAMAdapter SAM;
+
+# default dialect for the semantic code will be MVEL
+dialect "mvel"
+
+# flag as event
+declare StockTick
+ @role( event )
+end
+
+rule "test entry-point"
+when
+ $st: StockTick() from entry-point "in-channel"
+then
+ SAM.getListener("out-channel").update($st);
+end
Added: sam/trunk/modules/sim/sim.iml
===================================================================
--- sam/trunk/modules/sim/sim.iml (rev 0)
+++ sam/trunk/modules/sim/sim.iml 2009-07-14 12:23:58 UTC (rev 660)
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module version="4" relativePaths="true" type="JAVA_MODULE">
+ <component name="ModuleRootManager" />
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module" module-name="toplevel" />
+ <orderEntry type="module-library">
+ <library name="M2 Dep: junit:junit:jar:3.8.2:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/junit/junit/3.8.2/junit-3.8.2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/junit/junit/3.8.2/junit-3.8.2-sources.jar!/" />
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: javasim:javasim:jar:2.0-hbraun:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javasim/javasim/2.0-hbraun/javasim-2.0-hbraun.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: commons-dbcp:commons-dbcp:jar:1.2.2:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/commons-dbcp/commons-dbcp/1.2.2/commons-dbcp-1.2.2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: joda-time:joda-time:jar:1.6:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/joda-time/joda-time/1.6/joda-time-1.6.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: javax.xml.stream:stax-api:jar:1.0-2:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: commons-logging:commons-logging-api:jar:1.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: com.sun.xml.bind:jaxb-impl:jar:2.1.6:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/com/sun/xml/bind/jaxb-impl/2.1.6/jaxb-impl-2.1.6.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: org.eclipse.jdt:core:jar:3.4.2.v_883_R34x:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/eclipse/jdt/core/3.4.2.v_883_R34x/core-3.4.2.v_883_R34x.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: javax.activation:activation:jar:1.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1-sources.jar!/" />
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: hsqldb:hsqldb:jar:1.8.0.7:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/hsqldb/hsqldb/1.8.0.7/hsqldb-1.8.0.7.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: commons-pool:commons-pool:jar:1.3:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/commons-pool/commons-pool/1.3/commons-pool-1.3.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: org.mvel:mvel2:jar:2.0.10:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/mvel/mvel2/2.0.10/mvel2-2.0.10.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: org.antlr:antlr-runtime:jar:3.1.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/antlr/antlr-runtime/3.1.1/antlr-runtime-3.1.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: janino:janino:jar:2.5.15:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/janino/janino/2.5.15/janino-2.5.15.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: org.drools:drools-core:jar:5.0.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/drools/drools-core/5.0.1/drools-core-5.0.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: org.drools:drools-api:jar:5.0.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/drools/drools-api/5.0.1/drools-api-5.0.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
+ <library name="M2 Dep: org.drools:drools-compiler:jar:5.0.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../.m2/repository/org/drools/drools-compiler/5.0.1/drools-compiler-5.0.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntryProperties />
+ </component>
+</module>
+
Modified: sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java
===================================================================
--- sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java 2009-07-13 21:17:58 UTC (rev 659)
+++ sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSimulation.java 2009-07-14 12:23:58 UTC (rev 660)
@@ -36,6 +36,7 @@
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
+import java.io.ByteArrayInputStream;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
@@ -68,225 +69,232 @@
*/
public class EventSimulation extends SimulationProcess
{
- // simulation properties
- private List<EventSinkEntity> eventSinks = new ArrayList<EventSinkEntity>();
- private List<EventSourceEntity> eventSources = new ArrayList<EventSourceEntity>();
- private SimulationContext context;
- private InVMDispatcher dispatcher;
+ // simulation properties
+ private List<EventSinkEntity> eventSinks = new ArrayList<EventSinkEntity>();
+ private List<EventSourceEntity> eventSources = new ArrayList<EventSourceEntity>();
+ private SimulationContext context;
+ private InVMDispatcher dispatcher;
- // SAM properties
- private SAMRuntime runtime;
- private EventProcessor eventProcessor;
- private StreamInput streamInput;
+ // SAM properties
+ private SAMRuntime runtime;
+ private EventProcessor eventProcessor;
+ private StreamInput streamInput;
- // Constants
- public final static String TOTAL_SIM_TIME = "sam.total-sim-time";
- public final static String NUM_UNMATCHED_EVENTS = "sam.unmatched-events";
+ // Constants
+ public final static String TOTAL_SIM_TIME = "sam.total-sim-time";
+ public final static String NUM_UNMATCHED_EVENTS = "sam.unmatched-events";
- private EventSimulation(Properties config, URL bootstrap)
- {
- assert bootstrap!=null : "Bootstrap config is null!";
-
- // thread setup
- setName("EventSimulation {" + getName()+ "}");
- setPriority(1);
+ private EventSimulation(Properties config, URL bootstrap)
+ {
+ assert bootstrap!=null : "Bootstrap config is null!";
- this.context = new SimulationContext(config);
+ // thread setup
+ setName("EventSimulation {" + getName()+ "}");
+ setPriority(1);
- // setup SAM runtime
- Configurator configurator = new Configurator( ConfigFactory.newInstance().unmarshall(bootstrap) );
- this.runtime = SAMRuntimeFactory.newInstance().createRuntime(configurator);
- this.eventProcessor = runtime.getEventProcessor();
+ this.context = new SimulationContext(config);
- // create input for the default in-vm channel
- this.streamInput = new InVMStreamInput(InVMDispatcher.DEFAULT_CHANNEL_NAME);
+ // setup SAM runtime
+ Configurator configurator = new Configurator( ConfigFactory.newInstance().unmarshall(bootstrap) );
+ this.runtime = SAMRuntimeFactory.newInstance().createRuntime(configurator);
+ this.eventProcessor = runtime.getEventProcessor();
- // create a dispatcher used within event source
- this.dispatcher = new InVMDispatcher(InVMDispatcher.DEFAULT_CHANNEL_NAME);
+ // create input for the default in-vm channel
+ this.streamInput = new InVMStreamInput(InVMDispatcher.DEFAULT_CHANNEL_NAME);
- // register in/out with hub
- this.eventProcessor.addInput(streamInput);
- }
+ // create a dispatcher used within event source
+ this.dispatcher = new InVMDispatcher(InVMDispatcher.DEFAULT_CHANNEL_NAME);
- public EventSinkEntity addSink(EventSinkEntity sink)
- {
- sink.setContext(this.context);
+ // register in/out with hub
+ this.eventProcessor.addInput(streamInput);
+ }
- this.eventSinks.add(sink);
- this.eventProcessor.addOutput(sink);
- return sink;
- }
+ public EventSinkEntity addSink(EventSinkEntity sink)
+ {
+ sink.setContext(this.context);
- public EventSourceEntity addSource(EventSourceEntity source)
- {
- source.setContext(this.context);
- source.setDispatcher(this.dispatcher);
+ this.eventSinks.add(sink);
+ this.eventProcessor.addOutput(sink);
+ return sink;
+ }
- this.eventSources.add(source);
- return source;
- }
+ public EventSourceEntity addSource(EventSourceEntity source)
+ {
+ source.setContext(this.context);
+ source.setDispatcher(this.dispatcher);
- /**
- * Create a aggregation/filtering statement
- * @param stmt
- */
- public void createStatement(String stmt)
- {
- this.eventProcessor.registerStatement(
+ this.eventSources.add(source);
+
+ return source;
+ }
+
+ /**
+ * Create a aggregation/filtering statement
+ * @param stmt
+ */
+ public void createStatement(String stmt)
+ {
+ this.eventProcessor.registerStatement(
UUID.randomUUID().toString(), stmt
- );
- }
+ );
+ }
- /**
- * Bind a statment that forwards to an EventSink
- * @param stmt
- * @param sink
- */
- public void bindStatement(String stmt, EventSinkEntity sink)
- {
- this.eventProcessor.registerBoundStatement(
- sink.getStreamName(), UUID.randomUUID().toString(), stmt
- );
- }
+ /**
+ * Bind a statment that forwards to an EventSink
+ * @param stmt
+ * @param sink
+ */
+ public void bindStatement(String stmt, EventSinkEntity sink)
+ {
+ this.eventProcessor.registerBoundStatement(
+ sink.getStreamName(), UUID.randomUUID().toString(), new ByteArrayInputStream(stmt.getBytes())
+ );
+ }
- /**
- * Execute a single run of this simulation.
- * Suspends the main thread until the simulation is done.
- */
- public void singleRun()
- {
- // [HB] System.out.println("-----------");
- // [HB] System.out.println("Start called: " + this);
- this.resumeProcess();
- // [HB] System.out.println("Trying mainSuspend on: " + this);
- SimulationProcess.mainSuspend();
- // [HB] System.out.println("Done with mainSuspend on: " + this);
- }
+ /**
+ * Execute a single run of this simulation.
+ * Suspends the main thread until the simulation is done.
+ */
+ public void singleRun()
+ {
+ if(!eventProcessor.isStarted())
+ {
+ System.out.println("WARN: Force start EventProcessor. Did you forget to start it?");
+ eventProcessor.start();
+ }
- public void done()
- {
- try
- {
- this.terminate();
- Scheduler.reset();
- }
- catch(SimulationException e)
- {
- e.printStackTrace();
- }
- }
+ // [HB] System.out.println("-----------");
+ // [HB] System.out.println("Start called: " + this);
+ this.resumeProcess();
+ // [HB] System.out.println("Trying mainSuspend on: " + this);
+ SimulationProcess.mainSuspend();
+ // [HB] System.out.println("Done with mainSuspend on: " + this);
+ }
- private void begin()
- {
- for(EventSinkEntity sink : eventSinks)
- {
- sink.begin();
- }
+ public void done()
+ {
+ try
+ {
+ this.terminate();
+ Scheduler.reset();
+ }
+ catch(SimulationException e)
+ {
+ e.printStackTrace();
+ }
+ }
- for(EventSourceEntity source : eventSources)
- {
- source.begin();
- }
- }
+ private void begin()
+ {
+ for(EventSinkEntity sink : eventSinks)
+ {
+ sink.begin();
+ }
- private void end()
- {
- for(EventSinkEntity sink : eventSinks)
- {
- sink.end();
- }
+ for(EventSourceEntity source : eventSources)
+ {
+ source.begin();
+ }
+ }
- for(EventSourceEntity source : eventSources)
- {
- source.end();
- }
- }
+ private void end()
+ {
+ for(EventSinkEntity sink : eventSinks)
+ {
+ sink.end();
+ }
- public SimulationContext getContext()
- {
- return context;
- }
+ for(EventSourceEntity source : eventSources)
+ {
+ source.end();
+ }
+ }
- public Measurement measurement(String key)
- {
- return context.getMeasurement(key);
- }
+ public SimulationContext getContext()
+ {
+ return context;
+ }
- public void run()
- {
- try
- {
- // wait for main thread
- waitForMainSuspended();
+ public Measurement measurement(String key)
+ {
+ return context.getMeasurement(key);
+ }
- // [HB] System.out.println("Running " + this);
+ public void run()
+ {
+ try
+ {
+ // wait for main thread
+ waitForMainSuspended();
- // begin
- begin();
- Scheduler.startSimulation();
+ // [HB] System.out.println("Running " + this);
- Double totalSimTime = (Double) context.getConfig(EventSimulation.TOTAL_SIM_TIME);
- hold(totalSimTime);
+ // begin
+ begin();
+ Scheduler.startSimulation();
- // [HB] System.out.println("End simulation:" + this );
- // [HB] System.out.println("-----------");
+ Double totalSimTime = (Double) context.getConfig(EventSimulation.TOTAL_SIM_TIME);
+ hold(totalSimTime);
- // cleanup
- Scheduler.stopSimulation();
- end();
+ // [HB] System.out.println("End simulation:" + this );
+ // [HB] System.out.println("-----------");
- returnControl();
- }
- catch (Exception e)
- {
- e.printStackTrace();
- System.exit(-1);
- }
+ // cleanup
+ Scheduler.stopSimulation();
+ end();
- }
+ returnControl();
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ System.exit(-1);
+ }
- /**
- * Returns control to the test class thread
- */
- private void returnControl()
- {
- try
- {
- // [HB] System.out.println("Return control to main thread");
- SimulationProcess.mainResume();
- this.suspendProcess();
- } catch (Exception e)
- {
- e.printStackTrace();
- System.exit(-1);
- }
- }
-
- public static EventSimulation bootstrap(Properties config, URL bootstrap)
- {
- return new EventSimulation(config, bootstrap);
- }
+ }
- public static String getDRLFromResource(String resourceName)
- {
- try
- {
- URL url = Thread.currentThread().getContextClassLoader().getResource(resourceName);
- BufferedReader reader = new BufferedReader(
- new InputStreamReader(url.openStream())
- );
- StringBuffer sb = new StringBuffer();
- String line;
- while((line = reader.readLine()) != null)
- {
- sb.append(line);
- }
+ /**
+ * Returns control to the test class thread
+ */
+ private void returnControl()
+ {
+ try
+ {
+ // [HB] System.out.println("Return control to main thread");
+ SimulationProcess.mainResume();
+ this.suspendProcess();
+ } catch (Exception e)
+ {
+ e.printStackTrace();
+ System.exit(-1);
+ }
+ }
- return sb.toString();
- }
- catch (IOException e)
+ public static EventSimulation bootstrap(Properties config, URL bootstrap)
+ {
+ return new EventSimulation(config, bootstrap);
+ }
+
+ public static String getDRLFromResource(String resourceName)
+ {
+ try
+ {
+ URL url = Thread.currentThread().getContextClassLoader().getResource(resourceName);
+ BufferedReader reader = new BufferedReader(
+ new InputStreamReader(url.openStream())
+ );
+ StringBuffer sb = new StringBuffer();
+ String line;
+ while((line = reader.readLine()) != null)
{
- throw new RuntimeException("Failed to load DRL", e);
+ sb.append(line);
}
- }
+
+ return sb.toString();
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException("Failed to load DRL", e);
+ }
+ }
}
Modified: sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java
===================================================================
--- sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java 2009-07-13 21:17:58 UTC (rev 659)
+++ sam/trunk/modules/sim/src/main/java/org/jboss/sam/simulation/EventSourceEntity.java 2009-07-14 12:23:58 UTC (rev 660)
@@ -50,111 +50,112 @@
* <br>
* <b>Event ratio</b><br>
* Specifies the ratio with regard to the total simulation time (between 0.01-1)
- *
+ *
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
-public class EventSourceEntity extends SimulationEntity implements ContextAwareEntity
+public class EventSourceEntity extends SimulationEntity
+ implements ContextAwareEntity
{
- private String name;
- private Class eventMessageType;
- private double eventRatio;
- private InVMDispatcher dispatcher = null;
- private SimulationContext context = null;
- private EventMessageFactory factory = null;
+ private String name;
+ private Class eventMessageType;
+ private double eventRatio;
+ private InVMDispatcher dispatcher = null;
+ private SimulationContext context = null;
+ private EventMessageFactory factory = null;
- /**
- *
- * @param name the event source name
- * @param eventRatio event creation ratio wrt the total simulation time. Value between 0-1
- */
- public EventSourceEntity(String name, double eventRatio)
- {
- // thread setup
- setPriority(5);
- setName("EventSourceEntity {" + getName()+"}");
+ /**
+ *
+ * @param name the event source name
+ * @param eventRatio event creation ratio wrt the total simulation time. Value between 0-1
+ */
+ public EventSourceEntity(String name, double eventRatio)
+ {
+ // thread setup
+ setPriority(5);
+ setName("EventSourceEntity {" + getName()+"}");
- this.name = name;
+ this.name = name;
- if(eventRatio<=0 || eventRatio>1)
- throw new IllegalArgumentException("Invalid event ratio: " + eventRatio);
-
- this.eventMessageType = eventMessageType;
- this.eventRatio = eventRatio;
- }
+ if(eventRatio<=0 || eventRatio>1)
+ throw new IllegalArgumentException("Invalid event ratio: " + eventRatio);
- public void setContext(SimulationContext controller)
- {
- this.context = controller;
- }
+ this.eventMessageType = eventMessageType;
+ this.eventRatio = eventRatio;
+ }
- void setDispatcher(InVMDispatcher dispatcher)
- {
- this.dispatcher = dispatcher;
- }
+ public void setContext(SimulationContext controller)
+ {
+ this.context = controller;
+ }
- public void setEventMessageFactory(EventMessageFactory factory)
- {
- this.factory = factory;
- }
+ void setDispatcher(InVMDispatcher dispatcher)
+ {
+ this.dispatcher = dispatcher;
+ }
- public void run()
- {
- while (!terminated())
+ public void setEventMessageFactory(EventMessageFactory factory)
+ {
+ this.factory = factory;
+ }
+
+ public void run()
+ {
+ while (!terminated())
+ {
+ try
{
- try
- {
- double totalSim = (Double) context.getConfig(EventSimulation.TOTAL_SIM_TIME);
- double holdTime = (totalSim*eventRatio);
- hold(holdTime);
- }
- catch (SimulationException e)
- {
- e.printStackTrace();
- }
- catch (RestartException e)
- {
- e.printStackTrace();
- }
-
+ double totalSim = (Double) context.getConfig(EventSimulation.TOTAL_SIM_TIME);
+ double holdTime = (totalSim*eventRatio);
+ hold(holdTime);
+ }
+ catch (SimulationException e)
+ {
+ e.printStackTrace();
+ }
+ catch (RestartException e)
+ {
+ e.printStackTrace();
+ }
- if(null==context)
- throw new IllegalStateException("Simulation context not set");
- if(null==factory)
- throw new IllegalStateException("EventMessageFactory not set");
+ if(null==context)
+ throw new IllegalStateException("Simulation context not set");
- if(null==dispatcher)
- throw new IllegalStateException("EventDispatcher not set");
+ if(null==factory)
+ throw new IllegalStateException("EventMessageFactory not set");
- // Create and dispatch event
- Object event = factory.createEventMessage(this.context);
- this.dispatcher.dispatch(event);
+ if(null==dispatcher)
+ throw new IllegalStateException("EventDispatcher not set");
- }
+ // Create and dispatch event
+ Object event = factory.createEventMessage(this.context);
+ this.dispatcher.dispatch(event);
- // [HB] System.out.println("EventSource " + name + " was terminated");
- }
-
- public void begin()
- {
- try
- {
- this.activate();
- } catch (SimulationException e)
- {
- e.printStackTrace();
+ }
- } catch (RestartException e)
- {
- e.printStackTrace();
- }
- }
+ // [HB] System.out.println("EventSource " + name + " was terminated");
+ }
- public void end()
- {
- this.terminate();
- }
+ public void begin()
+ {
+ try
+ {
+ this.activate();
+ } catch (SimulationException e)
+ {
+ e.printStackTrace();
+ } catch (RestartException e)
+ {
+ e.printStackTrace();
+ }
+ }
+ public void end()
+ {
+ this.terminate();
+ }
+
+
}
Modified: sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/simulation/SimulationTestCase.java
===================================================================
--- sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/simulation/SimulationTestCase.java 2009-07-13 21:17:58 UTC (rev 659)
+++ sam/trunk/modules/sim/src/test/java/org/jboss/test/sam/simulation/SimulationTestCase.java 2009-07-14 12:23:58 UTC (rev 660)
@@ -86,7 +86,7 @@
// evaluate results
EventMessage lastEventMessage = context.getAttachment(EventMessage.class);
- assertNotNull(lastEventMessage);
+ assertNotNull("No event reveived", lastEventMessage);
assertEquals(12.00, lastEventMessage.getProperty("surveyValue"));
}
}
Modified: sam/trunk/modules/sim/src/test/resources/simulation/test.drl
===================================================================
--- sam/trunk/modules/sim/src/test/resources/simulation/test.drl 2009-07-13 21:17:58 UTC (rev 659)
+++ sam/trunk/modules/sim/src/test/resources/simulation/test.drl 2009-07-14 12:23:58 UTC (rev 660)
@@ -4,9 +4,14 @@
global org.jboss.sam.internal.drools.SAMAdapter SAM;
+# flag as event
+declare SensorEventMessage
+ @role( event )
+end
+
rule "Pick all sensor event messages"
when
- $event: SensorEventMessage()
+ $event: SensorEventMessage() from entry-point "InVM-Channel"
then
SAM.getListener("EventSink_B").update($event);
end
Added: sam/trunk/toplevel.iml
===================================================================
--- sam/trunk/toplevel.iml (rev 0)
+++ sam/trunk/toplevel.iml 2009-07-14 12:23:58 UTC (rev 660)
@@ -0,0 +1,185 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module version="4" relativePaths="true" type="JAVA_MODULE">
+ <component name="ModuleRootManager" />
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
+ <exclude-output />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/modules/core/src/main/java" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/modules/core/src/test/java" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/modules/core/src/test/resources" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/modules/sim/src/main/java" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/modules/sim/src/test/java" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/modules/sim/src/test/resources" isTestSource="true" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: commons-dbcp:commons-dbcp:jar:1.2.2:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../.m2/repository/commons-dbcp/commons-dbcp/1.2.2/commons-dbcp-1.2.2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: joda-time:joda-time:jar:1.6:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../.m2/repository/joda-time/joda-time/1.6/joda-time-1.6.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: javax.xml.stream:stax-api:jar:1.0-2:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: junit:junit:jar:3.8.2:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../.m2/repository/junit/junit/3.8.2/junit-3.8.2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root url="jar://$MODULE_DIR$/../../../../.m2/repository/junit/junit/3.8.2/junit-3.8.2-sources.jar!/" />
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: javasim:javasim:jar:2.0-hbraun:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../.m2/repository/javasim/javasim/2.0-hbraun/javasim-2.0-hbraun.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: commons-logging:commons-logging-api:jar:1.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../.m2/repository/commons-logging/commons-logging-api/1.1/commons-logging-api-1.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: com.sun.xml.bind:jaxb-impl:jar:2.1.6:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../.m2/repository/com/sun/xml/bind/jaxb-impl/2.1.6/jaxb-impl-2.1.6.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: org.eclipse.jdt:core:jar:3.4.2.v_883_R34x:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../.m2/repository/org/eclipse/jdt/core/3.4.2.v_883_R34x/core-3.4.2.v_883_R34x.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: javax.activation:activation:jar:1.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root url="jar://$MODULE_DIR$/../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1-sources.jar!/" />
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: hsqldb:hsqldb:jar:1.8.0.7:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../.m2/repository/hsqldb/hsqldb/1.8.0.7/hsqldb-1.8.0.7.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: commons-pool:commons-pool:jar:1.3:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../.m2/repository/commons-pool/commons-pool/1.3/commons-pool-1.3.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: org.mvel:mvel2:jar:2.0.10:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../.m2/repository/org/mvel/mvel2/2.0.10/mvel2-2.0.10.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: org.antlr:antlr-runtime:jar:3.1.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../.m2/repository/org/antlr/antlr-runtime/3.1.1/antlr-runtime-3.1.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: janino:janino:jar:2.5.15:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../.m2/repository/janino/janino/2.5.15/janino-2.5.15.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: org.drools:drools-core:jar:5.0.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../.m2/repository/org/drools/drools-core/5.0.1/drools-core-5.0.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: org.drools:drools-api:jar:5.0.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../.m2/repository/org/drools/drools-api/5.0.1/drools-api-5.0.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: org.drools:drools-compiler:jar:5.0.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../.m2/repository/org/drools/drools-compiler/5.0.1/drools-compiler-5.0.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntryProperties />
+ </component>
+</module>
+
17 years
Overlord SVN: r659 - in sam/trunk/modules/core/src: main/java/org/jboss/sam/config and 3 other directories.
by overlord-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-07-13 17:17:58 -0400 (Mon, 13 Jul 2009)
New Revision: 659
Modified:
sam/trunk/modules/core/src/main/java/org/jboss/sam/EventProcessor.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/Configurator.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java
sam/trunk/modules/core/src/test/java/org/jboss/test/sam/config/ConfigParserTestCase.java
sam/trunk/modules/core/src/test/resources/drools/sam-cfg.xml
Log:
Add drools runtime log property
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/EventProcessor.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/EventProcessor.java 2009-07-13 21:00:48 UTC (rev 658)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/EventProcessor.java 2009-07-13 21:17:58 UTC (rev 659)
@@ -22,6 +22,7 @@
package org.jboss.sam;
import java.util.Iterator;
+import java.util.Properties;
/**
* An event processor glues together {@link org.jboss.sam.StreamInput} and {@link org.jboss.sam.StreamOutput}
@@ -120,4 +121,5 @@
T getUnderlying();
+ void setProperties(Properties properties);
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/Configurator.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/Configurator.java 2009-07-13 21:00:48 UTC (rev 658)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/Configurator.java 2009-07-13 21:17:58 UTC (rev 659)
@@ -94,7 +94,7 @@
properties.put(prop.getName(), prop.getValue());
}
-
+ processor.setProperties(properties);
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java 2009-07-13 21:00:48 UTC (rev 658)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java 2009-07-13 21:17:58 UTC (rev 659)
@@ -40,6 +40,7 @@
import java.io.InputStreamReader;
import java.util.Iterator;
import java.util.Map;
+import java.util.Properties;
import java.util.concurrent.ConcurrentHashMap;
/**
@@ -49,7 +50,7 @@
implements EventProcessor<KnowledgeBase>, StreamInputCallback, Globals
{
private String name;
-
+
private KnowledgeBase kbase;
private StatefulKnowledgeSession session;
@@ -71,8 +72,6 @@
this.session = kbase.newStatefulKnowledgeSession();
this.session.getGlobals().setDelegate(this);
- KnowledgeRuntimeLogger logger = KnowledgeRuntimeLoggerFactory.newConsoleLogger(session);
-
}
catch (Exception e)
{
@@ -80,6 +79,13 @@
}
}
+ public void setProperties(Properties properties)
+ {
+ String runtimeLogProp = (String)properties.get("drools.runtimelog.enable");
+ if(runtimeLogProp!=null && runtimeLogProp.equals("true"))
+ KnowledgeRuntimeLoggerFactory.newConsoleLogger(session);
+ }
+
public void setRuntime(SAMRuntime runtime)
{
this.runtime = runtime;
Modified: sam/trunk/modules/core/src/test/java/org/jboss/test/sam/config/ConfigParserTestCase.java
===================================================================
--- sam/trunk/modules/core/src/test/java/org/jboss/test/sam/config/ConfigParserTestCase.java 2009-07-13 21:00:48 UTC (rev 658)
+++ sam/trunk/modules/core/src/test/java/org/jboss/test/sam/config/ConfigParserTestCase.java 2009-07-13 21:17:58 UTC (rev 659)
@@ -35,73 +35,77 @@
*/
public class ConfigParserTestCase extends TestCase
{
- private static byte[] XML_CONFIG = null;
+ private static byte[] XML_CONFIG = null;
- private ConfigFactory cfgFactory;
+ private ConfigFactory cfgFactory;
- protected void setUp() throws Exception
- {
- this.cfgFactory = ConfigFactory.newInstance();
- }
+ protected void setUp() throws Exception
+ {
+ this.cfgFactory = ConfigFactory.newInstance();
+ }
- public void testMarshalling() throws Exception
- {
- ConfigurationDef pnd = new ConfigurationDef("BPMEventProcessor", new URI("http://org.jboss.bpm/console"));
+ public void testMarshalling() throws Exception
+ {
+ ConfigurationDef configurationDef = new ConfigurationDef("BPMEventProcessor", new URI("http://org.jboss.bpm/console"));
- // define stream input and outputs
- pnd.getInputs().add( new StreamInputDef("VMInput", InVMStreamInput.class.getName()) );
- pnd.getOutputs().add( new StreamOutputDef("VMOutput", BufferedStreamOutput.class.getName()) );
+ // define stream input and outputs
+ configurationDef.getInputs().add( new StreamInputDef("VMInput", InVMStreamInput.class.getName()) );
+ configurationDef.getOutputs().add( new StreamOutputDef("VMOutput", BufferedStreamOutput.class.getName()) );
- // construct an EPL
- EPLDef epl = new EPLDef("drl");
- epl.setExpression(
+ // construct an EPL
+ EPLDef epl = new EPLDef("drl");
+ epl.setExpression(
"package org.jboss.test.sam.drools;\n" +
- "\n" +
- "import org.jboss.test.sam.drools.StockTick;\n" +
- "global org.jboss.sam.internal.drools.SAMAdapter SAM;\n" +
- "\n" +
- "rule \"Check event\"\n" +
- "when\n" +
- " $st: StockTick(symbol == \"ACME\")\n" +
- "then\n" +
- " SAM.getListener(\"VMOutput\").update($st);\n" +
- "end"
- );
+ "\n" +
+ "import org.jboss.test.sam.drools.StockTick;\n" +
+ "global org.jboss.sam.internal.drools.SAMAdapter SAM;\n" +
+ "\n" +
+ "rule \"Check event\"\n" +
+ "when\n" +
+ " $st: StockTick(symbol == \"ACME\")\n" +
+ "then\n" +
+ " SAM.getListener(\"VMOutput\").update($st);\n" +
+ "end"
+ );
- // add statements
- StatementDef stmtmDef = new StatementDef("ExampleStatement");
- stmtmDef.setEpl(epl);
+ // add statements
+ StatementDef stmtmDef = new StatementDef("ExampleStatement");
+ stmtmDef.setEpl(epl);
- pnd.getStatements().add(stmtmDef);
+ configurationDef.getStatements().add(stmtmDef);
- // database references
- DatabaseRefDef dbRef = new DatabaseRefDef("hsqlDB");
- DataSourceDef dsDef = new DataSourceDef("hsqlDS", "org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:SamTestSetup");
- dsDef.getConnectionArgs().add(new PropertyDef("user", "sa"));
- dsDef.getConnectionArgs().add(new PropertyDef("password", ""));
- dbRef.setDatasource(dsDef);
- pnd.getDatabases().add(dbRef);
+ // database references
+ DatabaseRefDef dbRef = new DatabaseRefDef("hsqlDB");
+ DataSourceDef dsDef = new DataSourceDef("hsqlDS", "org.hsqldb.jdbcDriver", "jdbc:hsqldb:mem:SamTestSetup");
+ dsDef.getConnectionArgs().add(new PropertyDef("user", "sa"));
+ dsDef.getConnectionArgs().add(new PropertyDef("password", ""));
+ dbRef.setDatasource(dsDef);
+ configurationDef.getDatabases().add(dbRef);
- // marshall it
- ByteArrayOutputStream bout = new ByteArrayOutputStream();
- cfgFactory.marshall(pnd, bout);
+ // properties
+ configurationDef.getProps().add(new PropertyDef("some", "value"));
- // use in unmarshall test
- this.XML_CONFIG = bout.toByteArray();
- }
+ // marshall it
+ ByteArrayOutputStream bout = new ByteArrayOutputStream();
+ cfgFactory.marshall(configurationDef, bout);
- public void testUnmarshalling() throws Exception
- {
- System.out.println("Config:\n" + new String(XML_CONFIG));
+ // use in unmarshall test
+ this.XML_CONFIG = bout.toByteArray();
+ }
- ConfigurationDef pnd = cfgFactory.unmarshall( new ByteArrayInputStream(XML_CONFIG));
+ public void testUnmarshalling() throws Exception
+ {
+ System.out.println("Config:\n" + new String(XML_CONFIG));
- assertNotNull("ProcessingNodeDef not unmarshalled", pnd);
- assertEquals("BPMEventProcessor", pnd.getName());
- assertEquals(1, pnd.getStatements().size());
- assertEquals(1, pnd.getInputs().size());
- assertEquals(1, pnd.getOutputs().size());
- assertEquals(0, pnd.getProps().size());
- assertNotNull("EPL is null", pnd.getStatements().get(0).getEpl().getExpression());
- }
+ ConfigurationDef configurationDef = cfgFactory.unmarshall( new ByteArrayInputStream(XML_CONFIG));
+
+ assertNotNull("ProcessingNodeDef not unmarshalled", configurationDef);
+ assertEquals("BPMEventProcessor", configurationDef.getName());
+ assertEquals(1, configurationDef.getStatements().size());
+ assertEquals(1, configurationDef.getInputs().size());
+ assertEquals(1, configurationDef.getOutputs().size());
+ assertEquals(1, configurationDef.getProps().size());
+ assertEquals("value", configurationDef.getProps().get(0).getValue());
+ assertNotNull("EPL is null", configurationDef.getStatements().get(0).getEpl().getExpression());
+ }
}
Modified: sam/trunk/modules/core/src/test/resources/drools/sam-cfg.xml
===================================================================
--- sam/trunk/modules/core/src/test/resources/drools/sam-cfg.xml 2009-07-13 21:00:48 UTC (rev 658)
+++ sam/trunk/modules/core/src/test/resources/drools/sam-cfg.xml 2009-07-13 21:17:58 UTC (rev 659)
@@ -1,9 +1,13 @@
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
-
-<ns2:processingNode name="DatabaseTestCase"
- domain="http://org.jboss.sam/test/database"
+
+<ns2:processingNode name="DroolsAPITestCase"
+ domain="http://org.jboss.sam/test/drools"
xmlns:ns2="http://org.jboss.sam/08/2008/">
+ <runtime-configuration>
+ <property name="drools.runtimelog.enable" value="true"/>
+ </runtime-configuration>
+
<statements/>
</ns2:processingNode>
\ No newline at end of file
17 years
Overlord SVN: r658 - in sam/trunk: modules/core and 12 other directories.
by overlord-commits@lists.jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-07-13 17:00:48 -0400 (Mon, 13 Jul 2009)
New Revision: 658
Removed:
sam/trunk/modules/core/src/test/resources/drools/aggregate.drl
Modified:
sam/trunk/modules/core/pom.xml
sam/trunk/modules/core/src/main/java/org/jboss/sam/EventMessage.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/EventProcessor.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/EventProcessorFactory.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/ProcessingStatement.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/SAMRuntime.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/SAMRuntimeAware.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/SAMRuntimeFactory.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/StreamInput.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/StreamInputCallback.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/StreamOutput.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/ConfigFactory.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/ConfigurationDef.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/Configurator.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/DataSourceDef.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/DatabaseRefDef.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/EPLDef.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/PropertyDef.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/StatementDef.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/StreamInputDef.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/StreamOutputDef.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/EPLValueAdapter.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/ExpressionConverter.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/NoCharacterEscapeHandler.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/datasource/DataSourceFactory.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/datasource/DataSourceManager.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/datasource/internal/DBCPDataSourceFactory.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/DefaultRuntimeFactory.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/DefaultRuntimeImpl.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/common/MapEventMessage.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsProcessingStatement.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/MapMessageAdapter.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/ObjectMessageAdaptor.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/SAMAdapter.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/StreamOutputAdapter.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/UpdateListener.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMDispatcher.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMStreamInput.java
sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMStreamRegistry.java
sam/trunk/modules/core/src/test/java/org/jboss/test/sam/drools/ApiTestCase.java
sam/trunk/modules/core/src/test/java/org/jboss/test/sam/drools/StockTick.java
sam/trunk/modules/core/src/test/resources/adapter/invm/sam-cfg.xml
sam/trunk/modules/core/src/test/resources/drools/forward.drl
sam/trunk/modules/core/src/test/resources/drools/sam-cfg.xml
sam/trunk/modules/core/src/test/resources/drools/simple.drl
sam/trunk/pom.xml
Log:
Update to drools 5.0.1
Modified: sam/trunk/modules/core/pom.xml
===================================================================
--- sam/trunk/modules/core/pom.xml 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/pom.xml 2009-07-13 21:00:48 UTC (rev 658)
@@ -58,11 +58,6 @@
<groupId>commons-logging</groupId>
<artifactId>commons-logging-api</artifactId>
</dependency>
-
- <dependency>
- <groupId>jfree</groupId>
- <artifactId>jfreechart</artifactId>
- </dependency>
<dependency>
<groupId>hsqldb</groupId>
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/EventMessage.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/EventMessage.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/EventMessage.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -27,35 +27,38 @@
* An event message will be send when an Event occurs.<br>
* It consist of a timestamp and associated event properties.
* EventMessage's are written to {@link org.jboss.sam.StreamOutput}'s.
- * <p>
- * EventMessage's can be mapped to {@link org.jboss.sam.chart.Chart}'s.
+ * <p/>
*
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public interface EventMessage<T>
{
- /**
- * Creation timestamp.
- * @return
- */
- long getTimestamp();
+ /**
+ * Creation timestamp.
+ *
+ * @return
+ */
+ long getTimestamp();
- /**
- * Get an event property by name
- * @param name
- * @return
- */
- Object getProperty(String name);
+ /**
+ * Get an event property by name
+ *
+ * @param name
+ * @return
+ */
+ Object getProperty(String name);
- /**
- * Iterate over event property names
- * @return
- */
- Iterator<String> getPropertyNames();
+ /**
+ * Iterate over event property names
+ *
+ * @return
+ */
+ Iterator<String> getPropertyNames();
- /**
- * Access the underlying implementation
- * @return
- */
- T getUnderlying();
+ /**
+ * Access the underlying implementation
+ *
+ * @return
+ */
+ T getUnderlying();
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/EventProcessor.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/EventProcessor.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/EventProcessor.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -27,89 +27,97 @@
* An event processor glues together {@link org.jboss.sam.StreamInput} and {@link org.jboss.sam.StreamOutput}
* and provides a way to register {@link org.jboss.sam.ProcessingStatement}'s,
* both bound (event forwarding) and unbound (event aggregation and filtering).
- * <p>
+ * <p/>
* Instances are created through {@link org.jboss.sam.EventProcessorFactory}
- *
+ *
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public interface EventProcessor<T> extends SAMRuntimeAware
{
- /**
- * Add input to the runtime
- * @param streamInput
- */
- void addInput(StreamInput streamInput);
+ /**
+ * Add input to the runtime
+ *
+ * @param streamInput
+ */
+ void addInput(StreamInput streamInput);
- /**
- * Remove input from the runtime
- * @param streamName
- */
- void removeInput(String streamName);
+ /**
+ * Remove input from the runtime
+ *
+ * @param streamName
+ */
+ void removeInput(String streamName);
- /**
- * Add output to the runtime
- * @param streamOutput
- */
- void addOutput(StreamOutput streamOutput);
+ /**
+ * Add output to the runtime
+ *
+ * @param streamOutput
+ */
+ void addOutput(StreamOutput streamOutput);
- /**
- * Remove output from the runtime
- * @param streamName
- */
- void removeOutput(String streamName);
+ /**
+ * Remove output from the runtime
+ *
+ * @param streamName
+ */
+ void removeOutput(String streamName);
- /**
- * Iterate over input adapter names
- * @return
- */
- Iterator<String> getStreamInputNames();
+ /**
+ * Iterate over input adapter names
+ *
+ * @return
+ */
+ Iterator<String> getStreamInputNames();
- /**
- * Iterate over output adapter names
- * @return
- */
- Iterator<String> getStreamOutputNames();
+ /**
+ * Iterate over output adapter names
+ *
+ * @return
+ */
+ Iterator<String> getStreamOutputNames();
- /**
- * Creates a statement
- *
- * @param statementName
- * @param epl
- * @return
- */
- ProcessingStatement registerStatement(String statementName, String epl);
+ /**
+ * Creates a statement
+ *
+ * @param statementName
+ * @param epl
+ * @return
+ */
+ ProcessingStatement registerStatement(String statementName, String epl);
- /**
- * Creates a statement and binds it to an output adapter.
- *
- * @param streamOutputName
- * @param statementName
- * @param epl
- * @return
- */
- ProcessingStatement registerBoundStatement(String streamOutputName, String statementName, String epl);
+ /**
+ * Creates a statement and binds it to an output adapter.
+ *
+ * @param streamOutputName
+ * @param statementName
+ * @param epl
+ * @return
+ */
+ ProcessingStatement registerBoundStatement(String streamOutputName, String statementName, String epl);
- /**
- * Cleanup a statement and remove it
- * @param statementName
- */
- void clearStatement(String statementName);
+ /**
+ * Cleanup a statement and remove it
+ *
+ * @param statementName
+ */
+ void clearStatement(String statementName);
- /**
- * Cleanup all statements and remove them
- */
- void clearAllStatements();
+ /**
+ * Cleanup all statements and remove them
+ */
+ void clearAllStatements();
- /**
- * Iterate over statement names
- * @return
- */
- Iterator<String> getStatementNames();
+ /**
+ * Iterate over statement names
+ *
+ * @return
+ */
+ Iterator<String> getStatementNames();
- String getName();
+ String getName();
- void setName(String name);
+ void setName(String name);
- T getUnderlying();
+ T getUnderlying();
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/EventProcessorFactory.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/EventProcessorFactory.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/EventProcessorFactory.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -28,23 +28,23 @@
*/
public abstract class EventProcessorFactory
{
- protected EventProcessorFactory()
- {
- }
+ protected EventProcessorFactory()
+ {
+ }
- public static EventProcessorFactory newInstance()
- {
- return new DefaultEventProcessorFactory();
- }
+ public static EventProcessorFactory newInstance()
+ {
+ return new DefaultEventProcessorFactory();
+ }
- public abstract EventProcessor createProcessor();
+ public abstract EventProcessor createProcessor();
- static class DefaultEventProcessorFactory extends EventProcessorFactory
- {
+ static class DefaultEventProcessorFactory extends EventProcessorFactory
+ {
- public EventProcessor createProcessor()
- {
- return new DroolsEventProcessorImpl();
- }
- }
+ public EventProcessor createProcessor()
+ {
+ return new DroolsEventProcessorImpl();
+ }
+ }
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/ProcessingStatement.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/ProcessingStatement.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/ProcessingStatement.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -26,32 +26,36 @@
* Statements are associated with a {@link org.jboss.sam.EventProcessor}
* and can be bound to a {@link org.jboss.sam.StreamOutput} to forward events,
* or used unbound to aggregate and filter events.
- *
+ *
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public interface ProcessingStatement<T>
{
- /**
- * Statements are managed by name
- * @return
- */
- String getName();
+ /**
+ * Statements are managed by name
+ *
+ * @return
+ */
+ String getName();
- /**
- * Get the EPL expression this statement was created from
- * @return
- */
- String getExpression();
-
- /**
- * Check wether the statement is bound to a {@link org.jboss.sam.StreamOutput}
- * @return
- */
- boolean isBound();
+ /**
+ * Get the EPL expression this statement was created from
+ *
+ * @return
+ */
+ String getExpression();
- /**
- * Access the underlying implementation
- * @return
- */
- T getUnderlying();
+ /**
+ * Check wether the statement is bound to a {@link org.jboss.sam.StreamOutput}
+ *
+ * @return
+ */
+ boolean isBound();
+
+ /**
+ * Access the underlying implementation
+ *
+ * @return
+ */
+ T getUnderlying();
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/SAMRuntime.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/SAMRuntime.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/SAMRuntime.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -21,20 +21,23 @@
*/
package org.jboss.sam;
+import org.jboss.sam.config.Configurator;
import org.jboss.sam.datasource.DataSourceManager;
-import org.jboss.sam.config.Configurator;
+import java.util.Properties;
+
/**
* Glues together SAM building blocks.
- *
+ *
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public interface SAMRuntime
{
- void applyConfiguration(Configurator cfg);
+ void applyConfiguration(Configurator cfg);
- DataSourceManager getDataSourceManager();
+ DataSourceManager getDataSourceManager();
- EventProcessor getEventProcessor();
+ EventProcessor getEventProcessor();
+
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/SAMRuntimeAware.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/SAMRuntimeAware.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/SAMRuntimeAware.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -22,12 +22,12 @@
package org.jboss.sam;
/**
- * Marks SAM components that need to interact with the runtime itself.
- *
+ * Marks SAM components that need to interact with the runtime itself.
+ *
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public interface SAMRuntimeAware
{
- void setRuntime(SAMRuntime runtime);
+ void setRuntime(SAMRuntime runtime);
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/SAMRuntimeFactory.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/SAMRuntimeFactory.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/SAMRuntimeFactory.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -29,10 +29,10 @@
*/
public abstract class SAMRuntimeFactory
{
- public abstract SAMRuntime createRuntime(Configurator configurator);
+ public abstract SAMRuntime createRuntime(Configurator configurator);
- public static SAMRuntimeFactory newInstance()
- {
- return new DefaultRuntimeFactory();
- }
+ public static SAMRuntimeFactory newInstance()
+ {
+ return new DefaultRuntimeFactory();
+ }
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/StreamInput.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/StreamInput.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/StreamInput.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -25,33 +25,35 @@
* Stream inputs are registered with {@link org.jboss.sam.EventProcessor}'s
* and notify registered {@link org.jboss.sam.StreamInputCallback}'s when new events arrive.
* Typically the CEP runtime itself act's as such a listener in order to finished events.
- *
+ *
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public interface StreamInput<T>
{
- <T extends StreamInput> T start();
+ <T extends StreamInput> T start();
- <T extends StreamInput> T stop();
+ <T extends StreamInput> T stop();
- boolean isStarted();
+ boolean isStarted();
- /**
- * Register a callback
- * @param streamInputCallback an event processing instance
- */
- void registerCallback(StreamInputCallback streamInputCallback);
+ /**
+ * Register a callback
+ *
+ * @param streamInputCallback an event processing instance
+ */
+ void registerCallback(StreamInputCallback streamInputCallback);
- /**
- * Remove all registered callbacks
- */
- void clearCallbacks();
+ /**
+ * Remove all registered callbacks
+ */
+ void clearCallbacks();
- /**
- * Stream input name
- * @return
- */
- String getStreamName();
+ /**
+ * Stream input name
+ *
+ * @return
+ */
+ String getStreamName();
- void setStreamName(String name);
+ void setStreamName(String name);
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/StreamInputCallback.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/StreamInputCallback.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/StreamInputCallback.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -23,10 +23,10 @@
/**
* Registered with a {@link StreamInput} and will be notified when new events arrive.
- *
+ *
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public interface StreamInputCallback
{
- void onEvent(Object args);
+ void onEvent(Object args);
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/StreamOutput.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/StreamOutput.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/StreamOutput.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -25,28 +25,30 @@
* Stream outputs are used to forward events. Typically the last step
* of an event processing chain leads to an action which receive events through
* the <code>write(...)</code> method.
- *
+ *
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public interface StreamOutput<T>
{
- <T extends StreamOutput> T start();
+ <T extends StreamOutput> T start();
- <T extends StreamOutput> T stop();
+ <T extends StreamOutput> T stop();
- boolean isStarted();
+ boolean isStarted();
- /**
- * Receive forwarded events
- * @param args an event adapter
- */
- void write(EventMessage[] args);
+ /**
+ * Receive forwarded events
+ *
+ * @param args an event adapter
+ */
+ void write(EventMessage[] args);
- /**
- * Stream output name
- * @return
- */
- String getStreamName();
+ /**
+ * Stream output name
+ *
+ * @return
+ */
+ String getStreamName();
- void setStreamName(String name);
+ void setStreamName(String name);
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/ConfigFactory.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/ConfigFactory.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/ConfigFactory.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -35,89 +35,94 @@
/**
* Marshall/Unmarshall processing node definitions.
- *
+ *
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public class ConfigFactory
{
- private ConfigFactory()
- {
- }
+ private ConfigFactory()
+ {
+ }
- public static ConfigFactory newInstance()
- {
- return new ConfigFactory();
- }
+ public static ConfigFactory newInstance()
+ {
+ return new ConfigFactory();
+ }
- public ConfigurationDef unmarshall(URL configFile)
- {
- try
- {
- return unmarshall(configFile.openStream());
-
- } catch (IOException e)
- {
- throw new RuntimeException("Failed to unmarshall " + configFile , e);
- }
- }
+ public ConfigurationDef unmarshall(URL configFile)
+ {
+ try
+ {
+ return unmarshall(configFile.openStream());
- public ConfigurationDef unmarshall(InputStream inputStream)
- {
- ConfigurationDef pnd = null;
-
- try
- {
- JAXBContext jaxb = JAXBContext.newInstance(ConfigurationDef.class);
- Unmarshaller unmarshaller = jaxb.createUnmarshaller();
- pnd = (ConfigurationDef) unmarshaller.unmarshal(inputStream);
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException("Failed to unmarshall " + configFile, e);
+ }
+ }
- } catch (Exception e)
- {
- throw new RuntimeException("Failed to unmarshall configuration" , e);
- }
- finally
- {
- if(inputStream!=null)
- try
- {
- inputStream.close();
- } catch (IOException e)
- {
- //
- }
- }
+ public ConfigurationDef unmarshall(InputStream inputStream)
+ {
+ ConfigurationDef pnd = null;
- return pnd;
+ try
+ {
+ JAXBContext jaxb = JAXBContext.newInstance(ConfigurationDef.class);
+ Unmarshaller unmarshaller = jaxb.createUnmarshaller();
+ pnd = (ConfigurationDef) unmarshaller.unmarshal(inputStream);
- }
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Failed to unmarshall configuration", e);
+ }
+ finally
+ {
+ if (inputStream != null)
+ try
+ {
+ inputStream.close();
+ }
+ catch (IOException e)
+ {
+ //
+ }
+ }
- public void marshall(ConfigurationDef pnd, OutputStream out)
- {
- try
- {
- JAXBContext jaxb = JAXBContext.newInstance(ConfigurationDef.class);
- Marshaller marshaller = jaxb.createMarshaller();
- marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
- // encoding needs to be different to UTF-8, otherwise the custom encode will not be used
- marshaller.setProperty(Marshaller.JAXB_ENCODING, "ISO-8859-1");
- marshaller.setProperty( CharacterEscapeHandler.class.getName(), new NoCharacterEscapeHandler());
- marshaller.marshal(pnd, out);
- } catch (JAXBException e)
- {
- throw new RuntimeException("Failed to marshall " + pnd, e);
- }
- finally
- {
- if(out!=null)
- try
- {
- out.close();
- } catch (IOException e)
- {
- //
- }
- }
- }
+ return pnd;
+ }
+
+ public void marshall(ConfigurationDef pnd, OutputStream out)
+ {
+ try
+ {
+ JAXBContext jaxb = JAXBContext.newInstance(ConfigurationDef.class);
+ Marshaller marshaller = jaxb.createMarshaller();
+ marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
+ // encoding needs to be different to UTF-8, otherwise the custom encode will not be used
+ marshaller.setProperty(Marshaller.JAXB_ENCODING, "ISO-8859-1");
+ marshaller.setProperty(CharacterEscapeHandler.class.getName(), new NoCharacterEscapeHandler());
+ marshaller.marshal(pnd, out);
+ }
+ catch (JAXBException e)
+ {
+ throw new RuntimeException("Failed to marshall " + pnd, e);
+ }
+ finally
+ {
+ if (out != null)
+ try
+ {
+ out.close();
+ }
+ catch (IOException e)
+ {
+ //
+ }
+ }
+ }
+
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/ConfigurationDef.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/ConfigurationDef.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/ConfigurationDef.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -23,125 +23,125 @@
import javax.xml.bind.annotation.*;
import java.net.URI;
+import java.util.ArrayList;
import java.util.List;
-import java.util.ArrayList;
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
@XmlRootElement(name = "processingNode", namespace = "http://org.jboss.sam/08/2008/")
@XmlType(
- name = "processingNodeType",
- namespace = "http://org.jboss.sam/08/2008/",
- propOrder = {
- "props", "databases", "inputs", "outputs", "statements"
- }
+ name = "processingNodeType",
+ namespace = "http://org.jboss.sam/08/2008/",
+ propOrder = {
+ "props", "databases", "inputs", "outputs", "statements"
+ }
)
public class ConfigurationDef
{
- private String name;
- private URI domain;
+ private String name;
+ private URI domain;
- private List<StatementDef> statements = new ArrayList<StatementDef>();
+ private List<StatementDef> statements = new ArrayList<StatementDef>();
- private List<StreamInputDef> inputs = new ArrayList<StreamInputDef>();
+ private List<StreamInputDef> inputs = new ArrayList<StreamInputDef>();
- private List<StreamOutputDef> outputs = new ArrayList<StreamOutputDef>();
+ private List<StreamOutputDef> outputs = new ArrayList<StreamOutputDef>();
- private List<PropertyDef> props = new ArrayList<PropertyDef>();
+ private List<PropertyDef> props = new ArrayList<PropertyDef>();
- private List<DatabaseRefDef> databases = new ArrayList<DatabaseRefDef>();
+ private List<DatabaseRefDef> databases = new ArrayList<DatabaseRefDef>();
- public ConfigurationDef()
- {
- }
+ public ConfigurationDef()
+ {
+ }
- public ConfigurationDef(String name, URI domain)
- {
- this.name = name;
- this.domain = domain;
- }
+ public ConfigurationDef(String name, URI domain)
+ {
+ this.name = name;
+ this.domain = domain;
+ }
- @XmlAttribute
- public String getName()
- {
- return name;
- }
+ @XmlAttribute
+ public String getName()
+ {
+ return name;
+ }
- public void setName(String name)
- {
- this.name = name;
- }
+ public void setName(String name)
+ {
+ this.name = name;
+ }
- @XmlAttribute
- public URI getDomain()
- {
- return domain;
- }
+ @XmlAttribute
+ public URI getDomain()
+ {
+ return domain;
+ }
- public void setDomain(URI domain)
- {
- this.domain = domain;
- }
+ public void setDomain(URI domain)
+ {
+ this.domain = domain;
+ }
- @XmlElementWrapper(name = "statements")
- @XmlElement(name="statement")
- public List<StatementDef> getStatements()
- {
- return statements;
- }
+ @XmlElementWrapper(name = "statements")
+ @XmlElement(name = "statement")
+ public List<StatementDef> getStatements()
+ {
+ return statements;
+ }
- public void setStatements(List<StatementDef> statements)
- {
- this.statements = statements;
- }
+ public void setStatements(List<StatementDef> statements)
+ {
+ this.statements = statements;
+ }
- @XmlElementWrapper(name = "inputs")
- @XmlElement(name="input")
- public List<StreamInputDef> getInputs()
- {
- return inputs;
- }
+ @XmlElementWrapper(name = "inputs")
+ @XmlElement(name = "input")
+ public List<StreamInputDef> getInputs()
+ {
+ return inputs;
+ }
- public void setInputs(List<StreamInputDef> inputs)
- {
- this.inputs = inputs;
- }
+ public void setInputs(List<StreamInputDef> inputs)
+ {
+ this.inputs = inputs;
+ }
- @XmlElementWrapper(name = "outputs")
- @XmlElement(name="output")
- public List<StreamOutputDef> getOutputs()
- {
- return outputs;
- }
+ @XmlElementWrapper(name = "outputs")
+ @XmlElement(name = "output")
+ public List<StreamOutputDef> getOutputs()
+ {
+ return outputs;
+ }
- public void setOutputs(List<StreamOutputDef> outputs)
- {
- this.outputs = outputs;
- }
+ public void setOutputs(List<StreamOutputDef> outputs)
+ {
+ this.outputs = outputs;
+ }
- @XmlElementWrapper(name = "runtime-configuration")
- @XmlElement(name="property")
- public List<PropertyDef> getProps()
- {
- return props;
- }
+ @XmlElementWrapper(name = "runtime-configuration")
+ @XmlElement(name = "property")
+ public List<PropertyDef> getProps()
+ {
+ return props;
+ }
- public void setProps(List<PropertyDef> props)
- {
- this.props = props;
- }
+ public void setProps(List<PropertyDef> props)
+ {
+ this.props = props;
+ }
- @XmlElementWrapper(name = "database-references")
- @XmlElement(name="database-reference")
- public List<DatabaseRefDef> getDatabases()
- {
- return databases;
- }
+ @XmlElementWrapper(name = "database-references")
+ @XmlElement(name = "database-reference")
+ public List<DatabaseRefDef> getDatabases()
+ {
+ return databases;
+ }
- public void setDatabases(List<DatabaseRefDef> databases)
- {
- this.databases = databases;
- }
+ public void setDatabases(List<DatabaseRefDef> databases)
+ {
+ this.databases = databases;
+ }
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/Configurator.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/Configurator.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/Configurator.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -24,93 +24,103 @@
import org.jboss.sam.EventProcessor;
import org.jboss.sam.StreamInput;
import org.jboss.sam.StreamOutput;
+import org.jboss.sam.datasource.DataSourceFactory;
import org.jboss.sam.datasource.DataSourceManager;
-import org.jboss.sam.datasource.DataSourceFactory;
import javax.sql.DataSource;
+import java.util.Properties;
/**
* An intermediary to configure {@link org.jboss.sam.SAMRuntime}'s
* from configuration descriptors. <br>
* Allows for interception/modification of configuration values before the
* actuall configuration is applied to runtime components.
- *
+ *
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public class Configurator
{
- private ClassLoader loader = Thread.currentThread().getContextClassLoader();
- private ConfigurationDef nodeDef;
-
- public Configurator(ConfigurationDef nodeDef, ClassLoader loader)
- {
- this.nodeDef = nodeDef;
- this.loader = loader;
- }
+ private ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ private ConfigurationDef configTree;
- public Configurator(ConfigurationDef nodeDef)
- {
- this.nodeDef = nodeDef;
- }
+ public Configurator(ConfigurationDef configTree, ClassLoader loader)
+ {
+ this.configTree = configTree;
+ this.loader = loader;
+ }
- public void configure(EventProcessor processor)
- {
- processor.setName( nodeDef.getName() );
+ public Configurator(ConfigurationDef configTree)
+ {
+ this.configTree = configTree;
+ }
- for(StreamInputDef def : nodeDef.getInputs())
- {
- StreamInput input = (StreamInput)newInstance(def.getClazz());
- input.setStreamName(def.getName());
- processor.addInput(input);
- }
+ public void configure(EventProcessor processor)
+ {
+ processor.setName(configTree.getName());
- for(StreamOutputDef def : nodeDef.getOutputs())
- {
- StreamOutput output = (StreamOutput)newInstance(def.getClazz());
- output.setStreamName(def.getName());
- processor.addOutput(output);
- }
+ for (StreamInputDef def : configTree.getInputs())
+ {
+ StreamInput input = (StreamInput) newInstance(def.getClazz());
+ input.setStreamName(def.getName());
+ processor.addInput(input);
+ }
- for(StatementDef def : nodeDef.getStatements())
- {
- if(def.getBoundTo()!=null)
- {
- processor.registerBoundStatement(
- def.getBoundTo(), def.getName(), def.getEpl().getExpression()
- );
- }
- else
- {
- processor.registerStatement(
- def.getName(), def.getEpl().getExpression()
- );
- }
- }
- }
+ for (StreamOutputDef def : configTree.getOutputs())
+ {
+ StreamOutput output = (StreamOutput) newInstance(def.getClazz());
+ output.setStreamName(def.getName());
+ processor.addOutput(output);
+ }
- public void configure(DataSourceManager manager)
- {
- DataSourceFactory dsFactory = DataSourceFactory.newInstance();
-
- for(DatabaseRefDef def : this.nodeDef.getDatabases())
+ for (StatementDef def : configTree.getStatements())
+ {
+ if (def.getBoundTo() != null)
{
- DataSource ds = dsFactory.createDataSource(def.getDatasource());
- manager.addDataSource(def.getName(), ds);
+ processor.registerBoundStatement(
+ def.getBoundTo(), def.getName(), def.getEpl().getExpression()
+ );
}
- }
-
- private Object newInstance(String clazz)
- {
- Object obj = null;
- try
+ else
{
- obj = loader.loadClass( clazz ).newInstance();
+ processor.registerStatement(
+ def.getName(), def.getEpl().getExpression()
+ );
}
- catch (Exception e)
- {
- throw new RuntimeException("Failed to load class: " + clazz, e);
- }
+ }
- return obj;
- }
+ Properties properties = new Properties();
+ for(PropertyDef prop : configTree.getProps())
+ {
+ properties.put(prop.getName(), prop.getValue());
+ }
+
+
+
+ }
+
+ public void configure(DataSourceManager manager)
+ {
+ DataSourceFactory dsFactory = DataSourceFactory.newInstance();
+
+ for (DatabaseRefDef def : this.configTree.getDatabases())
+ {
+ DataSource ds = dsFactory.createDataSource(def.getDatasource());
+ manager.addDataSource(def.getName(), ds);
+ }
+ }
+
+ private Object newInstance(String clazz)
+ {
+ Object obj = null;
+ try
+ {
+ obj = loader.loadClass(clazz).newInstance();
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Failed to load class: " + clazz, e);
+ }
+
+ return obj;
+ }
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/DataSourceDef.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/DataSourceDef.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/DataSourceDef.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -21,11 +21,11 @@
*/
package org.jboss.sam.config;
+import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
-import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
+import java.util.ArrayList;
import java.util.List;
-import java.util.ArrayList;
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
@@ -33,65 +33,65 @@
@XmlType(name = "dataSourceDefType")
public class DataSourceDef
{
- private String name;
- private String driver;
- private String url;
+ private String name;
+ private String driver;
+ private String url;
- private List<PropertyDef> connectionArgs = new ArrayList<PropertyDef>();
+ private List<PropertyDef> connectionArgs = new ArrayList<PropertyDef>();
- public DataSourceDef()
- {
- }
+ public DataSourceDef()
+ {
+ }
- public DataSourceDef(String name, String driver, String url)
- {
- this.name = name;
- this.driver = driver;
- this.url = url;
- }
+ public DataSourceDef(String name, String driver, String url)
+ {
+ this.name = name;
+ this.driver = driver;
+ this.url = url;
+ }
- @XmlAttribute
- public String getUrl()
- {
- return url;
- }
+ @XmlAttribute
+ public String getUrl()
+ {
+ return url;
+ }
- public void setUrl(String url)
- {
- this.url = url;
- }
+ public void setUrl(String url)
+ {
+ this.url = url;
+ }
- @XmlAttribute
- public String getName()
- {
- return name;
- }
+ @XmlAttribute
+ public String getName()
+ {
+ return name;
+ }
- public void setName(String name)
- {
- this.name = name;
- }
+ public void setName(String name)
+ {
+ this.name = name;
+ }
- @XmlAttribute
- public String getDriver()
- {
- return driver;
- }
+ @XmlAttribute
+ public String getDriver()
+ {
+ return driver;
+ }
- public void setDriver(String driver)
- {
- this.driver = driver;
- }
-
- @XmlElement(name="connection-arg")
- public List<PropertyDef> getConnectionArgs()
- {
- return connectionArgs;
- }
+ public void setDriver(String driver)
+ {
+ this.driver = driver;
+ }
- public void setConnectionArgs(List<PropertyDef> connectionArgs)
- {
- this.connectionArgs = connectionArgs;
- }
+ @XmlElement(name = "connection-arg")
+ public List<PropertyDef> getConnectionArgs()
+ {
+ return connectionArgs;
+ }
+
+ public void setConnectionArgs(List<PropertyDef> connectionArgs)
+ {
+ this.connectionArgs = connectionArgs;
+ }
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/DatabaseRefDef.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/DatabaseRefDef.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/DatabaseRefDef.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -27,39 +27,39 @@
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
-@XmlType(name="databaseRefDefType")
+@XmlType(name = "databaseRefDefType")
public class DatabaseRefDef
{
- private String name;
- private DataSourceDef dataSource;
+ private String name;
+ private DataSourceDef dataSource;
- public DatabaseRefDef()
- {
- }
+ public DatabaseRefDef()
+ {
+ }
- public DatabaseRefDef(String name)
- {
- this.name = name;
- }
+ public DatabaseRefDef(String name)
+ {
+ this.name = name;
+ }
- @XmlAttribute
- public String getName()
- {
- return name;
- }
+ @XmlAttribute
+ public String getName()
+ {
+ return name;
+ }
- public void setName(String name)
- {
- this.name = name;
- }
+ public void setName(String name)
+ {
+ this.name = name;
+ }
- public DataSourceDef getDatasource()
- {
- return dataSource;
- }
+ public DataSourceDef getDatasource()
+ {
+ return dataSource;
+ }
- public void setDatasource(DataSourceDef dataSource)
- {
- this.dataSource = dataSource;
- }
+ public void setDatasource(DataSourceDef dataSource)
+ {
+ this.dataSource = dataSource;
+ }
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/EPLDef.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/EPLDef.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/EPLDef.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -23,8 +23,8 @@
import org.jboss.sam.config.internal.EPLValueAdapter;
+import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlValue;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
@@ -34,38 +34,38 @@
@XmlType(name = "eplType")
public class EPLDef
{
- private String lang;
- private String expression;
+ private String lang;
+ private String expression;
- public EPLDef()
- {
- }
+ public EPLDef()
+ {
+ }
- public EPLDef(String lang)
- {
- this.lang = lang;
- }
+ public EPLDef(String lang)
+ {
+ this.lang = lang;
+ }
- @XmlAttribute(required = true)
- public String getLang()
- {
- return lang;
- }
+ @XmlAttribute(required = true)
+ public String getLang()
+ {
+ return lang;
+ }
- public void setLang(String lang)
- {
- this.lang = lang;
- }
+ public void setLang(String lang)
+ {
+ this.lang = lang;
+ }
- @XmlValue
- @XmlJavaTypeAdapter(EPLValueAdapter.class)
- public String getExpression()
- {
- return expression;
- }
+ @XmlValue
+ @XmlJavaTypeAdapter(EPLValueAdapter.class)
+ public String getExpression()
+ {
+ return expression;
+ }
- public void setExpression(String expression)
- {
- this.expression = expression;
- }
+ public void setExpression(String expression)
+ {
+ this.expression = expression;
+ }
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/PropertyDef.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/PropertyDef.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/PropertyDef.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -28,44 +28,45 @@
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
@XmlType(
- name = "propertyDefType",
- propOrder = {"name", "value"}
+ name = "propertyDefType",
+ propOrder = {"name", "value"}
)
public class PropertyDef
{
- private String name;
- private String value;
+ private String name;
+ private String value;
- public PropertyDef()
- {
- }
+ public PropertyDef()
+ {
+ }
- public PropertyDef(String name, String value)
- {
- this.name = name;
- this.value = value;
- }
+ public PropertyDef(String name, String value)
+ {
+ this.name = name;
+ this.value = value;
+ }
- @XmlAttribute
- public String getName()
- {
- return name;
- }
+ @XmlAttribute
+ public String getName()
+ {
+ return name;
+ }
- public void setName(String name)
- {
- this.name = name;
- }
+ public void setName(String name)
+ {
+ this.name = name;
+ }
- @XmlAttribute
- public String getValue()
- {
- return value;
- }
+ @XmlAttribute
+ public String getValue()
+ {
+ return value;
+ }
- public void setValue(String value)
- {
- this.value = value;
- }
+ public void setValue(String value)
+ {
+ this.value = value;
+ }
+
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/StatementDef.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/StatementDef.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/StatementDef.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -31,54 +31,54 @@
public class StatementDef
{
- private String name;
- private EPLDef epl;
- private String boundTo;
+ private String name;
+ private EPLDef epl;
+ private String boundTo;
- public StatementDef()
- {
- }
+ public StatementDef()
+ {
+ }
- public StatementDef(String name)
- {
- this.name = name;
- }
+ public StatementDef(String name)
+ {
+ this.name = name;
+ }
- public StatementDef(String name, String boundTo)
- {
- this.name = name;
- this.boundTo = boundTo;
- }
+ public StatementDef(String name, String boundTo)
+ {
+ this.name = name;
+ this.boundTo = boundTo;
+ }
- @XmlAttribute(required = true)
- public String getName()
- {
- return name;
- }
+ @XmlAttribute(required = true)
+ public String getName()
+ {
+ return name;
+ }
- public void setName(String name)
- {
- this.name = name;
- }
+ public void setName(String name)
+ {
+ this.name = name;
+ }
- public EPLDef getEpl()
- {
- return epl;
- }
+ public EPLDef getEpl()
+ {
+ return epl;
+ }
- public void setEpl(EPLDef epl)
- {
- this.epl = epl;
- }
+ public void setEpl(EPLDef epl)
+ {
+ this.epl = epl;
+ }
- @XmlAttribute(required = false)
- public String getBoundTo()
- {
- return boundTo;
- }
+ @XmlAttribute(required = false)
+ public String getBoundTo()
+ {
+ return boundTo;
+ }
- public void setBoundTo(String boundTo)
- {
- this.boundTo = boundTo;
- }
+ public void setBoundTo(String boundTo)
+ {
+ this.boundTo = boundTo;
+ }
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/StreamInputDef.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/StreamInputDef.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/StreamInputDef.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -21,8 +21,8 @@
*/
package org.jboss.sam.config;
+import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlAttribute;
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
@@ -30,38 +30,38 @@
@XmlType(name = "inputDefType")
public class StreamInputDef
{
- private String name;
- private String clazz;
+ private String name;
+ private String clazz;
- public StreamInputDef()
- {
- }
+ public StreamInputDef()
+ {
+ }
- public StreamInputDef(String name, String clazz)
- {
- this.name = name;
- this.clazz = clazz;
- }
+ public StreamInputDef(String name, String clazz)
+ {
+ this.name = name;
+ this.clazz = clazz;
+ }
- @XmlAttribute(required = true)
- public String getName()
- {
- return name;
- }
+ @XmlAttribute(required = true)
+ public String getName()
+ {
+ return name;
+ }
- public void setName(String name)
- {
- this.name = name;
- }
+ public void setName(String name)
+ {
+ this.name = name;
+ }
- @XmlAttribute(required = true)
- public String getClazz()
- {
- return clazz;
- }
+ @XmlAttribute(required = true)
+ public String getClazz()
+ {
+ return clazz;
+ }
- public void setClazz(String clazz)
- {
- this.clazz = clazz;
- }
+ public void setClazz(String clazz)
+ {
+ this.clazz = clazz;
+ }
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/StreamOutputDef.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/StreamOutputDef.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/StreamOutputDef.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -21,8 +21,8 @@
*/
package org.jboss.sam.config;
+import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
-import javax.xml.bind.annotation.XmlAttribute;
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
@@ -30,38 +30,38 @@
@XmlType(name = "outputDefType")
public class StreamOutputDef
{
- private String name;
- private String clazz;
+ private String name;
+ private String clazz;
- public StreamOutputDef()
- {
- }
+ public StreamOutputDef()
+ {
+ }
- public StreamOutputDef(String name, String clazz)
- {
- this.name = name;
- this.clazz = clazz;
- }
+ public StreamOutputDef(String name, String clazz)
+ {
+ this.name = name;
+ this.clazz = clazz;
+ }
- @XmlAttribute(required = true)
- public String getName()
- {
- return name;
- }
+ @XmlAttribute(required = true)
+ public String getName()
+ {
+ return name;
+ }
- public void setName(String name)
- {
- this.name = name;
- }
+ public void setName(String name)
+ {
+ this.name = name;
+ }
- @XmlAttribute(required = true)
- public String getClazz()
- {
- return clazz;
- }
+ @XmlAttribute(required = true)
+ public String getClazz()
+ {
+ return clazz;
+ }
- public void setClazz(String clazz)
- {
- this.clazz = clazz;
- }
+ public void setClazz(String clazz)
+ {
+ this.clazz = clazz;
+ }
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/EPLValueAdapter.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/EPLValueAdapter.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/EPLValueAdapter.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -29,30 +29,30 @@
public class EPLValueAdapter extends XmlAdapter<String, String>
{
- public String unmarshal(String expr) throws Exception
- {
- String result = expr;
+ public String unmarshal(String expr) throws Exception
+ {
+ String result = expr;
- if(expr.indexOf("<![CDATA[") !=-1) // seems that JAXB strips it by default
- {
- result = expr.substring(
- expr.indexOf("<![CDATA[")+1, expr.indexOf("]]")
- );
- }
+ if (expr.indexOf("<![CDATA[") != -1) // seems that JAXB strips it by default
+ {
+ result = expr.substring(
+ expr.indexOf("<![CDATA[") + 1, expr.indexOf("]]")
+ );
+ }
- return result;
- }
+ return result;
+ }
- public String marshal(String expr) throws Exception
- {
- if(expr.indexOf("<![CDATA[") !=-1)
- throw new IllegalArgumentException("EPLDef.expression may not contain CDATA section");
+ public String marshal(String expr) throws Exception
+ {
+ if (expr.indexOf("<![CDATA[") != -1)
+ throw new IllegalArgumentException("EPLDef.expression may not contain CDATA section");
- StringBuffer sb = new StringBuffer();
- sb.append("<![CDATA[").append("\n");
- sb.append(expr).append("\n");
- sb.append("]]>");
+ StringBuffer sb = new StringBuffer();
+ sb.append("<![CDATA[").append("\n");
+ sb.append(expr).append("\n");
+ sb.append("]]>");
- return sb.toString();
- }
+ return sb.toString();
+ }
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/ExpressionConverter.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/ExpressionConverter.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/ExpressionConverter.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -25,44 +25,47 @@
public class ExpressionConverter
{
- /**
- * Convert an expression from an XML file into an internal representation. JAXB will
- * probably have already stripped off the CDATA encapsulation. As a result, this method
- * simply invokes the JAXB type conversion for strings but does not take any other action.
- *
- * @param text an XML-compliant expression
- * @return a pure string expression
- */
- public static String parse(String text) {
- String result = DatatypeConverter.parseString(text);
- return result;
- }
+ /**
+ * Convert an expression from an XML file into an internal representation. JAXB will
+ * probably have already stripped off the CDATA encapsulation. As a result, this method
+ * simply invokes the JAXB type conversion for strings but does not take any other action.
+ *
+ * @param text an XML-compliant expression
+ * @return a pure string expression
+ */
+ public static String parse(String text)
+ {
+ String result = DatatypeConverter.parseString(text);
+ return result;
+ }
- /**
- * Convert an expression from its internal representation to an XML-compliant version.
- * This method will simply surround the string in a CDATA block and return the result.
- *
- * @param text a pure string expression
- * @return the expression encapsulated within a CDATA block
- */
- public static String print(String text) {
- StringBuffer sb = new StringBuffer(text.length() + 20); //should add the length of the CDATA tags + 8 EOLs to be safe
- sb.append("<![CDATA[");
- sb.append(wrapLines(text, 80));
- sb.append("]]>");
- return DatatypeConverter.printString(sb.toString());
- }
+ /**
+ * Convert an expression from its internal representation to an XML-compliant version.
+ * This method will simply surround the string in a CDATA block and return the result.
+ *
+ * @param text a pure string expression
+ * @return the expression encapsulated within a CDATA block
+ */
+ public static String print(String text)
+ {
+ StringBuffer sb = new StringBuffer(text.length() + 20); //should add the length of the CDATA tags + 8 EOLs to be safe
+ sb.append("<![CDATA[");
+ sb.append(wrapLines(text, 80));
+ sb.append("]]>");
+ return DatatypeConverter.printString(sb.toString());
+ }
- /**
- * Provides line-wrapping for long text strings. EOL indicators are inserted at
- * word boundaries once a specified line-length has been exceeded.
- *
- * @param text the string to be wrapped
- * @param lineLength the maximum number of characters that should be included in a single line
- * @return the new string with appropriate EOL insertions
- */
- private static String wrapLines(String text, int lineLength) {
- //wrap logic, watchout for quoted strings!!!!
- return text;
- }
+ /**
+ * Provides line-wrapping for long text strings. EOL indicators are inserted at
+ * word boundaries once a specified line-length has been exceeded.
+ *
+ * @param text the string to be wrapped
+ * @param lineLength the maximum number of characters that should be included in a single line
+ * @return the new string with appropriate EOL insertions
+ */
+ private static String wrapLines(String text, int lineLength)
+ {
+ //wrap logic, watchout for quoted strings!!!!
+ return text;
+ }
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/NoCharacterEscapeHandler.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/NoCharacterEscapeHandler.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/config/internal/NoCharacterEscapeHandler.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -28,44 +28,58 @@
public class NoCharacterEscapeHandler implements CharacterEscapeHandler
{
- /**
- * Escape characters inside the buffer and send the output to the writer.
- *
- * @param buf buffer of characters to be encoded
- * @param start the index position of the first character that should be encoded
- * @param len the number of characters that should be encoded
- * @param isAttValue true, if the buffer represents an XML tag attribute
- * @param out the output stream
- *
- * @throws java.io.IOException if the writing process fails
- */
- public void escape(char[] buf, int start, int len, boolean isAttValue, Writer out) throws IOException
- {
- for (int i = start; i < start + len; i++) {
- char ch = buf[i];
- if (isAttValue) {
- // isAttValue is set to true when the marshaller is processing
- // attribute values. Inside attribute values, there are more
- // things you need to escape, usually.
- if (ch == '&') {
- out.write("&");
- } else if (ch == '>') {
- out.write(">");
- } else if (ch == '<') {
- out.write("");
- } else if (ch == '\'') {
- out.write("'");
- } else if (ch > 0x7F) {
- // escape everything above ASCII to XXXX;
- out.write("&#x");
- out.write(Integer.toHexString(ch));
- out.write(";");
- } else {
- out.write(ch);
- }
- } else {
- out.write(ch);
- }
- }
- }
+ /**
+ * Escape characters inside the buffer and send the output to the writer.
+ *
+ * @param buf buffer of characters to be encoded
+ * @param start the index position of the first character that should be encoded
+ * @param len the number of characters that should be encoded
+ * @param isAttValue true, if the buffer represents an XML tag attribute
+ * @param out the output stream
+ * @throws java.io.IOException if the writing process fails
+ */
+ public void escape(char[] buf, int start, int len, boolean isAttValue, Writer out) throws IOException
+ {
+ for (int i = start; i < start + len; i++)
+ {
+ char ch = buf[i];
+ if (isAttValue)
+ {
+ // isAttValue is set to true when the marshaller is processing
+ // attribute values. Inside attribute values, there are more
+ // things you need to escape, usually.
+ if (ch == '&')
+ {
+ out.write("&");
+ }
+ else if (ch == '>')
+ {
+ out.write(">");
+ }
+ else if (ch == '<')
+ {
+ out.write("");
+ }
+ else if (ch == '\'')
+ {
+ out.write("'");
+ }
+ else if (ch > 0x7F)
+ {
+ // escape everything above ASCII to XXXX;
+ out.write("&#x");
+ out.write(Integer.toHexString(ch));
+ out.write(";");
+ }
+ else
+ {
+ out.write(ch);
+ }
+ }
+ else
+ {
+ out.write(ch);
+ }
+ }
+ }
}
\ No newline at end of file
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/datasource/DataSourceFactory.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/datasource/DataSourceFactory.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/datasource/DataSourceFactory.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -30,12 +30,12 @@
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public abstract class DataSourceFactory
-{
- public static DataSourceFactory newInstance()
- {
- return new DBCPDataSourceFactory();
- }
+{
+ public static DataSourceFactory newInstance()
+ {
+ return new DBCPDataSourceFactory();
+ }
- public abstract DataSource createDataSource(DataSourceDef dsDef);
+ public abstract DataSource createDataSource(DataSourceDef dsDef);
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/datasource/DataSourceManager.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/datasource/DataSourceManager.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/datasource/DataSourceManager.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -30,29 +30,29 @@
*/
public class DataSourceManager
{
- private Map<String, DataSource> datasources = new ConcurrentHashMap<String, DataSource>();
+ private Map<String, DataSource> datasources = new ConcurrentHashMap<String, DataSource>();
- public void addDataSource(String reference, DataSource ds)
- {
- if(datasources.containsKey(reference))
- throw new IllegalArgumentException("DataSource '" + reference + "' does already exist!");
-
- this.datasources.put(reference, ds);
- }
+ public void addDataSource(String reference, DataSource ds)
+ {
+ if (datasources.containsKey(reference))
+ throw new IllegalArgumentException("DataSource '" + reference + "' does already exist!");
- public DataSource getDataSource(String reference)
- {
- DataSource ds = datasources.get(reference);
- if(null==ds)
- throw new IllegalArgumentException("No DataSource for reference '" + reference + "'");
+ this.datasources.put(reference, ds);
+ }
- return ds;
- }
+ public DataSource getDataSource(String reference)
+ {
+ DataSource ds = datasources.get(reference);
+ if (null == ds)
+ throw new IllegalArgumentException("No DataSource for reference '" + reference + "'");
- public boolean hasDataSource(String reference)
- {
- return datasources.containsKey(reference);
- }
+ return ds;
+ }
+ public boolean hasDataSource(String reference)
+ {
+ return datasources.containsKey(reference);
+ }
+
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/datasource/internal/DBCPDataSourceFactory.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/datasource/internal/DBCPDataSourceFactory.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/datasource/internal/DBCPDataSourceFactory.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -21,14 +21,14 @@
*/
package org.jboss.sam.datasource.internal;
-import org.jboss.sam.config.DataSourceDef;
-import org.jboss.sam.datasource.DataSourceFactory;
-import org.apache.commons.pool.ObjectPool;
-import org.apache.commons.pool.impl.GenericObjectPool;
import org.apache.commons.dbcp.ConnectionFactory;
import org.apache.commons.dbcp.DriverManagerConnectionFactory;
import org.apache.commons.dbcp.PoolableConnectionFactory;
import org.apache.commons.dbcp.PoolingDataSource;
+import org.apache.commons.pool.ObjectPool;
+import org.apache.commons.pool.impl.GenericObjectPool;
+import org.jboss.sam.config.DataSourceDef;
+import org.jboss.sam.datasource.DataSourceFactory;
import javax.sql.DataSource;
@@ -38,53 +38,54 @@
public class DBCPDataSourceFactory extends DataSourceFactory
{
- public DBCPDataSourceFactory()
- {
- }
+ public DBCPDataSourceFactory()
+ {
+ }
- public DataSource createDataSource(DataSourceDef dsDef)
- {
- try {
- Class.forName(dsDef.getDriver());
- }
- catch (ClassNotFoundException e)
- {
- throw new RuntimeException("Failed to load JDBC driver: " + dsDef.getDriver(), e);
- }
+ public DataSource createDataSource(DataSourceDef dsDef)
+ {
+ try
+ {
+ Class.forName(dsDef.getDriver());
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new RuntimeException("Failed to load JDBC driver: " + dsDef.getDriver(), e);
+ }
- //
- // First, we'll need a ObjectPool that serves as the
- // actual pool of connections.
- //
- // We'll use a GenericObjectPool instance, although
- // any ObjectPool implementation will suffice.
- //
- ObjectPool connectionPool = new GenericObjectPool(null);
+ //
+ // First, we'll need a ObjectPool that serves as the
+ // actual pool of connections.
+ //
+ // We'll use a GenericObjectPool instance, although
+ // any ObjectPool implementation will suffice.
+ //
+ ObjectPool connectionPool = new GenericObjectPool(null);
- //
- // Next, we'll create a ConnectionFactory that the
- // pool will use to create Connections.
- // We'll use the DriverManagerConnectionFactory,
- // using the connect string passed in the command line
- // arguments.
- //
- ConnectionFactory connectionFactory = new DriverManagerConnectionFactory(dsDef.getUrl(),null);
+ //
+ // Next, we'll create a ConnectionFactory that the
+ // pool will use to create Connections.
+ // We'll use the DriverManagerConnectionFactory,
+ // using the connect string passed in the command line
+ // arguments.
+ //
+ ConnectionFactory connectionFactory = new DriverManagerConnectionFactory(dsDef.getUrl(), null);
- //
- // Now we'll create the PoolableConnectionFactory, which wraps
- // the "real" Connections created by the ConnectionFactory with
- // the classes that implement the pooling functionality.
- //
- PoolableConnectionFactory poolableConnectionFactory =
- new PoolableConnectionFactory(connectionFactory,connectionPool,null,null,false,true);
+ //
+ // Now we'll create the PoolableConnectionFactory, which wraps
+ // the "real" Connections created by the ConnectionFactory with
+ // the classes that implement the pooling functionality.
+ //
+ PoolableConnectionFactory poolableConnectionFactory =
+ new PoolableConnectionFactory(connectionFactory, connectionPool, null, null, false, true);
- //
- // Finally, we create the PoolingDriver itself,
- // passing in the object pool we created.
- //
- PoolingDataSource dataSource = new PoolingDataSource(connectionPool);
+ //
+ // Finally, we create the PoolingDriver itself,
+ // passing in the object pool we created.
+ //
+ PoolingDataSource dataSource = new PoolingDataSource(connectionPool);
- return dataSource;
+ return dataSource;
- }
+ }
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/DefaultRuntimeFactory.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/DefaultRuntimeFactory.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/DefaultRuntimeFactory.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -21,8 +21,8 @@
*/
package org.jboss.sam.internal;
+import org.jboss.sam.SAMRuntime;
import org.jboss.sam.SAMRuntimeFactory;
-import org.jboss.sam.SAMRuntime;
import org.jboss.sam.config.Configurator;
/**
@@ -30,10 +30,10 @@
*/
public class DefaultRuntimeFactory extends SAMRuntimeFactory
{
- public SAMRuntime createRuntime(Configurator configurator)
- {
- DefaultRuntimeImpl defaultRuntime = new DefaultRuntimeImpl();
- defaultRuntime.applyConfiguration(configurator);
- return defaultRuntime;
- }
+ public SAMRuntime createRuntime(Configurator configurator)
+ {
+ DefaultRuntimeImpl defaultRuntime = new DefaultRuntimeImpl();
+ defaultRuntime.applyConfiguration(configurator);
+ return defaultRuntime;
+ }
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/DefaultRuntimeImpl.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/DefaultRuntimeImpl.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/DefaultRuntimeImpl.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -21,46 +21,45 @@
*/
package org.jboss.sam.internal;
-import org.jboss.sam.SAMRuntime;
import org.jboss.sam.EventProcessor;
import org.jboss.sam.EventProcessorFactory;
-import org.jboss.sam.SAMRuntimeAware;
-import org.jboss.sam.datasource.DataSourceManager;
+import org.jboss.sam.SAMRuntime;
import org.jboss.sam.config.Configurator;
+import org.jboss.sam.datasource.DataSourceManager;
/**
* Glues together SAM building blocks.
- *
+ *
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public class DefaultRuntimeImpl implements SAMRuntime
{
- private EventProcessor eventProcessor;
- private DataSourceManager dataSourceManager;
+ private EventProcessor eventProcessor;
+ private DataSourceManager dataSourceManager;
- DefaultRuntimeImpl()
- {
- // create and configure a processor
- this.eventProcessor = EventProcessorFactory.newInstance().createProcessor();
- ((SAMRuntimeAware)this.eventProcessor).setRuntime(this);
+ DefaultRuntimeImpl()
+ {
+ // create and configure a processor
+ this.eventProcessor = EventProcessorFactory.newInstance().createProcessor();
+ this.eventProcessor.setRuntime(this);
- // create and configure datasources
- this.dataSourceManager = new DataSourceManager();
- }
+ // create and configure datasources
+ this.dataSourceManager = new DataSourceManager();
+ }
- public void applyConfiguration(Configurator cfg)
- {
- cfg.configure(this.eventProcessor);
- cfg.configure(this.dataSourceManager);
- }
+ public void applyConfiguration(Configurator cfg)
+ {
+ cfg.configure(this.eventProcessor);
+ cfg.configure(this.dataSourceManager);
+ }
- public DataSourceManager getDataSourceManager()
- {
- return this.dataSourceManager;
- }
+ public DataSourceManager getDataSourceManager()
+ {
+ return this.dataSourceManager;
+ }
- public EventProcessor getEventProcessor()
- {
- return this.eventProcessor;
- }
+ public EventProcessor getEventProcessor()
+ {
+ return this.eventProcessor;
+ }
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/common/MapEventMessage.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/common/MapEventMessage.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/common/MapEventMessage.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -23,57 +23,57 @@
import org.jboss.sam.EventMessage;
-import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
+import java.util.Map;
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public class MapEventMessage implements EventMessage<Map>
{
- private Map<String, Object> data = new HashMap<String, Object>();
+ private Map<String, Object> data = new HashMap<String, Object>();
- private long timestamp;
+ private long timestamp;
- public MapEventMessage(Map<String, Object> data)
- {
- this.data = data;
- }
+ public MapEventMessage(Map<String, Object> data)
+ {
+ this.data = data;
+ }
- public MapEventMessage()
- {
- this(System.currentTimeMillis());
- }
+ public MapEventMessage()
+ {
+ this(System.currentTimeMillis());
+ }
- public MapEventMessage(long timestamp)
- {
- this.timestamp = timestamp;
- }
+ public MapEventMessage(long timestamp)
+ {
+ this.timestamp = timestamp;
+ }
- public MapEventMessage put(String key, Object value)
- {
- data.put(key, value);
- return this;
- }
+ public MapEventMessage put(String key, Object value)
+ {
+ data.put(key, value);
+ return this;
+ }
- public Object getProperty(String name)
- {
- return data.get(name);
- }
+ public Object getProperty(String name)
+ {
+ return data.get(name);
+ }
- public Map getUnderlying()
- {
- return data;
- }
+ public Map getUnderlying()
+ {
+ return data;
+ }
- public long getTimestamp()
- {
- return this.timestamp;
- }
+ public long getTimestamp()
+ {
+ return this.timestamp;
+ }
- public Iterator<String> getPropertyNames()
- {
- return this.data.keySet().iterator();
- }
+ public Iterator<String> getPropertyNames()
+ {
+ return this.data.keySet().iterator();
+ }
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsEventProcessorImpl.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -21,269 +21,232 @@
*/
package org.jboss.sam.internal.drools;
-import org.drools.RuleBase;
-import org.drools.RuleBaseFactory;
-import org.drools.StatefulSession;
-import org.drools.compiler.DrlParser;
-import org.drools.compiler.DroolsParserException;
-import org.drools.compiler.PackageBuilder;
-import org.drools.compiler.PackageBuilderConfiguration;
-import org.drools.lang.descr.PackageDescr;
-import org.drools.spi.GlobalResolver;
+import org.drools.KnowledgeBase;
+import org.drools.KnowledgeBaseConfiguration;
+import org.drools.KnowledgeBaseFactory;
+import org.drools.builder.KnowledgeBuilder;
+import org.drools.builder.KnowledgeBuilderFactory;
+import org.drools.builder.ResourceType;
+import org.drools.io.ResourceFactory;
+import org.drools.logger.KnowledgeRuntimeLogger;
+import org.drools.logger.KnowledgeRuntimeLoggerFactory;
+import org.drools.runtime.Globals;
+import org.drools.runtime.StatefulKnowledgeSession;
+import org.drools.runtime.rule.WorkingMemoryEntryPoint;
import org.jboss.sam.*;
import org.jboss.sam.datasource.DataSourceManager;
-import java.io.*;
+import java.io.ByteArrayInputStream;
+import java.io.InputStreamReader;
import java.util.Iterator;
import java.util.Map;
-import java.util.Properties;
import java.util.concurrent.ConcurrentHashMap;
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public class DroolsEventProcessorImpl
- implements EventProcessor<RuleBase>, StreamInputCallback, GlobalResolver
+ implements EventProcessor<KnowledgeBase>, StreamInputCallback, Globals
{
+ private String name;
- private String name;
+ private KnowledgeBase kbase;
+ private StatefulKnowledgeSession session;
- private RuleBase ruleBase;
- private StatefulSession session;
+ private Map<String, StreamInput> streamInputs = new ConcurrentHashMap<String, StreamInput>();
+ private Map<String, StreamOutput> streamOutputs = new ConcurrentHashMap<String, StreamOutput>();
+ private Map<String, ProcessingStatement> statements = new ConcurrentHashMap<String, ProcessingStatement>();
+ private Map<String, StreamOutputAdapter> outputAdapters = new ConcurrentHashMap<String, StreamOutputAdapter>();
- private Map<String, StreamInput> streamInputs = new ConcurrentHashMap<String, StreamInput>();
- private Map<String, StreamOutput> streamOutputs = new ConcurrentHashMap<String, StreamOutput>();
- private Map<String, ProcessingStatement> statements = new ConcurrentHashMap<String, ProcessingStatement>();
+ private SAMRuntime runtime;
- private Map<String, Object> wmGlobals = new ConcurrentHashMap<String, Object>();
- private Map<String, StreamOutputAdapter> outputAdapters = new ConcurrentHashMap<String, StreamOutputAdapter>();
+ public DroolsEventProcessorImpl()
+ {
+ try
+ {
+ KnowledgeBaseConfiguration conf = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
+ //conf.setOption( EventProcessingOption.STREAM );
+ this.kbase = KnowledgeBaseFactory.newKnowledgeBase(conf);
- private SAMRuntime runtime;
+ this.session = kbase.newStatefulKnowledgeSession();
+ this.session.getGlobals().setDelegate(this);
- public DroolsEventProcessorImpl()
- {
- try
- {
- this.ruleBase = RuleBaseFactory.newRuleBase( RuleBase.RETEOO, null );
- this.session = ruleBase.newStatefulSession();
- this.session.setGlobalResolver(this);
- }
- catch (Exception e)
- {
- throw new RuntimeException("Failed to initialize event processor", e);
- }
- }
+ KnowledgeRuntimeLogger logger = KnowledgeRuntimeLoggerFactory.newConsoleLogger(session);
- public void setRuntime(SAMRuntime runtime)
- {
- this.runtime = runtime;
- }
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Failed to initialize event processor", e);
+ }
+ }
- public Object resolveGlobal(String key)
- {
- assert runtime!=null : "Runtime not set!";
-
- Object global = null;
-
- if("SAM".equals(key))
- {
- DataSourceManager dsMgr = this.runtime.getDataSourceManager();
- global = new SAMAdapter(this.session, this.outputAdapters, dsMgr);
- }
- else
- {
- // It may be a adapter output
- global = this.outputAdapters.get(key);
+ public void setRuntime(SAMRuntime runtime)
+ {
+ this.runtime = runtime;
+ }
- // Or a general global variable
- if(null==global)
- global = wmGlobals.get(key);
- }
- return global;
- }
+ public void onEvent(Object args)
+ {
+ session.insert(args);
+ session.fireAllRules();
+ }
- public void setGlobal(String key, Object object)
- {
- this.wmGlobals.put(key, object);
- }
+ public void addInput(StreamInput streamInput)
+ {
+ streamInput.registerCallback(this);
+ this.streamInputs.put(streamInput.getStreamName(), streamInput);
+ }
- public void writeExternal(ObjectOutput out) throws IOException
- {
- throw new RuntimeException("NYI");
- }
+ public void removeInput(String streamName)
+ {
+ this.streamInputs.remove(streamName);
+ }
- public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- {
- throw new RuntimeException("NYI");
- }
+ public Iterator<String> getStreamInputNames()
+ {
+ return this.streamInputs.keySet().iterator();
+ }
- public void onEvent(Object args)
- {
- session.insert(args);
+ public void addOutput(StreamOutput streamOutput)
+ {
+ this.streamOutputs.put(streamOutput.getStreamName(), streamOutput);
- // TODO: shouldn't be necessary, revisit!
- session.fireAllRules();
- }
+ // Create a drools adapter
+ StreamOutputAdapter adapter = new StreamOutputAdapter(streamOutput);
- public void addInput(StreamInput streamInput)
- {
- streamInput.registerCallback(this);
- this.streamInputs.put(streamInput.getStreamName(), streamInput);
- }
+ // Make it available to the drools GlobalResolver
+ this.outputAdapters.put(streamOutput.getStreamName(), adapter);
- public void removeInput(String streamName)
- {
- this.streamInputs.remove(streamName);
- }
+ }
- public Iterator<String> getStreamInputNames()
- {
- return this.streamInputs.keySet().iterator();
- }
+ public void removeOutput(String streamName)
+ {
+ this.streamOutputs.remove(streamName);
+ }
- public void addOutput(StreamOutput streamOutput)
- {
- this.streamOutputs.put(streamOutput.getStreamName(), streamOutput);
+ public Iterator<String> getStreamOutputNames()
+ {
+ return this.streamOutputs.keySet().iterator();
+ }
- // Create a drools adapter
- StreamOutputAdapter adapter = new StreamOutputAdapter(streamOutput);
- // Make it availble to the drools GlobalResolver
- this.outputAdapters.put(streamOutput.getStreamName(), adapter);
+ public Object get(String key)
+ {
+ Object global = null;
- }
+ if ("SAM".equals(key))
+ {
+ DataSourceManager dsMgr = this.runtime.getDataSourceManager();
+ global = new SAMAdapter(this.session, this.outputAdapters, dsMgr);
+ }
+ else
+ {
+ // It may be a adapter output
+ global = this.outputAdapters.get(key);
+ }
+ return global;
+ }
- public void removeOutput(String streamName)
- {
- this.streamOutputs.remove(streamName);
- }
+ public void set(String string, Object object)
+ {
+ throw new IllegalArgumentException("Not supported");
+ }
- public Iterator<String> getStreamOutputNames()
- {
- return this.streamOutputs.keySet().iterator();
- }
+ public void setDelegate(Globals globals)
+ {
+ throw new IllegalArgumentException("Not supported");
+ }
- /**
- * Creates a drools package and registers it with the current rulebase
- */
- public ProcessingStatement registerStatement(String statementName, String epl)
- {
- InputStreamReader reader = new InputStreamReader(
+ /**
+ * Creates a drools package and registers it with the current rulebase
+ */
+ public ProcessingStatement registerStatement(String statementName, String epl)
+ {
+ InputStreamReader reader = new InputStreamReader(
new ByteArrayInputStream(epl.getBytes())
- );
+ );
- // Create a drools package
- org.drools.rule.Package pkg = buildAndAddPackage(reader);
- DroolsProcessingStatement stmt = new DroolsProcessingStatement(
- statementName, epl, pkg
+ // Create a drools package
+ KnowledgeBuilder builder = KnowledgeBuilderFactory.newKnowledgeBuilder();
+ try
+ {
+ builder.add(ResourceFactory.newReaderResource(reader), ResourceType.DRL);
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Failed to read DRL", e);
+ }
+
+ if (builder.hasErrors())
+ {
+ throw new RuntimeException(
+ "Failed to parse DRL '" + statementName + "': \n"
+ + builder.getErrors().toString()
);
+ }
+ this.kbase.addKnowledgePackages(builder.getKnowledgePackages());
- this.statements.put(statementName, stmt);
- return stmt;
- }
+ DroolsProcessingStatement stmt = new DroolsProcessingStatement(
+ statementName, epl, null
+ );
+
+ this.statements.put(statementName, stmt);// TODO: Why keep the reference?
+ return stmt;
+ }
- /**
- * Create a drools package, register it with the rulebase and make
- * sure that the adapter output adapter is available as a drools global variable
- */
- public ProcessingStatement registerBoundStatement(String streamOutputName, String statementName, String epl)
- {
- StreamOutputAdapter streamOutput = this.outputAdapters.get(streamOutputName);
- if(null == streamOutput)
- throw new IllegalArgumentException("No such output stream: " + streamOutputName);
+ /**
+ * Create a drools package, register it with the rulebase and make
+ * sure that the adapter output adapter is available as a drools global variable
+ */
+ public ProcessingStatement registerBoundStatement(String streamOutputName, String statementName, String epl)
+ {
+ StreamOutputAdapter streamOutput = this.outputAdapters.get(streamOutputName);
+ if (null == streamOutput)
+ throw new IllegalArgumentException("No such output stream: " + streamOutputName);
- // register the statement
- ProcessingStatement stmt = registerStatement(statementName, epl);
+ // register the statement
+ ProcessingStatement stmt = registerStatement(statementName, epl);
- return stmt;
- }
+ return stmt;
+ }
- public Iterator<String> getStatementNames()
- {
- return this.statements.keySet().iterator();
- }
+ public Iterator<String> getStatementNames()
+ {
+ return this.statements.keySet().iterator();
+ }
- public void clearStatement(String statementName)
- {
- ProcessingStatement stmt = statements.get(statementName);
- if(null==stmt)
- throw new IllegalArgumentException("No such statement: " + statementName);
+ public void clearStatement(String statementName)
+ {
+ ProcessingStatement stmt = statements.get(statementName);
+ if (null == stmt)
+ throw new IllegalArgumentException("No such statement: " + statementName);
- statements.remove(statementName);
- }
+ statements.remove(statementName);
+ }
- public void clearAllStatements()
- {
- Iterator<String> stmtNames = getStatementNames();
- while(stmtNames.hasNext())
- {
- clearStatement(stmtNames.next());
- }
- }
+ public void clearAllStatements()
+ {
+ Iterator<String> stmtNames = getStatementNames();
+ while (stmtNames.hasNext())
+ {
+ clearStatement(stmtNames.next());
+ }
+ }
- public String getName()
- {
- return this.name;
- }
+ public String getName()
+ {
+ return this.name;
+ }
- public void setName(String name)
- {
- this.name = name;
- }
+ public void setName(String name)
+ {
+ this.name = name;
+ }
- public RuleBase getUnderlying()
- {
- return this.ruleBase;
- }
-
- // --------------------------------
- // Drools stuff below
-
- private org.drools.rule.Package buildAndAddPackage(Reader reader)
- {
- org.drools.rule.Package pkg = buildPackage(reader);
- this.ruleBase.addPackage( pkg );
- return pkg;
- }
-
- private org.drools.rule.Package buildPackage(Reader reader)
- {
- org.drools.rule.Package pkg = null;
-
- try
- {
- DrlParser parser = new DrlParser();
- PackageDescr packageDescr = parser.parse( reader );
-
- if ( parser.hasErrors() )
- {
- StringBuffer sb = new StringBuffer("Error messages in parser: ");
- for(Object err : parser.getErrors())
- {
- sb.append(err).append("\n");
- }
- throw new DroolsParserException( sb.toString() );
- }
-
- PackageBuilder builder = createPackageBuilder();
- builder.addPackage( packageDescr );
- pkg = builder.getPackage();
- }
- catch (DroolsParserException e)
- {
- throw new RuntimeException("Failed to parse DRL", e);
- }
-
- return pkg;
- }
-
- private PackageBuilder createPackageBuilder()
- {
- Properties props = new Properties();
- props.setProperty("drools.dialect.java.compiler", "JANINO");
- PackageBuilderConfiguration pkgConfig = new PackageBuilderConfiguration(props);
- return new PackageBuilder(pkgConfig);
- }
+ public KnowledgeBase getUnderlying()
+ {
+ return this.kbase;
+ }
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsProcessingStatement.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsProcessingStatement.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/DroolsProcessingStatement.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -29,41 +29,41 @@
public class DroolsProcessingStatement implements ProcessingStatement<org.drools.rule.Package>
{
- private String name;
- private String epl;
- private boolean bound = false;
- private org.drools.rule.Package pkg;
+ private String name;
+ private String epl;
+ private boolean bound = false;
+ private org.drools.rule.Package pkg;
- public DroolsProcessingStatement(String name, String epl, org.drools.rule.Package pkg)
- {
- this(name, epl, pkg, false);
- }
+ public DroolsProcessingStatement(String name, String epl, org.drools.rule.Package pkg)
+ {
+ this(name, epl, pkg, false);
+ }
- public DroolsProcessingStatement(String name, String epl, org.drools.rule.Package pkg, boolean isBound)
- {
- this.name = name;
- this.epl = epl;
- this.pkg = pkg;
- this.bound = isBound;
- }
+ public DroolsProcessingStatement(String name, String epl, org.drools.rule.Package pkg, boolean isBound)
+ {
+ this.name = name;
+ this.epl = epl;
+ this.pkg = pkg;
+ this.bound = isBound;
+ }
- public String getName()
- {
- return this.name;
- }
+ public String getName()
+ {
+ return this.name;
+ }
- public String getExpression()
- {
- return this.epl;
- }
+ public String getExpression()
+ {
+ return this.epl;
+ }
- public boolean isBound()
- {
- return this.bound;
- }
+ public boolean isBound()
+ {
+ return this.bound;
+ }
- public org.drools.rule.Package getUnderlying()
- {
- return pkg;
- }
+ public org.drools.rule.Package getUnderlying()
+ {
+ return pkg;
+ }
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/MapMessageAdapter.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/MapMessageAdapter.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/MapMessageAdapter.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -32,30 +32,30 @@
public class MapMessageAdapter implements EventMessage
{
- private Map delegate;
+ private Map delegate;
- public MapMessageAdapter(Map delegate)
- {
- this.delegate = delegate;
- }
+ public MapMessageAdapter(Map delegate)
+ {
+ this.delegate = delegate;
+ }
- public long getTimestamp()
- {
- return (Long)delegate.get("timestamp");
- }
+ public long getTimestamp()
+ {
+ return (Long) delegate.get("timestamp");
+ }
- public Object getProperty(String name)
- {
- return delegate.get(name);
- }
+ public Object getProperty(String name)
+ {
+ return delegate.get(name);
+ }
- public Iterator getPropertyNames()
- {
- return delegate.keySet().iterator();
- }
+ public Iterator getPropertyNames()
+ {
+ return delegate.keySet().iterator();
+ }
- public Object getUnderlying()
- {
- return delegate;
- }
+ public Object getUnderlying()
+ {
+ return delegate;
+ }
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/ObjectMessageAdaptor.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/ObjectMessageAdaptor.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/ObjectMessageAdaptor.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -23,51 +23,51 @@
import org.jboss.sam.EventMessage;
+import java.lang.reflect.Method;
import java.util.Iterator;
-import java.lang.reflect.Method;
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public class ObjectMessageAdaptor implements EventMessage
{
- private final Object obj;
+ private final Object obj;
- public ObjectMessageAdaptor(Object obj)
- {
- this.obj = obj;
- }
+ public ObjectMessageAdaptor(Object obj)
+ {
+ this.obj = obj;
+ }
- public long getTimestamp()
- {
- return (Long)getProperty("timestamp");
- }
+ public long getTimestamp()
+ {
+ return (Long) getProperty("timestamp");
+ }
- public Object getProperty(String name)
- {
- Object returnValue = null;
- String methodName = "get" + name.substring(0,1).toUpperCase()
+ public Object getProperty(String name)
+ {
+ Object returnValue = null;
+ String methodName = "get" + name.substring(0, 1).toUpperCase()
+ name.substring(1, name.length());
-
- try
- {
- Method method = this.obj.getClass().getMethod(methodName);
- returnValue = method.invoke(this.obj);
- }
- catch (Exception e)
- {
- throw new RuntimeException("Property access error: "+methodName, e);
- }
- return returnValue;
- }
- public Iterator getPropertyNames()
- {
- throw new RuntimeException("MYI");
- }
+ try
+ {
+ Method method = this.obj.getClass().getMethod(methodName);
+ returnValue = method.invoke(this.obj);
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Property access error: " + methodName, e);
+ }
+ return returnValue;
+ }
- public Object getUnderlying()
- {
- return this.obj;
- }
+ public Iterator getPropertyNames()
+ {
+ throw new RuntimeException("NYI");
+ }
+
+ public Object getUnderlying()
+ {
+ return this.obj;
+ }
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/SAMAdapter.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/SAMAdapter.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/SAMAdapter.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -21,100 +21,118 @@
*/
package org.jboss.sam.internal.drools;
-import org.drools.StatefulSession;
-import org.drools.WorkingMemoryEntryPoint;
+import org.drools.runtime.StatefulKnowledgeSession;
+import org.drools.runtime.rule.WorkingMemoryEntryPoint;
import org.jboss.sam.datasource.DataSourceManager;
import javax.sql.DataSource;
-import java.util.Map;
-import java.util.List;
-import java.util.ArrayList;
-import java.util.HashMap;
import java.sql.Connection;
import java.sql.ResultSet;
+import java.sql.SQLException;
import java.sql.Statement;
-import java.sql.SQLException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
/**
* Will be injected into WorkingMemory to give drools access to SAM extensions.<br>
* This class basically acts as a workaround for features that we would like to see:
- *
+ * <p/>
* <ul>
* <li>Hidden behind a custom SAM DSL
- * <li>or provided by Drools Fusion directly (JIRA)
+ * <li>or provided by Drools Fusion directly (JIRA)
* </ul>
- *
+ *
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public class SAMAdapter
{
- private StatefulSession session;
- private Map<String, StreamOutputAdapter> outputAdapters;
- private DataSourceManager datasourceManager;
+ private StatefulKnowledgeSession session;
+ private Map<String, StreamOutputAdapter> outputAdapters;
+ private DataSourceManager datasourceManager;
- public SAMAdapter(StatefulSession session, Map<String, StreamOutputAdapter> outputAdapters, DataSourceManager dsMgr)
- {
- this.session = session;
- this.outputAdapters = outputAdapters;
- this.datasourceManager = dsMgr;
- }
+ public SAMAdapter(StatefulKnowledgeSession session, Map<String, StreamOutputAdapter> outputAdapters, DataSourceManager dsMgr)
+ {
+ this.session = session;
+ this.outputAdapters = outputAdapters;
+ this.datasourceManager = dsMgr;
+ }
- public WorkingMemoryEntryPoint getStream(String name)
- {
- WorkingMemoryEntryPoint memoryEntryPoint = this.session.getWorkingMemoryEntryPoint(name);
- if(null==memoryEntryPoint)
- throw new IllegalArgumentException("Unknown stream " + name);
-
- return memoryEntryPoint;
- }
+ public WorkingMemoryEntryPoint getStream(String name)
+ {
+ WorkingMemoryEntryPoint memoryEntryPoint = this.session.getWorkingMemoryEntryPoint(name);
+ if (null == memoryEntryPoint)
+ throw new IllegalArgumentException("Unknown stream " + name);
- public UpdateListener getListener(String name)
- {
- StreamOutputAdapter adapter = this.outputAdapters.get(name);
- if(null==adapter)
- throw new IllegalArgumentException("Unknown listener '" + name +"'");
- return adapter;
- }
+ return memoryEntryPoint;
+ }
- public List query(String dbName, String sql)
- {
- DataSource dataSource = datasourceManager.getDataSource(dbName);
- ArrayList results = new ArrayList();
-
- Connection conn = null;
- Statement stmt = null;
- ResultSet rset = null;
+ public UpdateListener getListener(String name)
+ {
+ StreamOutputAdapter adapter = this.outputAdapters.get(name);
+ if (null == adapter)
+ throw new IllegalArgumentException("Unknown listener '" + name + "'");
+ return adapter;
+ }
- try
- {
- conn = dataSource.getConnection();
- stmt = conn.createStatement();
- rset = stmt.executeQuery(sql);
+ public List query(String dbName, String sql)
+ {
+ DataSource dataSource = datasourceManager.getDataSource(dbName);
+ ArrayList results = new ArrayList();
- int numcols = rset.getMetaData().getColumnCount();
+ Connection conn = null;
+ Statement stmt = null;
+ ResultSet rset = null;
- while(rset.next())
- {
- Map row = new HashMap();
- for(int i=1;i<=numcols;i++)
- {
- // TODO: case handling should be configureable
- row.put(rset.getMetaData().getColumnName(i).toLowerCase(), rset.getObject(i));
- }
- results.add(row);
- }
+ try
+ {
+ conn = dataSource.getConnection();
+ stmt = conn.createStatement();
+ rset = stmt.executeQuery(sql);
+
+ int numcols = rset.getMetaData().getColumnCount();
+
+ while (rset.next())
+ {
+ Map row = new HashMap();
+ for (int i = 1; i <= numcols; i++)
+ {
+ // TODO: case handling should be configureable
+ row.put(rset.getMetaData().getColumnName(i).toLowerCase(), rset.getObject(i));
+ }
+ results.add(row);
}
- catch(SQLException e)
- {
- throw new RuntimeException("Failed to execute SQL", e);
+ }
+ catch (SQLException e)
+ {
+ throw new RuntimeException("Failed to execute SQL", e);
+ }
+ finally
+ {
+ try
+ {
+ rset.close();
}
- finally
+ catch (Exception e)
{
- try { rset.close(); } catch(Exception e) { }
- try { stmt.close(); } catch(Exception e) { }
- try { conn.close(); } catch(Exception e) { }
}
-
- return results;
- }
+ try
+ {
+ stmt.close();
+ }
+ catch (Exception e)
+ {
+ }
+ try
+ {
+ conn.close();
+ }
+ catch (Exception e)
+ {
+ }
+ }
+
+ return results;
+ }
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/StreamOutputAdapter.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/StreamOutputAdapter.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/StreamOutputAdapter.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -21,8 +21,8 @@
*/
package org.jboss.sam.internal.drools;
+import org.jboss.sam.EventMessage;
import org.jboss.sam.StreamOutput;
-import org.jboss.sam.EventMessage;
import java.util.Collection;
import java.util.Map;
@@ -32,48 +32,48 @@
*/
public class StreamOutputAdapter implements UpdateListener
{
- private StreamOutput delegate;
+ private StreamOutput delegate;
- public StreamOutputAdapter(StreamOutput delegate)
- {
- this.delegate = delegate;
- }
+ public StreamOutputAdapter(StreamOutput delegate)
+ {
+ this.delegate = delegate;
+ }
- public String getName()
- {
- return delegate.getStreamName();
- }
+ public String getName()
+ {
+ return delegate.getStreamName();
+ }
- public void update(Object result)
- {
- EventMessage[] events = adoptPayload(result);
- delegate.write(events);
- }
+ public void update(Object result)
+ {
+ EventMessage[] events = adoptPayload(result);
+ delegate.write(events);
+ }
- private EventMessage[] adoptPayload(Object data)
- {
- EventMessage[] events = null;
+ private EventMessage[] adoptPayload(Object data)
+ {
+ EventMessage[] events = null;
- if(data instanceof Collection)
+ if (data instanceof Collection)
+ {
+ Collection c = (Collection) data;
+ Object[] cAr = c.toArray();
+ events = new EventMessage[c.size()];
+ for (int i = 0; i < c.size(); i++)
{
- Collection c = (Collection)data;
- Object[] cAr = c.toArray();
- events = new EventMessage[c.size()];
- for(int i=0; i<c.size(); i++)
- {
- // TODO: think more thoroughly about payload adoption
- if(cAr[i] instanceof Map)
- events[i] = new MapMessageAdapter((Map)cAr[i]);
- else
- events[i] = new ObjectMessageAdaptor(cAr[i]);
- }
+ // TODO: think more thoroughly about payload adoption
+ if (cAr[i] instanceof Map)
+ events[i] = new MapMessageAdapter((Map) cAr[i]);
+ else
+ events[i] = new ObjectMessageAdaptor(cAr[i]);
}
- else
- {
- events = new EventMessage[] { new ObjectMessageAdaptor(data) };
- }
+ }
+ else
+ {
+ events = new EventMessage[]{new ObjectMessageAdaptor(data)};
+ }
- return events;
- }
+ return events;
+ }
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/UpdateListener.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/UpdateListener.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/drools/UpdateListener.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -26,5 +26,5 @@
*/
public interface UpdateListener
{
- void update(Object result);
+ void update(Object result);
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMDispatcher.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMDispatcher.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMDispatcher.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -28,23 +28,23 @@
*/
public class InVMDispatcher
{
- public final static String DEFAULT_CHANNEL_NAME = "InVM-Channel";
-
- private InVMStreamRegistry channelRegistry;
+ public final static String DEFAULT_CHANNEL_NAME = "InVM-Channel";
- private String streamName;
+ private InVMStreamRegistry channelRegistry;
- public InVMDispatcher(String streamName)
- {
- this.streamName = streamName;
- this.channelRegistry = InVMStreamRegistry.getInstance();
- }
+ private String streamName;
- public void dispatch(Object event)
- {
- for(StreamInputCallback callback : channelRegistry.getChannelCallbacks(streamName))
- {
- callback.onEvent(event);
- }
- }
+ public InVMDispatcher(String streamName)
+ {
+ this.streamName = streamName;
+ this.channelRegistry = InVMStreamRegistry.getInstance();
+ }
+
+ public void dispatch(Object event)
+ {
+ for (StreamInputCallback callback : channelRegistry.getChannelCallbacks(streamName))
+ {
+ callback.onEvent(event);
+ }
+ }
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMStreamInput.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMStreamInput.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMStreamInput.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -29,72 +29,72 @@
*/
public class InVMStreamInput implements StreamInput
{
- private boolean started;
-
- private String streamName;
+ private boolean started;
- InVMStreamRegistry channelRegistry;
-
- public InVMStreamInput()
- {
- this.channelRegistry = InVMStreamRegistry.getInstance();
- }
+ private String streamName;
- public InVMStreamInput(String name)
- {
- this.streamName = name;
- this.channelRegistry = InVMStreamRegistry.getInstance();
- }
+ InVMStreamRegistry channelRegistry;
- public StreamInput start()
- {
- this.started = true;
- return this;
- }
+ public InVMStreamInput()
+ {
+ this.channelRegistry = InVMStreamRegistry.getInstance();
+ }
- public StreamInput stop()
- {
- this.started = false;
- return this;
- }
+ public InVMStreamInput(String name)
+ {
+ this.streamName = name;
+ this.channelRegistry = InVMStreamRegistry.getInstance();
+ }
- public boolean isStarted()
- {
- return this.started;
- }
+ public StreamInput start()
+ {
+ this.started = true;
+ return this;
+ }
- public String getStreamName()
- {
- return this.streamName;
- }
+ public StreamInput stop()
+ {
+ this.started = false;
+ return this;
+ }
+ public boolean isStarted()
+ {
+ return this.started;
+ }
- public void setStreamName(String name)
- {
- this.streamName = name;
- }
+ public String getStreamName()
+ {
+ return this.streamName;
+ }
- public void registerCallback(StreamInputCallback listener)
- {
- channelRegistry.getChannelCallbacks(streamName).add(listener);
- }
- public void clearCallbacks()
- {
- channelRegistry.getChannelCallbacks(streamName).clear();
- }
+ public void setStreamName(String name)
+ {
+ this.streamName = name;
+ }
- public void newEvent(Object args)
- {
- for(StreamInputCallback callback : channelRegistry.getChannelCallbacks(streamName))
- {
- callback.onEvent(args);
- }
+ public void registerCallback(StreamInputCallback listener)
+ {
+ channelRegistry.getChannelCallbacks(streamName).add(listener);
+ }
- }
+ public void clearCallbacks()
+ {
+ channelRegistry.getChannelCallbacks(streamName).clear();
+ }
- public String toString()
- {
- return "InVMInputAdapter{"+this.streamName +"}";
- }
+ public void newEvent(Object args)
+ {
+ for (StreamInputCallback callback : channelRegistry.getChannelCallbacks(streamName))
+ {
+ callback.onEvent(args);
+ }
+
+ }
+
+ public String toString()
+ {
+ return "InVMInputAdapter{" + this.streamName + "}";
+ }
}
Modified: sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMStreamRegistry.java
===================================================================
--- sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMStreamRegistry.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/main/java/org/jboss/sam/internal/stream/InVMStreamRegistry.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -28,30 +28,30 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.CopyOnWriteArrayList;
-/**
+/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public class InVMStreamRegistry
{
- private Map<String, List<StreamInputCallback>> streams = new ConcurrentHashMap<String, List<StreamInputCallback>>();
+ private Map<String, List<StreamInputCallback>> streams = new ConcurrentHashMap<String, List<StreamInputCallback>>();
- private static InVMStreamRegistry INSTANCE;
+ private static InVMStreamRegistry INSTANCE;
- private InVMStreamRegistry()
- {
- }
+ private InVMStreamRegistry()
+ {
+ }
- public static InVMStreamRegistry getInstance()
- {
- if(null == INSTANCE)
- INSTANCE = new InVMStreamRegistry();
- return INSTANCE;
- }
+ public static InVMStreamRegistry getInstance()
+ {
+ if (null == INSTANCE)
+ INSTANCE = new InVMStreamRegistry();
+ return INSTANCE;
+ }
- public List<StreamInputCallback> getChannelCallbacks(String streamName)
- {
- if(null == streams.get(streamName))
- streams.put(streamName, new CopyOnWriteArrayList<StreamInputCallback>());
- return streams.get(streamName);
- }
+ public List<StreamInputCallback> getChannelCallbacks(String streamName)
+ {
+ if (null == streams.get(streamName))
+ streams.put(streamName, new CopyOnWriteArrayList<StreamInputCallback>());
+ return streams.get(streamName);
+ }
}
Modified: sam/trunk/modules/core/src/test/java/org/jboss/test/sam/drools/ApiTestCase.java
===================================================================
--- sam/trunk/modules/core/src/test/java/org/jboss/test/sam/drools/ApiTestCase.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/test/java/org/jboss/test/sam/drools/ApiTestCase.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -25,47 +25,45 @@
/**
* Verifies that the SAM core API works atop of Drools Fusion.
- *
+ *
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
public class ApiTestCase extends SamTestSetup
{
- protected void setUp() throws Exception
- {
- // Creates default adapter inputs and outputs
- createProcessor("ApiTestCase", "drools/sam-cfg.xml");
- }
+ protected void setUp() throws Exception
+ {
+ // Creates default adapter inputs and outputs
+ createProcessor("ApiTestCase", "drools/sam-cfg.xml");
+ }
- public void testBoundStatement()
- {
- // EPL as String
- String epl = getDRLFromResource("drools/simple.drl");
+ public void testBoundStatement()
+ {
+ // EPL as String
+ String epl = getDRLFromResource("drools/simple.drl");
- // register statement
- eventProcessor.registerBoundStatement("InVM", "testBoundStatement", epl);
+ // register statement
+ eventProcessor.registerBoundStatement("InVM", "simple.drl", epl);
- StockTick eventMessage = new StockTick( "ACME");
- generateInVMEvent(eventMessage);
-
- assertNotNull(bufferedOutput.getLastNewData());
- assertEquals(bufferedOutput.getLastNewData().length, 1);
- }
+ StockTick eventMessage = new StockTick( "ACME");
+ generateInVMEvent(eventMessage);
- public void testAggregationAndForwarding()
- {
- String aggregateDSL = getDRLFromResource("drools/aggregate.drl");
- String outputDSL = getDRLFromResource("drools/forward.drl");
+ assertNotNull("No data received on stream output", bufferedOutput.getLastNewData());
+ assertEquals("Expected a single event", bufferedOutput.getLastNewData().length, 1);
+ }
- eventProcessor.registerStatement("aggregate", aggregateDSL);
- eventProcessor.registerBoundStatement("InVM", "output", outputDSL);
-
- StockTick eventMessage = new StockTick( "ACME");
- generateInVMEvent(eventMessage);
+ public void testAggregationAndForwarding()
+ {
+ String forwardDSL = getDRLFromResource("drools/forward.drl");
+ eventProcessor.registerBoundStatement("InVM", "forward.drl", forwardDSL);
- assertNotNull(bufferedOutput.getLastNewData());
- assertEquals(bufferedOutput.getLastNewData().length, 1);
- assertEquals(bufferedOutput.getLastNewData()[0].getProperty("symbol"), "ACME");
- }
+ StockTick eventMessage = new StockTick( "RHAT");
+ generateInVMEvent(eventMessage);
+ assertNotNull("No data received on stream output", bufferedOutput.getLastNewData());
+ assertEquals("Expected a single event", bufferedOutput.getLastNewData().length, 1);
+ assertEquals("Wrong event received", bufferedOutput.getLastNewData()[0].getProperty("symbol"), "RHAT");
+ }
+
+
}
Modified: sam/trunk/modules/core/src/test/java/org/jboss/test/sam/drools/StockTick.java
===================================================================
--- sam/trunk/modules/core/src/test/java/org/jboss/test/sam/drools/StockTick.java 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/test/java/org/jboss/test/sam/drools/StockTick.java 2009-07-13 21:00:48 UTC (rev 658)
@@ -26,26 +26,25 @@
*/
public class StockTick
{
- private String symbol;
+ private String symbol;
- public StockTick(String symbol)
- {
- this.symbol = symbol;
- }
+ public StockTick(String symbol)
+ {
+ this.symbol = symbol;
+ }
- public String getSymbol()
- {
- return symbol;
- }
+ public String getSymbol()
+ {
+ return symbol;
+ }
- public void setSymbol(String symbol)
- {
- this.symbol = symbol;
- }
+ public void setSymbol(String symbol)
+ {
+ this.symbol = symbol;
+ }
-
- public String toString()
- {
- return "StockTick(symbol="+symbol+")";
- }
+ public String toString()
+ {
+ return "StockTick {symbol="+symbol+"}";
+ }
}
Modified: sam/trunk/modules/core/src/test/resources/adapter/invm/sam-cfg.xml
===================================================================
--- sam/trunk/modules/core/src/test/resources/adapter/invm/sam-cfg.xml 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/test/resources/adapter/invm/sam-cfg.xml 2009-07-13 21:00:48 UTC (rev 658)
@@ -5,7 +5,7 @@
<statements>
<statement name="ExampleStatement" bindTo="VMOutput">
<epl lang="drl"><![CDATA[
-package org.jboss.test.sam.drools;
+ package org.jboss.test.sam.drools;
import org.jboss.test.sam.adapter.invm.Alert;
global org.jboss.sam.internal.drools.SAMAdapter SAM;
Deleted: sam/trunk/modules/core/src/test/resources/drools/aggregate.drl
===================================================================
--- sam/trunk/modules/core/src/test/resources/drools/aggregate.drl 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/test/resources/drools/aggregate.drl 2009-07-13 21:00:48 UTC (rev 658)
@@ -1,12 +0,0 @@
-package org.jboss.sam.drools;
-
-import org.jboss.test.sam.drools.StockTick;
-
-global org.jboss.sam.internal.drools.SAMAdapter SAM;
-
-rule "Aggregate any stock tick into AllTicks"
- when
- $event: StockTick();
- then
- SAM.getStream("AllTicks").insert($event);
-end
Modified: sam/trunk/modules/core/src/test/resources/drools/forward.drl
===================================================================
--- sam/trunk/modules/core/src/test/resources/drools/forward.drl 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/test/resources/drools/forward.drl 2009-07-13 21:00:48 UTC (rev 658)
@@ -4,9 +4,21 @@
global org.jboss.sam.internal.drools.SAMAdapter SAM;
-rule "Forward all stock ticks to listener"
- when
- $event: StockTick() from entry-point "AllTicks";
- then
- SAM.getListener("InVM").update($event);
+rule "Aggregate"
+when
+ $st: StockTick(symbol == "RHAT")
+then
+ System.out.println("drools: " +drools.getEntryPoint("stream1"));
+ System.out.println("Stream1: " +entryPoints["stream1"]);
+ entryPoints["stream1"].insert($st);
end
+
+# forward to listener
+rule "Forward"
+ dialect "mvel"
+when
+ $st : StockTick() from entry-point "stream1"
+then
+ System.out.println($st);
+ SAM.getListener("InVM").update($st);
+end
Modified: sam/trunk/modules/core/src/test/resources/drools/sam-cfg.xml
===================================================================
--- sam/trunk/modules/core/src/test/resources/drools/sam-cfg.xml 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/test/resources/drools/sam-cfg.xml 2009-07-13 21:00:48 UTC (rev 658)
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
+
<ns2:processingNode name="DatabaseTestCase"
domain="http://org.jboss.sam/test/database"
xmlns:ns2="http://org.jboss.sam/08/2008/">
- <statements/>
+ <statements/>
</ns2:processingNode>
\ No newline at end of file
Modified: sam/trunk/modules/core/src/test/resources/drools/simple.drl
===================================================================
--- sam/trunk/modules/core/src/test/resources/drools/simple.drl 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/modules/core/src/test/resources/drools/simple.drl 2009-07-13 21:00:48 UTC (rev 658)
@@ -1,11 +1,12 @@
package org.jboss.test.sam.drools;
import org.jboss.test.sam.drools.StockTick;
+
global org.jboss.sam.internal.drools.SAMAdapter SAM;
-rule "Check event"
+rule "Send all ACME events to output listener"
when
$st: StockTick(symbol == "ACME")
then
- SAM.getListener("InVM").update($st);
+ SAM.getListener("InVM").update($st);
end
Modified: sam/trunk/pom.xml
===================================================================
--- sam/trunk/pom.xml 2009-07-13 10:40:40 UTC (rev 657)
+++ sam/trunk/pom.xml 2009-07-13 21:00:48 UTC (rev 658)
@@ -10,7 +10,7 @@
<version>1.0.0.SNAPSHOT</version>
<modules>
- <module>modules/core</module>
+ <module>modules/core</module>
<module>modules/sim</module>
</modules>
@@ -21,11 +21,11 @@
<surefire.jdwp.args>-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005</surefire.jdwp.args>
<dbcp.version>1.2.2</dbcp.version>
- <drools.version>5.0.0.CR1</drools.version>
+ <drools.version>5.0.1</drools.version>
<junit.version>3.8.2</junit.version>
<commons-logging.version>1.1</commons-logging.version>
<antlr.version>3.0.1</antlr.version>
- <jfree.version>1.0.0</jfree.version>
+
<hsqldb.version>1.8.0.7</hsqldb.version>
<javasim.version>2.0-hbraun</javasim.version>
<jaxb.api.version>2.1</jaxb.api.version>
@@ -80,12 +80,6 @@
<artifactId>commons-logging-api</artifactId>
<version>${commons-logging.version}</version>
</dependency>
-
- <dependency>
- <groupId>jfree</groupId>
- <artifactId>jfreechart</artifactId>
- <version>${jfree.version}</version>
- </dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
@@ -114,7 +108,7 @@
<artifactId>javasim</artifactId>
<version>${javasim.version}</version>
</dependency>
-
+
</dependencies>
</dependencyManagement>
@@ -183,6 +177,29 @@
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.1</version>
</plugin>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+
</plugins>
</pluginManagement>
</build>
17 years