[rules-users] drools-server - resource change scanner/notifier

Ross H ross.hall at suncorp.com.au
Mon Mar 7 22:32:16 EST 2011


There have been previous posts on this problem:

http://drools-java-rules-engine.46999.n3.nabble.com/Starting-resource-change-scanner-and-notifier-in-drools-server-td1528921.html

but I was unable to find a resolution, or issue in Jira.

Looking at the code in 5.1.1 (and trunk), I could not find where the polling
and notifier services are started. To overcome the problem I have modified
the following:

drools-spring-1.0.0.xsd (added a start attribute to resource-change-scanner)
xsd:attribute name="start" use="optional" type="xsd:boolean"

ResourceChangeScannerBeanFactory (started service in afterPropertiesSet())
    	if (isStart()) {
    	  ResourceFactory.getResourceChangeNotifierService().start();
    	  ResourceFactory.getResourceChangeScannerService().start();
    	}

ResourceChangeScannerDefinitionParser (added start attribute)
        factory.addPropertyValue( START,
            element.getAttribute( START ) );

It seems to be working quite nicely.
Just wondering if this is the right way to go about it, or whether there is
a better method.

Regards RossH


--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/drools-server-resource-change-scanner-notifier-tp2649325p2649325.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list