In order to understand how these components interact with each other, have a deep look at 10.2, “Solution outline for customer registration sample” on page 217.

10.2 Solution outline for customer registration sample

An overview of the sample application can be found in Chapter 8. This section discusses the interaction between solution components, before we progress to building the application. There are two possible ways of interaction between the components of the system. This difference in interaction is based on the target functionality. We focus on the set of interactions for storing data, then we discuss the set of interactions for retrieving customer information.

Customer registration

When registering, the user enters the necessary registration data in the form provided by the HTML in the client layer. When the user clicks the Submit button, a series of interactions between system components take place, as indicated in Figure 10-2 on page 218, and in the following steps:

1.The HTML sends the customer registration data through the HTTP request to the servlet, invoking the servlet doPost method.

2.The servlet extracts the data from the request, and creates a new CustomerXML object. Now the servlet invokes the create method in the CustomerXML object.

3.The CustomerXML object’s create method, instantiates a new CustomerFactory, and invokes its create method having the customer registration data.

4.The factory creates a customer entity bean with the customer’s registration information.

5.The entity bean’s data is saved into the customer table in the database.

6.The customer entity bean is returned to the CustomerXML.

7.The CustomerXML executes its produceDOMDocument method, which converts the Customer entity bean into XML data.

8.The XSLServlet applies the Customer Result XSL on the generated XML data, by invoking the XSLT Processor.

9.The XSLT Processor applies the stylesheet on the XML data, generating an HTML representation for the customer registration data.

Chapter 10. Development of XML-based Enterprise applications 217

Page 233
Image 233
IBM Version 5 manual Solution outline for customer registration sample, Customer registration