￿The wizard only creates a schema file that can be run against the database to create the table and its attributes. However, this may need to be fine-tuned for the application.

An Access bean can also be used. This is created through the Access Bean wizard. An access bean adapts an Enterprise bean to the Java programming model, by hiding the home and remote interfaces from the developer. They provide fast access to Enterprise beans by letting the developer maintain a local cache of Enterprise bean attributes. This wizard also incorporates in JNDI bindings.

The two components are then integrated by customizing the generated Java class and the servlet.

The Java class is modified to reference the EJB. A ‘create’ method is developed to use the EJB’s factory’s ‘create’ method. The servlet is modified to use Java Server Pages (JSP), the HTML forms developed previously being abandoned. The JSPs are generated through the JSP wizard. The servlet’s doGet and doPost methods are modified to interact with the EJB. The doPost is changed to store information while the doGet method is altered to retrieve data from the database given the membership number.

The EJB deployed code is generated through an option, and finally the two projects are tested.

176 The XML Files: Development of XML/XSL Applications Using WebSphere Studio

Page 192
Image 192
IBM Version 5 manual