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:
- On the welcome page of WebSphere Application Server, expand Troubleshooting and
select Logs and Trace to open the Logging and Tracing page.
- 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.
- On the Configuration tab ensure that the Enable Log option
is selected. If it is not, select it.
- 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.
- Click OK.
- On the Logging and Tracing page click Change Log Detail
Levels. The Change Log Detail Levels page will open.
- 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.
- Repeat step 7 for the Runtime tab and Click OK
- In the left navigation pane, select Resources–>Expand
on Resource Adapters. Click on Resource adapters.
- On the Resource adapters page, select an IMS resource adapter.
- Under Additional properties click J2C connection factories.
The J2C connection factories page will open.
- Select the connection factory for which you want to enable tracing
and under Additional Propertiesclick Custom properties.
- 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. |
- Click OK.
- Click Save at the top.
- Stop the server and then restart it.
- Run your Java application and then examine the trace
file.