Advertisement
aschuma

ATL :: Byteman :: Setup

Apr 13th, 2017
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.72 KB | None | 0 0
  1. >> $ head $CATALINA_HOME/setenv.sh
  2. BYTEMAN_HOME="/_/opt/byteman"
  3. BYTEMAN_RULES="${CATALINA_HOME}/byteman-rules"
  4. BYTEMAN_OPTS="-Dorg.jboss.byteman.transform.all -javaagent:${BYTEMAN_HOME}/lib/byteman.jar=script:${BYTEMAN_RULES}/monitor.btm,boot:${BYTEMAN_HOME}/lib/byteman.jar,listener:true"
  5. JAVA_OPTS=" ${BYTEMAN_OPTS} "
  6.  
  7.  
  8. >> $ find byteman-rules/
  9. byteman-rules/
  10. byteman-rules//monitor.btm
  11.  
  12. >> $ cat byteman-rules/monitor.btm
  13. RULE trace entering
  14. CLASS com.atlassian.jira.issue.index.DefaultIndexManager
  15. METHOD reIndex
  16. AT ENTRY
  17. #IF callerMatches("com.example.*",true,true)
  18. IF true
  19. DO traceln("[REINDEX]"+" Issue:"+$issue+" Status:"+$issue.getStatusObject().getName()),traceStackMatching("com.example.*",true,true)
  20. ENDRULE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement