432 IBM Branch Transformation Toolkit 5.1 Migration and Usage Guidelines
This section shows how to create a view for the withdrawal operation and how
the operation and view are related. It also details the creation of an invoker to
implement the BeanInvokerForJavaRequest interface to invoke the Single Action
EJB (SAE) created in 8.3, “Developing an application using Branch
Transformation Toolkit” on page 248.
8.4.1 Rich Java client overview
Section 8.3.7, “Creating a Single Action EJB” on page 307, discussed client
operation, invoker, and server SAE strategy. The client operation formated data
and sent the context ID to the bean invoker, after which the invoker invoked a
constant Single Action EJB to process the withdrawal action, and sent the reply
data to the invoker. The invoker then sent the reply data to the client operation to
display it in the Java client view.
You saw in 8.3, “Developing an application using Branch Transformation Toolkit”
on page 248 a Single Action EJB named WithdrawalServerOp being built. Now,
you have to only build the following components:
򐂰 Client operation
򐂰 Bean invoker for Java request
򐂰 Java client view using a DSE VisualBean
The architecture is shown in Figure 8-167.
Figure 8-167 Architecture of our application
Client/Server Mechanism
Bean Invoker Pattern
BeanInvokerRegistry
ResourceBundle
BeanInvokerFactory
BeanInvoker
Java Request
Handler
Java
Presentation
Handler
HTTP
HTTP
EJB EJB
EJB EJB
Single Action
EJB
Java Client
(BTT V4.x)
Event
Manager
BTT V4.3
Event
Manager
JMS
Running H/F 1 433
In this sample application:
1. The Java Client is launched and data is gathered from the Java Client. On
clicking OK, the view launches the client operation defined in the DSE
Operation properties of the View panel.
2. The client operation then sends the operation data to the server in
serverOperation properties in the ClientOperation Externalize file
dseoper.xml.
3. In the server, based on the definitions in
com.ibm.btt.cs.invoker.base.BeanInvokerRegistryMapper.properties, use the
key identified by the client operation's serverOperation attribute to find the
corresponding property file and then instantiate the invoker defined in the
property file.
4. In the server, use the parseRequestData(String requestData) method in the
invoker to unformat the request data on to the SAE, which should have the
corresponding method to get the request data.
5. Run the invoker to execute the SAE.
6. In the server, use the processRespondData(Object ejbResult) method in the
invoker to format the reply data.
7. In the client, use the format identified by csReplyFormat to unformat the reply
data on to the client operation contex, and then fire an
OperationRepliedEvent.
8. When the event is fired, the operation panel refreshes the components inside
the panel with the operation context.
Figure 8-168 shows the steps discussed.
Figure 8-168 The application’s architecture
SystemData
•sessionID
subSessionId
InstanceId
Client Operation
Bean Invoker
Context
Client/Server
communication
Bean Invoker
Single Action EJB
•CHA
csRequestFormat
csReplyFormat
Java Client View
DSE_operationName

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.