Sample Interceptor Example

This directory contains the sample interceptor example.  The sample interceptor example adds basic tracing to the Bank example through the interceptor API.  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:

Directory Contents

Building this example

cd .. to the interceptor directory (one level above) and type make all (vbmake on Windows) in the interceptor directory and not the current directory.

Compilation Errors and Warnings


You may see the following kind of compilation errors when you compile this example from the interceptor directory 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 sample interceptor example

To run the example, read the instructions at the interceptor directory. You will have to switch your current working to the directory to the interceptor directory before running the sample interceptor example.

Here is the sample output from the server

Installing Sample Interceptors
BindINT: bind
BindINT: exception_occurred
AccountManager object is ready.
ServINT: locate
ServINT: locate_forwarded
ServINT: receive_request
ServINT: prepare_reply
ServINT: send_reply
ServINT: request_completed
ServINT: shutdown

Here is the sample output from the client

Installing Sample Interceptors
BindINT: bind
BindINT: bind_succeeded
ClntINT: prepare_request
ClntINT: send_request
ClntINT: send_request_succeeded
ClntINT: receive_reply
The balance in Jack B. Quick's account is $6.27.



Return to the Interceptor Examples Page.