Tracking code example.

Tracking Software Components
by Jerry Gao, Ph.D., Eugene Y. Zhu, and Simon Shim, Ph.D.
Listing 4. Tracking code example.


import beantracker.tracker.*;
....            // other import package

public class VbankBean extends Object
    implements SessionBean, ItraceableBean {
.....
       private IBeanTracker tracker;
       private boolean trackerloaded = false;
.....            // other attributes
public boolean Login(String user, String pass) throw RemoteException {
    tracker.tracePerformance("Login", true);
    tracker.traceInterface("Login", user+"&"+pass);
    tracker.traceOperation("Login");
    ....  // function body
    .... try
         { .... }
         catch (Exception e2)
         { System.out.println ("Cannot create Account:"+e2);
                tracker.traceError("Create account fail."); ...
               }
             tracker.tracePerformance("Login", false);
             return true;
    }
}

About the Authors

Jerry Gao, Ph.D. is a full-time faculty member in the Department of Computer Engineering at San Jose University and can be reached at [email protected].

Eugene Zhu works at SCSL USA Inc. and may be reached at [email protected].

Simon Shim, Ph.D. is a full-time faculty member in the Department of Computer Engineering at San Jose University and may be reached at [email protected].