Forum Stats

  • 3,851,779 Users
  • 2,264,024 Discussions


ProbeRuntimeMBean terminate method does not work for me ..

938644 Member Posts: 50
edited Nov 1, 2012 6:04PM in Complex Event Processing
I have a strange phenomenon .. I build this application which monitor the throughput of all the stages in the EPN .
The first time I run the program everything seems to be OK . The next time I feed the application ( either via load generator or real data ) ,
the throughput is reducing ( smaller number than the fisrt time ) and next time the throughput is reducing ' an so on ..
I read that I have to use the 'terminate' in order to stop getting the metrics and unregister the ProbeRuntimeMBean from the mbean server .

Here is an snippet of my program:


ObjectName thruputObject = monitorMBean.monitorAvgThroughput(stageObjectIn, (new Long(averageThroughputInterval)).longValue(), (newLong(averageThroughputInterval)).longValue());
ProbeRuntimeMBean probeAvgThroughput = (ProbeRuntimeMBean)MBeanServerInvocationHandler.newProxyInstance(connection, thruputObject, ProbeRuntimeMBean.class, false);
listener = new AverageThroughputJMXNotificationListener(stageName, connection);


When i done I use this:

When i use the 'Visualizer' , the numbers (throughput ) are correct .
Does anyone have an idea what is wrong with my program?
How can i get it work correctly ? ..
Did i miss something?
Plz help ..


  • alexalves
    alexalves Member Posts: 99

    There doesn't seem to be anything wrong with your snippet of code.

    What long value are using for the avg?

    Does this happen only with a single app, or for all apps?

    Is it possible for you to file a bug (with the app)?

  • 938644
    938644 Member Posts: 50
    It took me a while but I think I can give you a good example that shows when it's not working:
    In the CEP Labs there are 7 labs ( tutorials) - "JMS Sample " "EPN Editor " ,"103-CQL-Processor" .. etc .
    If you take the " JMS Sample " , and use the load_ genertao as it said in the tutorial itself , than , when you run it a lot of times ( more than 10 times ) you will see that the number of the thghruput is reducing ( after the 10th or 15th time ) .once it does , the number drpos down dramatically each time you disconnect and reconnect to the mbean server .

    I found it out when my EPN included a lot of stages , and in these cases ( a lot of stagec) , it takes a short time to notice it.
    because you wanted a simple example , It took me a while to notice it - in the begigning I thoght that it happens only with " completcated" EPN
    ( many stages ), but finally i can say that it does in each senario.
This discussion has been closed.