Fully featured low overhead profiler for Java EE and Java SE platforms.
Ultimate profiling and monitoring solution for Gradle, Maven, Ant, JUnit and TestNG.
Easy to use performance and memory profiler for .NET framework.

Event trigger is not firing

Moderators: Vladimir Kondratyev, Anton Katilin

Event trigger is not firing

Postby ajitmahadik » Wed Feb 25, 2015 4:28 pm

I am using following event to trigger

Method Invocation:

Method Pattern:
<packageName>.EventBatchWriter : updateEventNotificationStatus(EventBatchDomain)

Instance of class:
<packageName>.EventBatchWriter

Below three check boxes are checked. But the event is not getting fired.
ajitmahadik
 
Posts: 1
Joined: Wed Feb 25, 2015 4:24 pm

Re: Event trigger is not firing

Postby Anton Katilin » Thu Feb 26, 2015 9:00 am

Hi,

1. Did you you add an action? The 3 checks you mentioned are applied only if the RecordMethodInvocation action is added.
2. Is EventBatchWriter an interface/a base class or the actual class contains the definition of updateEventNotificationStatus()? The method pattern implies the latter: it matches class name, not its superclasses.
3. You don't need to specify "Instance of class" unless you want to additionally filter the classes matching the "Method Pattern".

Best regards,
Anton
Anton Katilin
 
Posts: 5576
Joined: Wed Aug 11, 2004 8:37 am

Re: Event trigger is not firing

Postby Anton Katilin » Thu Feb 26, 2015 9:03 am

More questions:

4. When did you apply the trigger? If you did it after the class to be implemented had loaded and some of its instances had been created, they may keep using the old method definition. To avoid this problem apply the triggers from start, as described in the "How to specify triggers on startup" section:
https://www.yourkit.com/docs/java/help/triggers.jsp
Anton Katilin
 
Posts: 5576
Joined: Wed Aug 11, 2004 8:37 am

Re: Event trigger is not firing

Postby Anton Katilin » Thu Feb 26, 2015 9:31 am

An update:

It looks like the method pattern is wrong. Please note that the parameter types, if specified, should be full class names.

So, your pattern should likely use the EventBatchDomain's full class name:

Code: Select all
<packageName>.EventBatchWriter : updateEventNotificationStatus(<packageName>.EventBatchDomain)


Alternatively, if there is only one method named updateEventNotificationStatus, you can use a wildcard to match any parameter list:

Code: Select all
<packageName>.EventBatchWriter : updateEventNotificationStatus(*)
Anton Katilin
 
Posts: 5576
Joined: Wed Aug 11, 2004 8:37 am


Return to Java Profiler

Who is online

Users browsing this forum: Google [Bot] and 10 guests