Bytecode instrumentation
843811May 18 2002 — edited Feb 12 2003Hi,
I'm going to add some profiling facility to my J2EE application. Since only business method invocations for selected EJBs is required to performance monitor and monitoring must be done in the production environment, I stick with bytecode instrumentation.
I have to add a startTimer functionality at the beginning of the method and a stopTimer functionality before returning from that method.
startTimer is OK, it's easy to find the beginning of each method in the bytecode.
What about stopTimer? Do I need to catch every return and throw instructions? Or can I use finally block of exception handling somehow? I'm interesting in your experience before doing anything!
Thanks for your help,
SB