Enable logging and tracing for ActiveX application clients

The ActiveX to enterprise bean bridge provides two logging and tracing formats: Windows application event log and Java trace log.

Windows application event log

The Windows application event log shows Java Native Interface (JNI) errors, Java console error messages, and XJB initialization messages. This log is most useful for determining XJBInit() errors and any unusual exceptions that do not come from the Java environment. By default, critical error logging is enabled and debug and event logging is disabled.

To enable or disable logging certain types of events to the Windows application event log, you need to specify one or more parameters to XJBInit(). If more than one parameter is set, they are processed in the order in which they appear in the input string array to XJBInit(). When XJBInit() is initialized, these parameters can no longer be set or reset for the life of the process. Using the Java java.lang.System.setProperty() method to set these values also has no effect.

These are the parameters that you can specify on the XJBInit() method to enable or disable logging.

To view the Windows 2000 application event log with the event viewer, perform these steps:

  1. Click Start --> Settings --> Control Panel.
  2. Double-click Administrative Tools.
  3. Double-click Event Viewer.

All ActiveX to enterprise bean bridge event names contain the text "WebSphere XJB" in the source column and appear in the Application log. For information about using Event Viewer, select Action --> Help in the Event Viewer menu.

To view the Windows NT application event log with the event viewer, click Start --> Programs --> Administrative Tools --> Event Viewer.

All ActiveX to enterprise bean bridge event names contain the text "WebSphere XJB" in the source column and appear in the Application log. For information about using Event Viewer, see the Help menu in Event Viewer.

Java trace log

The Java trace log displays information that you can use to debug method calls, class lookups, and argument coercion problems. Because the Java portion of the bridge mirrors the functionality of the COM IDispatch interface, the information in the trace log is similar to what you have come to expect from an IDispatch interface. To understand the trace log, you need a fundamental understanding of IDispatch.

To enable user-logging, add these parameters to the XJBInit() input string array:

  "-DtraceString=com.ibm.ws.client.xjb.*=event=enabled"
  "-DtraceFile=C:\MyTrace.txt"