Component Broker Object Level Trace
examples
Object Level Trace (OLT) is an extension of the IBM Distributed Debugger that enables
you to trace and debug multilingual, distributed applications from a single workstation.
The following scenarios use the Policy sample to illustrate some common OLT tasks for
Component Broker applications:
The OLT samples in this section use the Policy sample application that is shipped with
the product. You may need to reference the Policy sample's documentation (policy.html,
policyc++.html, and javaclient.html) that is in the sample directory, as follows:
x:\CBroker\samples\InstallVerification\ProgrammingModel\Docs
/usr/lpp/CBToolkit/samples/InstallVerification/ProgrammingModel/Docs
/opt/IBMCBToolKit/samples/InstallVerification/ProgrammingModel/Docs
Preparing to use OLT on Windows NT/2000
To use these sample scenarios for Windows NT/2000, ensure that you have the Component Broker
run time, C++ Client SDK, Java Client SDK, Server SDK, CBToolkit, and toolkit samples
installed on your system. The samples have both C++ and Java clients and Business Objects.
A C++ client will interact with a C++ and a Java Business Object and, similarly for the
Java client. Complete these steps to get ready to run these samples:
- Generate code.
From a command prompt, change to your working directory and generate code for debugging,
as follows:cd x:\CBroker\samples\InstallVerification\ProgrammingModel
obgen -pBusinessObjects\Policy -aAll -OIVB_TRACE_DEBUG
- Build server business objects.
To build the C++ and Java Policy server application, change to generated code's
directory and run nmake, as follows: cd x:\CBroker\samples\InstallVerification\ProgrammingModel
cd BusinessObjects\Policy\Working\NT\TRACE_DEBUG
nmake -f all.mak all
- Build C++ client application.
To build the C++ client application, follow the instructions in policyc++.html. Make sure
that you are copying files from the TRACE_DEBUG subdirectory and not the PRODUCTION
subdirectory. Note that you will need to compile/link with these debug options:/Ti+
when compiling
/DEBUG when linking
For example, modify PolicyApp.mak as follows:
.
.
.
.\PolicyApp.obj: \
.\PolicyApp.cpp
@echo " Compile "
icc.exe /Fo".\%|fF.obj" /Ti+ /I $(POLICYINCLUDEDIR) /C .\PolicyApp.cpp
.\PolicyApp.exe: \
.\PolicyApp.obj
@echo " Link "
icc.exe @<<
/B" /de /DEBUG"
/FePolicyApp.exe
.\PolicyApp.obj
$(POLICYLIBDIR)\PolicyC.lib
.
.
.
- Build Java client application.
To build the Java client application, edit the makefile for PolicyApp client to change the
POLICY_DIR setting so that "PRODUCTION" is replaced by "TRACE_DEBUG".
Then to build the Java client application, follow the instructions in javaclient.html.
Also, when compiling, add the -g option before -classpath in the
javac command. Depending on the Java version, use the -g option
as follows: Java applications:
javac -g
- Install application.
Follow the instructions in Install the Policy application using System
Manager.
Preparing to use OLT on AIX
To use these sample scenarios for AIX, ensure that you have the Component Broker run time,
C++ client SDK, Server SDK, CBToolkit, and toolkit samples installed on your system. The
AIX OLT sample works with a C++ client and a C++ business object running on a single AIX system.
Complete these steps to get ready to run the sample:
- Set up .profile.
Before using OLT for Component Broker on AIX, be sure to add the following to your
.profile: If you did a full Component Broker install:
# Start the OLT login profile
if [ -f /usr/idebug/bin/OLT.profile ]; then
. /usr/idebug/bin/OLT.profile
fi
- Generate code.
Generate code for debugging and tracing, as follows:From a command prompt, copy samples
to your working directory /home/cbuser/samples, and run obgen:
cd /home/cbuser/samples/InstallVerification/ProgrammingModel
obgen -pBusinessObjects/Policy -aAll -OIVB_TRACE_DEBUG
- Build C++ business objects.
Change to generated code's directory and build the C++ server application: cd /home/cbuser/samples/InstallVerification/ProgrammingModel
cd BusinessObjects/Policy/Working/AIX/TRACE_DEBUG
make -f all.mak
- Build C++ client application.
To build the C++ client application, follow the instructions in policyc++.html. When
copying files, make sure that you are copying the files from the TRACE_DEBUG subdirectory
and not the PRODUCTION subdirectory. Note that you will need to compile with the -g
debug option. For example, you can modify the PolicyApp.mak file to add the -g
option in the following line:.cpp.o:
$(CCC) -g -c -o$@ $(CC_FLAGS) $<
- Install application.
Follow the instructions in Install the Policy application using System
Manager.
Preparing to use OLT on Solaris
To use these sample scenarios for Solaris, ensure that you have the Component Broker run
time and C++ Client SDK, Server SDK, installed on your Solaris system. You will also use
CBToolkit and toolkit samples from a Windows NT/2000 system to generate the code for the
Solaris system. The Solaris OLT sample works with a C++ client and a C++ business object running on a
single Solaris system and the OLT server, viewer, client controller and debugger user
interface are running on a Windows NT/2000 system. Complete the following steps to prepare to
run the OLT sample on your Solaris system:
- Set up .profile.
Before using OLT for Component Broker on Solaris, be sure to add the following to your
.profile: If you did a full Component Broker install:
# Start the OLT login profile
if [ -f /opt/WebSphere/AppServer/bin/OLT.profile ]; then
. /opt/WebSphere/AppServer/bin/OLT.profile
fi
If you installed only the SDK:
# Start the OLT SDK login profile
if [ -f /opt/WebSphere/AppServer/bin/OLT_SDK.profile ]; then
. /opt/WebSphere/AppServer/bin/OLT_SDK.profile
fi
- Generate code on Windows NT/2000 system.
Generate code for debugging and tracing on a Windows NT/2000 system, as follows:
From a
command prompt on a Windows NT/2000 system, change to your working directory and generate code
for debugging, as follows:
cd x:\CBroker\samples\InstallVerification\ProgrammingModel
obgen -pBusinessObjects\Policy -aAll -tSolaris -OIVB_TRACE_DEBUG
The code will be generated into a Solaris subdirectory.
- Copy generated code to the Solaris system.
Copy the generated code from the following directories on the Windows NT/2000 system:
- x:\CBroker\samples\InstallVerification\ProgrammingModel
\BusinessObjects\Policy\Working\Solaris
- x:\CBroker\samples\InstallVerification\ProgrammingModel
\BusinessObjects\Policy\Working\Solaris\TRACE_DEBUG
to the Solaris system in the following corresponding subdirectories:
- /home/cbuser/samples/Policy/Working/Solaris
- /home/cbuser/samples/Policy/Working/Solaris/TRACE_DEBUG
- Build C++ business objects.
Build the C++ server application: cd /home/cbuser/samples/Policy/Working/Solaris
make -f all.mak
- Build C++ client application.
To build the C++ client application, follow the build instructions in policyc++.html. Note
that you will need edit the PolicyApp.mak file to compile with the -g debug
option.
- Install application.
Follow the instructions in Install the Policy application using System
Manager.
Preparing to use OLT Samples on OS/390
To use these sample scenarios for OS/390, ensure that you have the Component Broker run
time and C++ Client SDK, Server SDK, installed on your OS/390 system. You will also need
to use CBToolkit and toolkit samples from either a Windows NT/2000 or AIX system to generate
the code for the OS/390 system. The OS/390 OLT sample works with a C++ client and a C++ business object
running on a single OS/390 system and the OLT server and viewer monitors the events on an
AIX system. Complete the steps described in Tracing and
debugging a C++ client and business object on OS/390 to prepare and run the OS/390 OLT sample.
Install the sample application
After successfully building the Policy sample, run the System Manager user interface to
install the application by following these steps:
- Create server.
Create a Server Group and Server in the Sample Configuration using the System Manager
wizards, as follows:
- Select Wizards > Create servers.
- Click Next to accept the defaults on the first two pages.
- On the Server group page, type a server group name. For this exercise,
use myservergroup.
- Click Next.
- On the Server page, type a server name. For this exercise, use myserver.
- Click Finish.
- Load application.
Define the sample application to System Manager. Load the application definition on your
Host Image as follows:
- In System Manager, select View > View level > Control.
- Expand Host images.
- Select a host image. There is a default image that corresponds to the name of the system
on which the Server with System Manager configuration was installed.
- Open the pop-up menu, and select Load application.
- Browse and select PolicyFamily.ddl when running the C++ business object
samples. If you are running the sample for the Java business object, select JPolicyFamily.ddl.
Make sure that you are selecting the ddl from the TRACE_DEBUG subdirectory.
- Click OK. The Action Console window indicates when the application
has been successfully loaded.
- Close the Action Console window.
- Configure application server.
Configure the application server using System Manager wizards, as follows:
- Select Wizards > Configure server.
- On the Select applications to configure page, select Policy,
JPolicy, and idb2IMServices then click Add.
(JPolicy, and idb2IMServices are required for the Java
business object sample.)
- In the Management Zone page, Select Sample Application Zone.
- Click Next to accept the defaults on the next page.
- On the Select server to configure applications on page, select myservergroup,
then click Add.
- Click Finish.
- Enable remote tracing and debugging.
To enable remote tracing and debugging, follow these steps:
- Expand Host Images folder and expand the host image that corresponds to
the name of your server.
- Select myservergroup. From its pop-up menu, select Properties.
A notebook opens.
- Select the Main tab.
- Check the Enable debug box.

For AIX and
Solaris servers only, do the following:
- Open the Host images folder and expand the host image that corresponds
to the name of your server. From the pop-up menu, select Properties. A
notebook opens.
- Select the Main tab
- Change the Health monitor polling interval value to 0
(or a value that cannot be easily reached when using the debugger, such as 300 seconds).
- Click OK to close the host image notebook.
- Select the ORB tab.
- Change the Request timeout value to 0 (or a value that
cannot easily be reached when using the debugger, such as 300 seconds).
- Click OK to close the server image notebook.
- For all the sample scenarios, the client application resides on the same host
as the application server. Follow these steps to enable debugging for the client:
- Expand Host Images > Client Style Images and select the host name
that corresponds to the machine where your client application resides.
- From the client style image's pop-up menu, select Properties. A
notebook opens.
- On the Main tab, check the Enable debug box.
- Enter the fully qualified name or TCP/IP address of the machine running your OLT server
in the OLT hostname field. For the Solaris sample, make sure that you
have the Windows NT/2000 machine identified in this OLT hostname entry.
- Enter the port where the OLT server listens for connecting OLT clients in the OLT
port field. Unless 2102 is being used, you can leave this setting as it is and
skip step j.
- Select the ORB tab.
- Change the request timeout value to 0 (or a value that cannot be easily
reached when using the debugger, such as 300 seconds).
- Click OK to close the client image notebook.
- Skip this step if you did not change the default 2102 OLT port setting
in the last step.
- In the OLT viewer window, select File > Preferences.
- Select OLT from the tree in the Browser Preferences
window.
- In the OLT Server TCP/IP port field, enter the new port number.
- Click OK.
- Close OLT and restart it.
- To activate your configuration, follow these steps:
- Expand Management zones > Sample cell and workgroup zone > Configuration,
and select Sample configuration.
- Click Sample configuration with the right mouse button, and from the
pop-up menu, select Activate.
- Monitor the Action Console window for a completion status.
You are now ready to trace and debug the Policy sample using one of the OLT scenarios.

OLT Overview