176 The XML Files: Develo pment of XML/XSL Applications Using WebS phere Studio
򐂰The wizard only creates a schema file that can be run against the datab ase 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 d eveloper 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 EJBs factorys 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 servlets 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.