public class Trace
extends java.lang.Object
-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=When a suitable tool, such as JConsole, is used to view the registered MBeans, a domain will be available named-Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false
IBM WebSphere MQ classes for JMS.Within this domain will be an MBean named TraceControl that will contain methods that match the API provided by this class. These methods can be called remotely through the MBean to query the current tracing behaviour and to enable or disable it while a JMS client application is running. Finally, if a full client installation (or server installation) is present it is possible to control the IBM WebSphere MQ classes for JMS tracing using the
strmqtc/endmqtrc
commands. The com.ibm.mq.commonservices.jar must be present on the classpath, and the Java
library.path needs to include the WebSphere MQ bin directory. These are not mandatory
pre-requisities of the WebSphere MQ classes for JMS so might not be present in all deployments,
for example, in an application server. This feature is not available on z/OS of i5/OS.| Modifier and Type | Method and Description |
|---|---|
static int |
getTraceLevel()
Gets the current trace detail level.
|
static void |
inject(java.lang.String className,
java.lang.String description,
java.lang.Object data)
Allows an application to inject trace points into the trace file
This can be useful to provide application relavent information or indications
of useful points when providing trace to IBM Service.
|
static boolean |
isOn()
Method to return whether trace is enabled or disabled.
|
static void |
setOff()
Turns the trace facility off.
|
static void |
setOn()
Turns the trace facility on.
|
static void |
setStatus(boolean traceOn)
Sets whether trace is enabled or disabled.
|
static void |
setTraceFileAppend(boolean append)
Determines if the trace file will be appened to once opened.
|
static void |
setTraceFileCount(int count)
Set the number of trace files to cycle through This API must be called BEFORE trace is turned
on; once trace has been turned on this API call is in effect ignored even if trace is
subsequently turned off again.
|
static void |
setTraceFilename(java.lang.String filename)
Sets the trace filename.
|
static void |
setTraceLevel(int newTraceLevel)
Sets the tracing detail level.
|
static void |
setTraceLimit(int count)
Sets the limit of the size of each trace file This API must be called BEFORE trace is turned
on; once trace has been turned on this API call is in effect ignored even if trace is
subsequently turned off again.
|
public static boolean isOn()
public static void setStatus(boolean traceOn)
traceOn - whether trace is enabled or not.public static void setOn()
public static void setOff()
public static void setTraceLevel(int newTraceLevel)
newTraceLevel - the minimum level of trace call that is to be processed.public static int getTraceLevel()
public static void setTraceFileCount(int count)
count - Positive integer - number of files to cycle through 0 - a single file (default)public static void setTraceFilename(java.lang.String filename)
filename - public static void setTraceLimit(int count)
count - Positive integer - data will be written up to that value of bytes per trace file 0
- means no data will be written -1 - means unlimited (default)public static void setTraceFileAppend(boolean append)
append - True if files are to appended to.public static void inject(java.lang.String className,
java.lang.String description,
java.lang.Object data)
className - classname of application classdescription - free text descriptiondata - Object that can be incorporated into trace. Will call toString() for the
value to be put into trace.