38 WCTME: Application Development and Case Study
The actual updates are defined on the server and applied to the client devices
based on the server side definitions.
See Figure 2-4 on page 27 for how to configure the DMS server settings that the
client uses.
2.3.1 Using the demonstration application with multiple devices
Here we answer some questions about using multiple devices:
򐂰 Why does the second device not see the status changes from first device?
If multiple devices on multiple buses are used, the drivers on the other buses
will not see status changes made with your device, unless they regularly
perform syncs. Keep in mind the time delay of syncs and mirror databases
being updated with the real databases.
򐂰 Why doesn't the second device receive MQe messages regarding the
location of customers’ vehicles?
Assuming multiple syncs are performed, other devices running the application
will show customers who have arrived on other buses. The application is not
designed to send MQe message to devices other than the requesting device.
As a result, the second device will not receive the MQe messages from the
server with the location of the customer's vehicle. It will continue to show a "?"
for the location, until that customer is marked as "exited" and the data is sync
again.
Exercise for the adventurous
Add a bus arrived status column to the database table and then update the
application logic to only display arrived customers on your bus. The application
will have to be synced more often for this data to be available to other client
applications running against the same database.
2.4 Building the sample application
To implement our design for the ITSO Rentals sample application, we will create
several custom application bundles.
Each bundle will encapsulate some of the functionality (and technology) behind
the sample application. Separately each bundle will expose an interface or
service that can be used by another bundle. A test bundle will be created to test
each bundle (or combination of bundles) as we assemble the desired
functionality. Together all the bundles, minus the test bundle, are our completed
sample application.
Chapter 2. The Case Study: ITSO Car Rentals 39
Figure 2-8 The sample applications bundles
As shown in Figure 2-8, the sample application illustrated in this redbook has the
following components:
1. The customer bundle will define our ITSO Rentals customer, the person who
boards the bus, and the contract behind that person's rental reservation. See
Chapter 3, “Service Management Framework Runtime” on page 41.
2. A test bundle will also be created in Chapter 3, “Service Management
Framework Runtime” on page 41 and then updated in Chapter 4, “Database”
on page 83, Chapter 5, “Messaging” on page 109 and Chapter 6, “Web
Services” on page 155 to perform some simple testing of the bundles before
being combined together with the servlet.
3. The database bundle will hide all the details of DB2e and expose methods for
retrieving and updating of locally persisted data. See Chapter 4, “Database”
on page 83.
Server
Side
Customer
Bundle
ITSO Rentals
Web Application
Servlet
Tester Bundle
MQe
Bundle
Web
Service
Client
Bundle
Device
Manager
Bundle
Local Web
Service
Bundle
Database
Bundle
Database
Sync
Web
Service
Server
Device
Manager
Server
DB2
Server
MQe
Server
Client
Side
4
6 2
3 51
7
5
10
8 9
10
7
40 WCTME: Application Development and Case Study
4. The messaging bundle will hide all the details of MQe and the sending and
receiving of messages. See Chapter 5, “Messaging” on page 109.
5. The flight status information bundles will hide all details of the web services
used to gather that information. See Chapter 6, “Web Services” on page 155.
6. The Web application bundle will manage our servlet and its jsp files and call
the above bundles to retrieve and update data, send and receive messages
and display up to date flight information. See Chapter 7, “HTTP services,
servlets and Java server pages” on page 183.
7. The DB2 server and database synchronization will be covered in Chapter 10,
“DB2e synchronization” on page 271.
8. Our MQe Server will be covered in Chapter 5, “Messaging” on page 109.
9. A example Web Services server is covered in Appendix C, “Sample
server-side Web Service” on page 375.
10.Finally we will add a bundle that will allow a device management agent to
request and process any pending updates for our sample application. See
Chapter 11, “Device management” on page 317.
Now that you have seen the overall picture of the business overview, design
considerations, data flow and technologies used, the following chapters delve
into the implementation of each and show how this is all put together.

Get IBM Workplace Client Technology Micro Edition Version 5.7.1: Application Development and Case Study 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.