A sample implementation of bindBeanTracker.

Tracking Software Components
by Jerry Gao, Ph.D., Eugene Y. Zhu, and Simon Shim, Ph.D.
Listing 3. A sample implementation of bindBeanTracker.


public void bindBeanTracer ( )   {
    / / the following code obtain the tracker
    Properties env = System.getProperties () ;

    try   {
        / / get the name of the tracking agent class
        String AgentClassName =
env.getProperty ( "TrackingAgentName") ;
        / / initiate the tracking agent class
        Class AgentClass = Class.forName
                (AgentClassName) ;
        / / obtain the static method "get TRAagent"
        Method AgentMethod =
AgentClass.get Method ("get TRAagent", null) ;
        / / obtain the reference to the tracking agent
        ITRAgent tr Agent = (ITRAgent)
            AgentMethod.invoke (null, null) ;
        / / request the agent to create and return the tracker
        tracker = trAgent.createTracker ("VBankBean");
    }
    catch  (Exception e)
    {
        / / bind the default adapter to the tracker
        tracker = new beanTrackerAdapter ( ) ;
    }
}

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].