This is the probe I have:
Code: Select all
@MethodPattern({"mydomain.webapp.integration.MyServiceFacade:*(*)"})
public class JspProbe {
public static long onEnter(@MethodName String methodSignature, @This Object object) {
if(methodSignature.contains("getAccountDTO")){
System.out.println("ENTER |"+object +"|"+methodSignature+"|" + "( "+System.nanoTime()+")");
}
return System.nanoTime();
}
public static void onReturn(@OnEnterResult long enterTime, @MethodName String methodSignature, @MethodParameterTypes String methodParameterTypes, @This Object object) {
if(methodSignature.contains("getAccountDTO")){
System.out.println("RETURN |"+object +"|"+methodSignature+"|" + "( "+System.nanoTime()+")");
}
}
}
Code: Select all
public List<AccountDTO> getAccountDTOs(final List<AccountId> accountIds){
System.out.println("executing getAccountAndPositionsDTOs");
return new ArrayList<AccountDTO>()
}
And the outprint from the log is the following, which clearly shows that the method is executed once but the probe registers 2 calls.
Code: Select all
ENTER |mydomain.webapp.integration.MyServiceFacade@557497f2|getAccountDTOs|( 1558167984511865)
ENTER |mydomain.webapp.integration.MyServiceFacade@557497f2|getAccountDTOs|( 1558167991299882)
executing getAccountAndPositionsDTOs
RETURN |mydomain.webapp.integration.MyServiceFacade@557497f2|getAccountDTOs|( 1558167991458486)
RETURN |mydomain.webapp.integration.MyServiceFacade@557497f2|getAccountDTOs|( 1558167991774539)
The behaviour happens for some calls like this one, while most similar calls are registered correctly. If I change the method pattern and add the method name to it, the probe registers only one call:
Code: Select all
@MethodPattern({"mydomain.webapp.integration.MyServiceFacade:getAccountDTO(*)"})
We use Yourkit 10.0.2, Spring 3 running on jetty 7. I suspect that this post highlights the same bug:
http://forums.yourkit.com/viewtopic.php ... obe#p13595
regards Per Ehnbom