Discussions
Categories
- 17.9K All Categories
- 3.4K Industry Applications
- 3.4K Intelligent Advisor
- 75 Insurance
- 537.6K On-Premises Infrastructure
- 138.7K Analytics Software
- 38.6K Application Development Software
- 6.1K Cloud Platform
- 109.6K Database Software
- 17.6K Enterprise Manager
- 8.8K Hardware
- 71.3K Infrastructure Software
- 105.4K Integration
- 41.6K Security Software
ProbeRuntimeMBean terminate method does not work for me ..

938644
Member Posts: 50
Hi,
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:
probeAvgThroughput.terminate();
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 ..
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:
probeAvgThroughput.terminate();
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 ..
Answers
-
Hi,
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)?
Thanks
Alex -
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.