cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

This product reached the end of support date on March 31, 2021.

EJB inherited methods not instrumented

y_albou
Inactive

Hello,

I am using Dynatrace 6.3.16
When I invoke a method in an EJB 3 stateless session bean (in jboss EAP 6) then I can see in the resulting PP my method.

If I move this method in an abstract class inherited by my EJB then I cannot see anymore this method in my PP.

I checked that I don't have any special sensor configuration that could exclude my method.
I also checked the configuration of the EJB sensor pack provided by default and the configuration seems OK (Inheritance is Automatic, Visibility is public, ...).

Any Idea what I missed ?

Thanks

Yann

9 REPLIES 9

dave_mauney
Dynatrace Champion
Dynatrace Champion

Hi Yann,

Please try changing the "Inheritance" drop down from "automatic" to "inherited methods" and see if that helps.

HTH,

dave

y_albou
Inactive

Hi Dave,

Thanks for the answer, but unfortunately it doesn't resolve the issue 😞

Yann

dave_mauney
Dynatrace Champion
Dynatrace Champion

Hi Yann,

Do you see your method in the Deployed Sensors tab under Agents Overview?

If not, did you do a Hot Sensor Placement or did you do an Application Restart?

I have seen a post that indicated a Hot Sensor Placement was insufficient and a restart took care of it...below are a couple of posts that may help some:

https://answers.dynatrace.com/questions/155791/una...
https://answers.dynatrace.com/questions/154268/se...

HTH,

dave

y_albou
Inactive

Hi Dave,

No I cannot see my method (or my class) in the Deployed Sensors tab under Agents Overview

I restarted (several times) my JVM (Jboss EAP6 server) but I still cannot see my method in the pure path.

I really don't understand what is wrong in this situation...

Thanks,
Yann

y_albou
Inactive

Hello,

To be more precise on the usecase here is the code of my EJB Session "Foo1Bean"

@Stateless
public class Foo1Bean extends AbstractFoo1Bean implements Foo1Remote {
public String method1(String param) {
return "method1: " + param;
}
}

public class AbstractFoo1Bean {
public String method2(String param) {
return "method2: " + param;
}
}

@Remote
public interface Foo1Remote {
String method1(String param);
String method2(String param);
}

and in purepaths I can see method1 but not method2...

is it supposed to work ?

Thanks
Yann

dave_mauney
Dynatrace Champion
Dynatrace Champion

Assuming AbstractFoo1Bean were really abstract, if you instrument AbstractFoo1Bean and set Inheritance to "inherited methods" you should see any subclass of that method that is implemented. But here, AbstractFoo1Bean is concrete and implements the method.

Since AbstractFoo1Bean is concrete, I think "automatic/this method" on method2 would pick it up rather than Foo1Bean.

Why not instrument the interface instead?

I thought there was a real abstract class involved...

HTH,

dave

y_albou
Inactive

Hello Dave,

Sorry I just forgot the abstract word (I should have copy it directly from my IDE 🙂 )

So yes the classe AbstractFoo1Bean is really abstract.

but configuring inheritance to "inherited methods" doesn't help. I tried different configuration for the inheritance parameter but without success.

I also tried to instrument the interface through the "javax.ejb.Remote" annotation but it does't work.

Of course if I explicitly instrument the abstract class AbstractFoo1Bean it works but the goal is to be generic. I don't want to define explicitly each class that needs to be instrumented.

Thanks again for your help.

Yann

dave_mauney
Dynatrace Champion
Dynatrace Champion

Do you actually implement method2 in AbstractFoo1Bean? If you leave it unimplemented I wonder if that would help. Also, have you considered instrumenting the interface, which should affect all the subclasses too (when "inherited methods" is used).

If you send the actual source to me at dave dot mauney at dynatrace dot com, I can take a look.

Thanks,

dave

y_albou
Inactive

Hi Dave,

Yes method2 is implemented in AbstractFoo1Bean.
Leaving it unimplemented doesn't help.
Yes I also tried to instrument the interface (but using the "javax.ejb.Local" annotation in order to be generic) but without success.

I just sent you my code.

Thank you

Yann