The Timer Interceptor example

This directory contains the timer interceptor example.  The timer interceptor example demonstrates how to use Closure class to pass data between interceptors.  The code from the simple Bank example discussed earlier has not been modified, illustrating how the code for the interceptors can easily be added to existing applications.


This example illustrates how to: The timer example shows how to use the org.omg.CORBA.Closure class to pass data between interceptor points.

Directory Contents

Building this example

To build this example, cd .. to the interceptor directory (one level above the current directory) and type make all(vbmake on Windows). You will have to change your current working directory to the interceptor directory to run the timer example.

Compilation Errors and Warnings


You may see the following kind of compilation errors when you compile this example using either JDK1.0.2 or JDK1.1.1: The above error occurs because the javac compiler in JDK1.0.2 and JDK1.1.1 cannot locate packages imported from JAR files. The solution to this problem is to either:

Running the timer interceptor example

To run the example, read the instructions at the interceptor directory.

Here is the sample output from the server

Installing Timer Interceptors
AccountManager object is ready.
locate: 40 ms
balance: (process time) - 70 ms
balance: (prepare response) - 0 ms
balance: (send time) - 0 ms
balance: (total call) - 70 ms

Here is the sample output from the client

Installing Timer Interceptors
bind: 2 s, 503 ms
balance: (prepare time) - 70 ms
balance: (send time) - 0 ms
balance: (receive time) - 390 ms
balance: (total call) - 460 ms

The balance in Jack B. Quick's account is $94.89.


Return to the Interceptor Examples Page.