Unable to Attach Listener in the GUI
Hi @stevensouza ! I have been trying my hands on Jamon for a couple of days.I am using the EJB interceptor to monitor my methods.Everything is working fine only issue that I am having is monitoring the invocation via listener No matter how many time I try to attach a listener in my case a FIFO Buffer all I get is a response Null listener returned. Ensure there is a listener for this monitor.I tried both programmatically and also via GUI. Its shows there is a listener to my lable but when i click on display all i get is the above mentioned response "Null listener returned. Ensure there is a listener for this monitor".If you could kindly help me out on this I will be highly grateful to you. I am using GlassfishServer 4.0
Hi, here are my first thoughts.
- When you click on a monitor to look at its listeners the web app is based on the index and not the key name unfortunately. The index is the row number that this monitor appears in the display. Note this can change every time you refresh the jamonadmin page. This can cause a problem sometimes that the incorrect monitor is pulled up. If it doesn't have a listener than you might get the message you mention. Look at the screen and confirm that the label for listeners is what you clicked on. Also send me the screen snapshot of what error you are getting.
- At one point I remember the listeners not being able to add jamon listeners with a certain browser (chrome i think). So try it with a different browser. What browser are you using?
- Can you show me what you are doing programmatically? Compare that to the tests for listeners such as this one https://github.com/stevensouza/jamonapi/blob/master/jamon/src/test/java/com/jamonapi/ListenerTypeTest.java or any that specify (listener) in this test directory... https://github.com/stevensouza/jamonapi/tree/master/jamon/src/test/java/com/jamonapi
- This page might also be useful http://jamonapi.sourceforge.net/jamonlisteners.html
Based on what you find we can go from there...
Hi @stevensouza !
Thanks for the prompt reply. The below image displays the error that I have been getting.All I did was attaching listener to the key as shown in the video tutorial.
For the coding part this is what I did after going through the documentation on listener.I defined my own interceptor based on your model. All I get is the same error. By the way I am using Ubuntu Linux with Firefox browser.
`
Monitor mon = MonitorFactory.start(new MonKeyImp(label, details, "ms."));
JAMonListener listener = JAMonListenerFactory.get("FIFOBuffer");
mon.getListenerType("value").addListener(listener);
Thanks & Regards
Have you tried to setup a monitor for something other than the ejb? For example you could go to the part of the jamon admin web app that generates sample sql data. After that go to one of the monitors that it generates and add a 'value FIFOBuffer' to it via the web app (by clicking on the monitors blue manage icon) jamonadmin.jsp page.
@stevensouza
I tried that too but to no avail.I am attaching screenshots below..Don't know if I am doing anything wrong.The task that I have in mind jamon seems to perfectly fit to my requirement but I can't get the listener to work.
