Logging and tracing with the IMS TM resource adapter

The IMS™ TM resource adapter, in addition to other J2EE components, provides controls for logging and tracing component information.
A trace file is created when these controls are set for logging and tracing and you run your Java™ application using WebSphere® Application Server.

Note: Ensure that only one client is running when the trace is on.

To set controls for logging and tracing, complete the following steps:

  1. On the welcome page of WebSphere Application Server, expand Troubleshooting and select Logs and Trace to open the Logging and Tracing page.
  2. On the Logging and Tracing page click on the server for which you would like tracing, e.g. server1 and click Diagnostic Trace. The Diagnostic Trace Service page will open.
  3. On the Configuration tab ensure that the Enable Log option is selected. If it is not, select it.
  4. You can accept the default name and location of the trace output file or you can modify it. To modify the default name and location, enter a different name and location of the file in the File name field.
  5. Click OK.
  6. On the Logging and Tracing page click Change Log Detail Levels. The Change Log Detail Levels page will open.
  7. To enable logging and tracing in the IMS Resource adapter, enter the following in the Groups field under General Properties on the Configuration tab and click OK:
    *=info: com.ibm.connector2.ims*=finest: com.ibm.ims.ico.*=finest
    Other combinations of trace strings will enable tracing in other components. For example, with the following trace string:
    com.ibm.ejs.j2c.*=finest:com.ibm.connector2.*=finest

    the string com.ibm.ejs.j2c.* provides you with logging and tracing of WebSphere's implementation of the J2EE Connector Architecture and the string com.ibm.connector2.* provides you with logging and tracing of all of the resource adapters, including IMS.

    Note: Click Save to save the changes to the master configuration.
  8. Repeat step 7 for the Runtime tab and Click OK
  9. In the left navigation pane, select Resources–>Expand on Resource Adapters. Click on Resource adapters.
  10. On the Resource adapters page, select an IMS resource adapter.
  11. Under Additional properties click J2C connection factories. The J2C connection factories page will open.
  12. Select the connection factory for which you want to enable tracing and under Additional Propertiesclick Custom properties.
  13. Scroll down the Custom properties table and select the TraceLevel property value. Specify a non-zero value to enable logging and tracing. TraceLevel values correspond to constants in the interface com.ibm.connector2.ims.ico.IMSTraceLevelProperties. Specify a non-zero value to enable logging and tracing. TraceLevel values correspond to constants in the interface com.ibm.connector2.ims.ico.IMSTraceLevelProperties.
    TraceLevel Value IMSTraceLevelProperties Description
    0 RAS_TRACE_OFF No tracing or logging occurs.
    1 RAS_TRACE_ERROR_EXCEPTION Only errors and exceptions are logged.
    2 RAS_TRACE_ENTRY_EXIT Errors and exceptions plus the entry and exit of important methods are logged.
    3 RAS_TRACE_INTERNAL Errors and exceptions, the entry and exit of important methods, and the contents of buffers sent to and received from IMS Connect are logged.
  14. Click OK.
  15. Click Save at the top.
  16. Stop the server and then restart it.
  17. Run your Java application and then examine the trace file.
Related reference
Diagnosing problems when using the IMS TM resource adapter
J2CA0056I, WLTC0017E, HWSP1445E, and HWSSL00E Error Messages
IMS TM resource adapter messages and exceptions

Feedback