[rules-users] Logging using JSR94 StatelessRuleSession

Mark Proctor mproctor at codehaus.org
Thu Apr 8 19:46:02 EDT 2010


On 08/04/2010 23:33, madchen wrote:
> I set up the rule session basically like this:
>
> RuleServiceProvider ruleServiceProvider =
> RuleServiceProviderManager.getRuleServiceProvider("http://drools.org/");
> RuleRuntime ruleRuntime = ruleServiceProvider.getRuleRuntime();
> (StatelessRuleSession) session = ruleRuntime.createRuleSession( uri, null,
> RuleRuntime.STATELESS_SESSION_TYPE);
>
> I can't see a way to use AgendaEventListener because there is no place to
> add listeners. I tried using KnowledgeRuntimeLoggerFactory, but I get this
> error "org.drools.jsr94.rules.StatelessRuleSessionImpl cannot be cast to
> org.drools.event.KnowledgeRuntimeEventManager"
>
> I was wondering if anyone knew of a good way to do logging with this setup?
>    
My recommendation is just not to use JSR94, it's a waste of space and 
time. And you can't do anything other than insert objects and call 
fireAllRules.

Mark
> Thanks,
> Kevin
>    





More information about the rules-users mailing list