How can I use Byteman to intercept Thread.interrupt() calls?
Issue
I want to use byteman to intercept calls to Thread.interrupt() using a rule like the following:
RULE check who is calling Thread.interrupt()
CLASS java.lang.Thread
METHOD interrupt()
AT ENTRY
IF TRUE
DO traceStack("\*\*\* called interrupt on thread " + $0 + " from thread " + Thread.currentThread(), 50)
ENDRULE
After setting up this rule and testing a Thread.interrupt() call, no logging is generated.
Environment
JBoss Enterprise Application Platform
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
