*/
public static KnowledgeAgent createKnowledgeAgent(int scannerInterval) {
KnowledgeBaseConfiguration kBaseConfiguration = KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
kBaseConfiguration.setOption(EventProcessingOption.STREAM);
KnowledgeAgentConfiguration kaConf = KnowledgeAgentFactory.newKnowledgeAgentConfiguration();
/* Do not scan directories, just scan files */
kaConf.setProperty("drools.agent.scanDirectories", "false");
kaConf.setProperty("drools.agent.scanResources", "true");
/* Incremental KnowledgeBase build */
kaConf.setProperty("drools.agent.newInstance", "false");
kaConf.setProperty("drools.agent.useKBaseClassLoaderForCompiling", "true");
KnowledgeBase kBase = KnowledgeBaseFactory.newKnowledgeBase(kBaseConfiguration);
KnowledgeAgent kAgent = KnowledgeAgentFactory.newKnowledgeAgent("Gnostic", kBase, kaConf);
ResourceFactory.getResourceChangeNotifierService().start();
ResourceChangeScannerConfiguration sConf =