Compiling application code for OLT

In order to trace or debug with OLT, you must compile your code with specific OLT parameters.

Compiling Component Broker applications from within Object Builder
Component Broker code must include the IVB_TRACE_DEBUG option. This option sets flags in the makefile, which in turn add tracing and debugging statements to your server DLL. The flags are not set by default because the added statements significantly increase the size of your DLLs. Code compiled with OLT flags will continue to run normally outside of OLT.

CB developers can generate OLT-enabled code by invoking an option in the Object Builder preferences dialog:

  1. From the Object Builder menu bar, select File > Preferences > Tasks and Objects > Makefile generation.
  2. Select either Trace build, or Trace and debug build, then click OK.
  3. From the Object Builder tree view, click the Build Configuration folder with the right mouse button.
  4. From the pop-up menu, select Generate > All > All targets (alternatively, you can specify C++ or Java targets only).

All files generated from the build are written to a corresponding output directory (OUTDIR) according to the build option you selected:

TRACE:  Project directory\Working\platform\TRACE
TRACE DEBUG:  Project directory\Working\platform\TRACE_DEBUG

Compiling Component Broker applications from the command line
To generate a trace build or trace and debug build from the command line, enter one of the following commands from your Object Builder working directory:

obgen -p<project_path> -aAll -t<platform> -OIVB_TRACE
obgen -p<project_path> -aAll -t<platform> -OIVB_TRACE_DEBUG

where:
<platform> is 390, AIX, NT, or SOLARIS

Compiling a single Component Broker business object
If you want to trace and debug only one business object, you can save time by recompiling only that object's makefile. Before doing so, delete the DLL and OBJ files associated with your object (for example, yourobjectS.dll, yourobjectMO_.obj, and yourobjectBO_I.obj on Windows NT, or the equivalent *.o, *.so, and *.a files on AIX ), then recompile the object's make file (yourobjectS.mak) from the appropriate output directory (either TRACE or TRACE DEBUG).

Compiling CB client applications
Depending on the language used, recompile with the following debug options:

C++ applications:

ngwin.gif (1069 bytes) /Ti+ (compile); /DEBUG (link)
ngaix.gif (991 bytes) -g

Java 1.1.x applications:

javac -g

Java 2 platform applications:

javac -g:lines,vars,source

Note: If your client-side code includes transaction timeout values, you must set these values to 0 and recompile before continuing.

Compiling WebSphere servlets or EJBs (Standard or Advanced Edition)
For WebSphere applications intended to run outside of a Component Broker environment, compile with javac -g for Java 1.1.x application. For Java 2 platform applications, use javac -g:lines,vars,source.

The next step is to enable OLT on your application server (this procedure is different depending on whether you are deploying the application in a Component Broker or WebSphere Application Server environment).

ngrelt.gif (466 bytes)
Enabling OLT for Component Broker
Enabling OLT for WebSphere Application Server