-we tried to instrument a method on a derived java class where the method resides on the super class. There are many derived classes, and we want to separate the information captured. We realize that we can override the method call in each derived class and just call super.execute();, but we really prefer NOT to do that. Can you make any recommendations?
Answer by Graeme W. ·
MaryAnn,
Did you try building a BT and splitting on class name using the Methods Classname Value measure?
Offhand, I'm not sure whether you'll get the superclass or the subclass, but I think it's worth a try.
If this works but you want completely separate BTs (e.g., so you can have separate result measure thresholds), just turn the splitting measure into a filter. I can explain how to do that if you'd like.
-- Graeme
Answer by Andreas G. ·
Hi Mary Ann
I am not sure I completely understand your scenario. If you have a method on a super class and you have a Sensor Rule for it it will be instrumented. If the method gets called it will show up on the PurePath - independant on who is calling it. If you overwrite the method you can set the inheritence option to "inherited" methods. This will mean that overwritten methods will also be instrumented.
Andi
JANUARY 15, 3:00 PM GMT / 10:00 AM ET