Order Entry is a sample application that demonstrates the following components and capabilities: Web container, Java Servlet 2.3, Eclipse Preferences, JMS using the microbroker, JDBC, local database, RCP views, and preference pages. On desktop platforms, Managed Datasources (Database Lifecycle) with Apache Derby is used as the local database. On device platforms, DB2® Everyplace® is used as the local database.
Time required: 10 minutes
You can use both the Rich and Web Application views on the desktop runtime, but you can only use the Web Application on the device runtime.
Order Entry illustrates the following scenario:
A delivery employee drives a soda truck to three different customers: SpeedyMarket, Marine Mart, and Quick Stop. As he travels to each of these locations to offload his stock, he determines how many bottles and cans of soda to order for the next week and enters that information into his device. The order is stored in the local database and put on a JMS queue.
In this scenario, the Order Entry client processes input from the user and generates requests to the Order Entry server, which represents an inventory management system. A local database stores the requests and sends the requests through the microbroker (using JMS) to the Order Entry server. When the Order Entry server receives a message, it confirms the order and sends a response to the client. When the response message is received, Order Entry updates the status of the order in the client database.
For purposes of simplicity in this sample, the "server" is another bundle running in the same platform that will accept requests and post responses indicating that the order is confirmed. In a full multi-tier scenario, the server would not be running on the platform, and would instead be replaced by a microbroker bridge configuration allowing transmission of the requests from the client to an enterprise messaging system.
This sample provides both a rich client and a Web application, but uses a common service project for accessing the server.
Parent topic: Samples: XPD621
Order entry setup instructions: XPD621