[rules-users] Drools 5.1 and JMX

Agarwal, Beena BAgarwal at ea.com
Wed Nov 17 11:17:27 EST 2010


Is the startINternalMBeans operation supposed to show session stats? 

-----Original Message-----
From: Agarwal, Beena 
Sent: Wednesday, November 17, 2010 7:27 AM
To: 'Edson Tirelli'
Subject: RE: [rules-users] Drools 5.1 and JMX

Operations I see are only startInternalMBeans and stopInternalMBeans. startINternalMBeans gives me configuration and EntryPoints but no session information. What am I missing? Please see screenshot attached


-----Original Message-----
From: ed.tirelli at gmail.com [mailto:ed.tirelli at gmail.com] On Behalf Of Edson Tirelli
Sent: Wednesday, November 17, 2010 6:40 AM
To: Agarwal, Beena
Cc: Rules Users List
Subject: Re: [rules-users] Drools 5.1 and JMX

   Long time since I played with that, but if I remember correctly, on jconsole:

http://1.bp.blogspot.com/_yFSmiGQguyE/Ss5bYvWWIQI/AAAAAAAAACw/H1jMLuJE_i8/s1600-h/Drools_JMX_kbase_stats.jpg

   See the "operations" tab on the kbase? Click there and you will see the operation to start presenting the session info.

   Edson

2010/11/16 Agarwal, Beena <BAgarwal at ea.com>:
> Are you talking about KnowledgeBaseMonitoring.startINternalMBeans - if 
> so, how do I get access to KnowledgeBaseMonitoring from the 
> knowledgebase/session
>
> I create a session using        session = 
> commonKB.newStatelessKnowledgeSession();
>
> However, doesn't seem like I have access to the monitoring beans from there either. Also from looking at the source code seems like creating a knowledgebase should invoke - DroolsManagementAgent.registerKnowledgeBase, however not sure when/how DroolsManagementAgent.registerKnowledgeSession is invoked. Do I need to do that to see session stats.
>
> Thanks much for your help
>
> Beena
>
>
> -----Original Message-----
> From: rules-users-bounces at lists.jboss.org 
> [mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Edson 
> Tirelli
> Sent: Tuesday, November 16, 2010 7:09 PM
> To: Rules Users List
> Subject: Re: [rules-users] Drools 5.1 and JMX
>
>    There is an operation on the main bean that starts the session 
> specific mbeans. They are not started automatically because you just 
> need them while actively monitoring. You can keep them off while not 
> (another operation).
>
>    Edson
>
> 2010/11/16 Agarwal, Beena <BAgarwal at ea.com>:
>> I've enabled JMX using the following configuration 
>> KnowledgeBaseConfiguration kbaseConf = 
>> KnowledgeBaseFactory.newKnowledgeBaseConfiguration();
>>                 kbaseConf.setOption(MBeansOption.ENABLED);
>>                 commonKB =
>> KnowledgeBaseFactory.newKnowledgeBase("kb-"+gameCode, kbaseConf);
>>
>> commonKB.addKnowledgePackages(kbuilder.getKnowledgePackages());
>>
>>
>> I see the Mbeans in jconsole. However, don't have any session information.
>> I tried using both stateless and stateful sessions.
>> From looking at the source code stateful sessions are automatically 
>> registered.
>> I'm looking for sessions stats for rules such as 
>> totalActivationsCreated, totalActivationsFired, etc.
>> Is there something I need to do to enable that?
>>
>> Any help would be greatly appreciated
>>
>> Beena
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>>
>
>
>
> --
>   Edson Tirelli
>   JBoss Drools Core Development
>   JBoss by Red Hat @ www.jboss.com
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



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





More information about the rules-users mailing list