[jboss-svn-commits] JBL Code SVN: r27017 - in labs/jbossrules/trunk: drools-core/src/main/java/org/drools and 1 other directories.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Jun 18 13:43:29 EDT 2009
Author: tirelli
Date: 2009-06-18 13:43:29 -0400 (Thu, 18 Jun 2009)
New Revision: 27017
Modified:
labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/conf/KnowledgeBaseConfigurationTest.java
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/RuleBaseConfiguration.java
labs/jbossrules/trunk/drools-core/src/main/resources/META-INF/drools.default.rulebase.conf
Log:
JBRULES-2128: setting the default to none
Modified: labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/conf/KnowledgeBaseConfigurationTest.java
===================================================================
--- labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/conf/KnowledgeBaseConfigurationTest.java 2009-06-18 16:42:46 UTC (rev 27016)
+++ labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/conf/KnowledgeBaseConfigurationTest.java 2009-06-18 17:43:29 UTC (rev 27017)
@@ -408,7 +408,41 @@
config.getProperty( MultithreadEvaluationOption.PROPERTY_NAME ) );
}
+ public void testRulebaseSetUpdateHandler() {
+ // this test is to avoid a regression, since update handler was supposed to be disabled in Drools 5.
+ // At this moment, we no longer want to expose the update handler API, so, we did not created an Option
+ // class for it.
+
+ // checking the string based getProperty() method
+ assertEquals( "",
+ config.getProperty( "drools.ruleBaseUpdateHandler" ) );
+
+ // setting the options using the string based setProperty() method
+ config.setProperty( "drools.ruleBaseUpdateHandler",
+ "somethingElse" );
+
+ // checking the string based getProperty() method
+ assertEquals( "somethingElse",
+ config.getProperty( "drools.ruleBaseUpdateHandler" ) );
+
+ // setting the options using the string based setProperty() method
+ config.setProperty( "drools.ruleBaseUpdateHandler",
+ null );
+
+ // checking the string based getProperty() method
+ assertEquals( "",
+ config.getProperty( "drools.ruleBaseUpdateHandler" ) );
+
+ // setting the options using the string based setProperty() method
+ config.setProperty( "drools.ruleBaseUpdateHandler",
+ "" );
+
+ // checking the string based getProperty() method
+ assertEquals( "",
+ config.getProperty( "drools.ruleBaseUpdateHandler" ) );
+ }
+
}
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/RuleBaseConfiguration.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/RuleBaseConfiguration.java 2009-06-18 16:42:46 UTC (rev 27016)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/RuleBaseConfiguration.java 2009-06-18 17:43:29 UTC (rev 27017)
@@ -288,7 +288,7 @@
} else if ( name.equals( ConsequenceExceptionHandlerOption.PROPERTY_NAME ) ) {
setConsequenceExceptionHandler( StringUtils.isEmpty( value ) ? DefaultConsequenceExceptionHandler.class.getName() : value );
} else if ( name.equals( "drools.ruleBaseUpdateHandler" ) ) {
- setRuleBaseUpdateHandler( StringUtils.isEmpty( value ) ? FireAllRulesRuleBaseUpdateListener.class.getName() : value );
+ setRuleBaseUpdateHandler( StringUtils.isEmpty( value ) ? "" : value );
} else if ( name.equals( "drools.conflictResolver" ) ) {
setConflictResolver( RuleBaseConfiguration.determineConflictResolver( StringUtils.isEmpty( value ) ? DepthConflictResolver.class.getName() : value ) );
} else if ( name.equals( "drools.advancedProcessRuleIntegration" ) ) {
@@ -426,7 +426,7 @@
"org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler" ) );
setRuleBaseUpdateHandler( this.chainedProperties.getProperty( "drools.ruleBaseUpdateHandler",
- "org.drools.base.FireAllRulesRuleBaseUpdateListener" ) );
+ "" ) );
setConflictResolver( RuleBaseConfiguration.determineConflictResolver( this.chainedProperties.getProperty( "drools.conflictResolver",
"org.drools.conflict.DepthConflictResolver" ) ) );
Modified: labs/jbossrules/trunk/drools-core/src/main/resources/META-INF/drools.default.rulebase.conf
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/resources/META-INF/drools.default.rulebase.conf 2009-06-18 16:42:46 UTC (rev 27016)
+++ labs/jbossrules/trunk/drools-core/src/main/resources/META-INF/drools.default.rulebase.conf 2009-06-18 17:43:29 UTC (rev 27017)
@@ -16,5 +16,4 @@
drools.executorService = org.drools.concurrent.DefaultExecutorService
drools.conflictResolver = org.drools.conflict.DepthConflictResolver
drools.consequenceExceptionHandler = org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler
-drools.ruleBaseUpdateHandler = org.drools.base.FireAllRulesRuleBaseUpdateListener
drools.workDefinitions = WorkDefinitions.conf
\ No newline at end of file
More information about the jboss-svn-commits
mailing list