Chapter 10. Development of XML-bas ed Enterprise applications 245
Figure 10-22 Database connection definition
Access beans
Access beans are Java components that adhere to the JavaBeans specification,
and are meant to simplify the development of EJB clients. An access bean
adapts an Enterprise bean to the Javanese 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. Access beans make it possible to use an Enterprise bean in
much the same way that a JavaBean is used.
There are three types of access beans, which are listed in ascending order of
complexity:
򐂰Data class: The simplest to use. It is designed to allow the Enterprise bean to
be used like a standard JavaBean, and it hides the Enterprise bean home and
remote interfaces from the developer.
򐂰Copy helper: This has all the characteristics of the data class access bean,
but it also incorporates a single copy helper object that maintains a local copy