|
Revision 1628, 1.3 kB
(checked in by amandel, 2 years ago)
|
|
Add work in progress tracing components.
- Extended TracingProxy? that allows different Traces to be used
- TracingInjector? that allows aspect like injection of the tracing aspect.
Please note that this is still work in progress.
|
-
Property svn:mime-type set to
text/plain
|
| Line | |
|---|
| 1 | <body> |
|---|
| 2 | <section> |
|---|
| 3 | <title>Tracing Injector Utilities</title> |
|---|
| 4 | <para> |
|---|
| 5 | To generate tracing output for debugging purposes the |
|---|
| 6 | java jdk 1.4 (JSR47) convenience methods for tracing are |
|---|
| 7 | used |
|---|
| 8 | (<a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Logger.html#entering(java.lang.String,%20java.lang.String)">entering</a>, |
|---|
| 9 | <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Logger.html#exiting(java.lang.String,%20java.lang.String)">exiting</a> |
|---|
| 10 | and |
|---|
| 11 | <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/Logger.html#throwing(java.lang.String,%20java.lang.String,%20java.lang.Throwable)">throwing</a>). |
|---|
| 12 | To avoid that these same code must be added to each method that |
|---|
| 13 | should be subject of tracing this code is injected |
|---|
| 14 | as an aspect after the compilation on byte code level. |
|---|
| 15 | </para> |
|---|
| 16 | <para> |
|---|
| 17 | There is a ANT target that triggers the byte code injection. |
|---|
| 18 | <apidoc name="tracing"> |
|---|
| 19 | <class name="org.jcoderz.commons.tracing.TracingInjectorTask"/> |
|---|
| 20 | </apidoc> |
|---|
| 21 | </para> |
|---|
| 22 | <para> |
|---|
| 23 | If the instance is encapsulated by an public interface it is also possible to |
|---|
| 24 | use a dynamic proxy to get the tracing logging. This is supported by the |
|---|
| 25 | TracingProxy utility class. |
|---|
| 26 | </para> |
|---|
| 27 | </section> |
|---|
| 28 | </body> |
|---|