Running H/F 1 439
Figure 8-175 Show all inherited members of WithdrawalClientOperation hierarchy
440 IBM Branch Transformation Toolkit 5.1 Migration and Usage Guidelines
c. From the list of inherited members, right-click the execute method of
DSEClientOperation and select Override in
‘WithdrawalClientOperation’, as shown in Figure 8-176.
Figure 8-176 Override execute method in WithdrawalClientOperation
11.Write the WithdrawalClientOperation.execute() method, by performing the
following tasks:
a. Get the service named CSClient. This gets the client instance of
client/server service from the operation's context hierarchy.
b. Cast this service to CSClientService.
c. Use the service to invoke the synchronous sendAndWait(ClientOperation,
long) method. The first parameter is the client operation, "this". The
second parameter is a time-out in milliseconds. An appropriate value can
be 60000, or 60 seconds.
Running H/F 1 441
The entire WithdrawalClientOperation.java is shown in Example 8-37.
Example 8-37 WithdrawalClientOperation.java
/*
* Created on 2005-12-6
*
* To change the template for this generated file go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
package btt.bank.client.appl;
import com.ibm.dse.base.*;
import com.ibm.dse.clientserver.*;
import com.ibm.dse.cs.servlet.*;
import com.ibm.dse.base.DSEClientOperation;
/**
* @author add
*
* To change the template for this generated type comment go to
* Window>Preferences>Java>Code Generation>Code and Comments
*/
public class WithdrawalClientOperation extends DSEClientOperation {
/* (non-Javadoc)
* @see com.ibm.dse.base.Operation#execute()
*/
public void execute() throws Exception {
// TODO Auto-generated method stub
super.execute();
((CSClientService)getService("CSClient")).sendAndWait(this,6000);
}
}
12.Save and close WithdrawalClientOperation.java.
13.Create a new class named StartupClientOp extending
com.ibm.dse.base.DSEClientOperation in the package btt.bank.client.appl.
As described in Step 8, override the execute method of DSEClientOperation
in StartupClientop. Import the com.ibm.dse.base.* package and the
com.ibm.dse.clientserver.* package. Implement the execute method of
StartupClientOp as shown in Example 8-38.
Example 8-38 Execute method of StartupClientOp
public void execute() throws Exception {
CSClientService csClientService=null;
setValueAt("TID",Settings.getTID());//$NON-NLS-1$

Get IBM Branch Transformation Toolkit 5.1 Migration and Usage Guidelines now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.