All,

    The MBeans in Drools where designed to be used out of the box, so no facilities where implemented to make it easier to re-implement them (of course you can do that, just saying, try out of the box first and see if it matches your needs or not... :) ).

    To enable the mbeans:

KnowledgeBaseConfiguration conf = ...
conf.setOption( MBeansOption.ENABLED );

    Some links:

http://downloads.jboss.com/drools/docs/5.1.1.34858.FINAL/drools-introduction/html_single/index.html#d0e47
http://blog.athico.com/2009/10/drools-monitoring-with-jmx.html

    Edson


2011/1/21 Wolfgang Laun <wolfgang.laun@gmail.com>
Just get some version and modify it according to your needs. Here is the latest:

http://fisheye.jboss.org/browse/JBossRules/trunk/drools-core/src/main/java/org/drools/management/KnowledgeSessionMonitoring.java?hb=true

It's really no big deal to write an agenda listener that counts creations, cancellations, firings in a map with the rule name as its key. Less than 100 lines of Java code...

-W




On 21 January 2011 12:57, asutosh_pandya <asutosh.pandya@cognizant.com> wrote:
>
> Hello Laun,
>
> Thanks for the reply.
>
> Well there is nothing wrong with the listeners. The requirement is such that
> we need all the information only after firing the rules. The
> KnowledgeSession itself should provide all the information rather than going
> through each and every events and logging the information every time.
>
> Further I am using Drools 5.1.0.M1 API for the current requirement which has
> only API (jar files). No source code is available for the same. The
> implementation class of KnowledgeSessionMonitoringMBean i.e.
> KnowledgeSessionMonitoring.java is not available in Drools 5.1.0.M1 API.
>
> Can you please guide me how can I create an instance of
> KnowledgeSessionMonitoringMBean or any other calls which can provide me the
> above information.
>
> Thanks in advance,
> Asutosh
> --
> View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Use-of-DroolsManagementAgentMBean-tp2300090p2301291.html
> Sent from the Drools - User mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>


_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




--
  Edson Tirelli
  JBoss Drools Core Development
  JBoss by Red Hat @ www.jboss.com