Hi All,
Our application is developed using Spring framework. We have our Rules in
Guvnor. In our application we use resource scanner to poll Guvnor to check
and download the latest package if modified like below.
<drools:resource-change-scanner id="s1" interval="3600" />
The issue is in case if Guvnor goes down and during that time if scanner
checks Guvnor and finds Guvnor is down, THEN
1) In the application the local copy of the Rules package which Spring bean
have is lost. Hence Rules will not be fired.
2) Even if we restart the Guvnor, the scanner not scanning the resource.
I have one package in Guvnor. Before the Guvnor went down the log message
from scanner was
"ResourceChangeScanner attempt to scan 1 resources"
After the Guvnor went down the log message is
"ResourceChangeScanner attempt to scan 0 resources"
That means it is not even scanning the Guvnor resource as the log message
says its 0 resource scanning.
Any idea on how to handle this kind of scenario where even if Guvnor goes
down Spring should still should continue using its spring local copy which
it downloaded while starting the application.
My complete spring bean configuration is as below.
<bean id="EnvConfiguration"
class="com.hp.rebates.grs.model.rules.conf.EnvConfiguration">
</bean>
<drools:resource id="resource"
source="#{EnvConfiguration.ruleEngineURL}"
type="CHANGE_SET" />
<drools:resource-change-scanner id="s1"
interval="3600" />
<drools:kagent kbase="knowledgeBase" id="kagent"
new-instance="false">
<drools:resources>
<drools:resource ref="resource" />
</drools:resources>
</drools:kagent>
<drools:kbase id="knowledgeBase">
<drools:resources>
<drools:resource ref="resource" />
</drools:resources>
</drools:kbase>
<drools:ksession id="knowledgeSession" type="stateless"
kbase="knowledgeBase" />
<bean id="StartChangeScanner"
class="com.hp.rebates.grs.model.rules.conf.StartChangeScanner">
</bean>
--
View this message in context:
http://drools.46999.n3.nabble.com/Govner-drools-resource-change-scanner-t...
Sent from the Drools: User forum mailing list archive at
Nabble.com.