[seam-commits] Seam SVN: r11399 - in branches/community/Seam_2_2_Drools5: src/main/org/jboss/seam/drools and 1 other directory.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Tue Aug 18 09:55:31 EDT 2009


Author: tsurdilovic
Date: 2009-08-18 09:55:31 -0400 (Tue, 18 Aug 2009)
New Revision: 11399

Modified:
   branches/community/Seam_2_2_Drools5/examples/drools/resources/WEB-INF/components.xml
   branches/community/Seam_2_2_Drools5/src/main/org/jboss/seam/drools/KnowledgeAgent.java
   branches/community/Seam_2_2_Drools5/src/main/org/jboss/seam/drools/KnowledgeBase.java
Log:
Drools5 Integration.

Modified: branches/community/Seam_2_2_Drools5/examples/drools/resources/WEB-INF/components.xml
===================================================================
--- branches/community/Seam_2_2_Drools5/examples/drools/resources/WEB-INF/components.xml	2009-08-18 12:32:17 UTC (rev 11398)
+++ branches/community/Seam_2_2_Drools5/examples/drools/resources/WEB-INF/components.xml	2009-08-18 13:55:31 UTC (rev 11399)
@@ -11,14 +11,14 @@
 	
 	<drools:knowledge-base name="kbase" knowledge-builder-config="kbuilderconfig.properties" knowledge-base-config="kbaseconfig.properties">
     	<drools:rule-resources>
-    		<value>classpath:numberguess.drl:DRL</value>
+    		<value>classpath;numberguess.drl;DRL</value>
     	</drools:rule-resources>	
     </drools:knowledge-base>
     
     <drools:knowledge-agent name="kagent" agent-name="myAgent" scan-resources="true" scan-directories="false" 
     	monitor-change-set-events="true" scan-interval="30">
     	<drools:change-sets>
-    		<value>classpath:numberguesschangeset.xml</value>
+    		<value>classpath;numberguesschangeset.xml</value>
     	</drools:change-sets>
     </drools:knowledge-agent>
     
@@ -32,7 +32,7 @@
     
     <drools:knowledge-base name="kbase2" knowledge-builder-config="kbuilderconfig.properties" knowledge-base-config="kbaseconfig.properties">
     	<drools:rule-resources>
-    		<value>classpath:test.drl:DRL</value>
+    		<value>classpath;test.drl;DRL</value>
     	</drools:rule-resources>	
     </drools:knowledge-base>
     
@@ -50,7 +50,7 @@
         
     <drools:knowledge-base name="kbase3" knowledge-builder-config="kbuilderconfig.properties" knowledge-base-config="kbaseconfig.properties">
     	<drools:rule-resources>
-    		<value>classpath:test2.drl:DRL</value>
+    		<value>classpath;test2.drl;DRL</value>
     	</drools:rule-resources>	
     </drools:knowledge-base>
     
@@ -67,7 +67,7 @@
     
     <drools:knowledge-base name="kbase4" knowledge-builder-config="kbuilderconfig.properties" knowledge-base-config="kbaseconfig.properties">
     	<drools:rule-resources>
-    		<value>classpath:testtemplate.drl:DRL:testTemplateDataProvider</value>
+    		<value>classpath;testtemplate.drl;DRL;testTemplateDataProvider</value>
     	</drools:rule-resources>	
     </drools:knowledge-base>
     

Modified: branches/community/Seam_2_2_Drools5/src/main/org/jboss/seam/drools/KnowledgeAgent.java
===================================================================
--- branches/community/Seam_2_2_Drools5/src/main/org/jboss/seam/drools/KnowledgeAgent.java	2009-08-18 12:32:17 UTC (rev 11398)
+++ branches/community/Seam_2_2_Drools5/src/main/org/jboss/seam/drools/KnowledgeAgent.java	2009-08-18 13:55:31 UTC (rev 11399)
@@ -32,7 +32,7 @@
 public class KnowledgeAgent
 {
    private static final LogProvider log = Logging.getLogProvider(RuleAgent.class);
-   private static final Pattern COLON = Pattern.compile(":");
+   private static final Pattern DIVIDER = Pattern.compile(";");
    private static final int RESOURCE_PATH = 0;
    private static final int RESOURCE = 1;
    private static final String RESOURCE_TYPE_URL = "url";
@@ -115,7 +115,7 @@
    }
    
    private void applyChangeSet(org.drools.agent.KnowledgeAgent kagent, String changeSet) {
-      String[] resourceParts = COLON.split(changeSet.trim());
+      String[] resourceParts = DIVIDER.split(changeSet.trim());
       
       if(resourceParts.length != 2) {
          log.error("Unable to use changeset: " + changeSet);

Modified: branches/community/Seam_2_2_Drools5/src/main/org/jboss/seam/drools/KnowledgeBase.java
===================================================================
--- branches/community/Seam_2_2_Drools5/src/main/org/jboss/seam/drools/KnowledgeBase.java	2009-08-18 12:32:17 UTC (rev 11398)
+++ branches/community/Seam_2_2_Drools5/src/main/org/jboss/seam/drools/KnowledgeBase.java	2009-08-18 13:55:31 UTC (rev 11399)
@@ -40,7 +40,7 @@
 public class KnowledgeBase
 {
    private static final LogProvider log = Logging.getLogProvider(KnowledgeBase.class);
-   private static final Pattern COLON = Pattern.compile(":");
+   private static final Pattern DIVIDER = Pattern.compile(";");
    private static final int RESOURCE_PATH = 0;
    private static final int RESOURCE = 1;
    private static final int RESOURCE_TYPE = 2;
@@ -158,7 +158,7 @@
    
    protected void addResource(KnowledgeBuilder kbuilder, String resource)
    {
-      String[] resourceParts = COLON.split(resource.trim());
+      String[] resourceParts = DIVIDER.split(resource.trim());
       
       if (resourceParts.length < 3)
       {



More information about the seam-commits mailing list