com.ibm.websphere.ras.annotation

Annotation Type TraceOptions


  1. @Retention(value=RUNTIME)
  2. @Target(value={TYPE,PACKAGE})
  3. public @interface TraceOptions
The TraceOptions annotation can be used to declare which trace group a class (or classes in a package) should be asociated with. The annotation can also be used to declare whether or not debug traces should be cut when exceptions are explicitly thrown or caught.

For example:

 @TraceOptions(traceGroup = "MyTraceGroup", traceExceptionThrow = true)
 public class Foo
 {}
 
will associate the class Foo with the MyTraceGroup trace group and will cause debug traces to be added whenever an exception is explicitly thrown.
or:
 @TraceOptions(traceGroups = { "BarGroup", "FooGroup" }, messageBundle = "com.ibm.bar")
 public class Bar
 {}
 
will associate the class Bar with the trace groups BarGroup and FooGroup if the underlying trace runtime supports multiple groups. If not, only the first trace group listed will be used. The message bundle "com.ibm.bar" will be used for messages.

Optional Element Summary

Modifier and Type Optional Element and Description
  1. java.lang.String
messageBundle
  1. boolean
traceExceptionHandling
  1. boolean
traceExceptionThrow
  1. java.lang.String
traceGroup
  1. java.lang.String[]
traceGroups

Optional Element Detail

traceGroup

  1. public abstract java.lang.String traceGroup
Default:
""

traceGroups

  1. public abstract java.lang.String[] traceGroups
Default:
{}

messageBundle

  1. public abstract java.lang.String messageBundle
Default:
""

traceExceptionThrow

  1. public abstract boolean traceExceptionThrow
Default:
false

traceExceptionHandling

  1. public abstract boolean traceExceptionHandling
Default:
false