246 The XML Files: Develo pment of XML/XSL Applications Using WebS phere Studio
of attributes from a remote entity bean. A program can retrieve the entity bean
attributes from the local copy helper object that resides in the access bean,
which eliminates the need to access the attributes from the remote entity
bean.
򐂰JavaBean Wrapper: This has all the characteristics of both the data class
and the copy helper access beans. However, instead of a single copy helper
object, it contains multiple copy helper objects. Each copy helper object
corresponds to a single Enterprise bean instance.
Now that we have described access beans, we should realize that they improve
performance, because they provide the client a caching mechanism for
accessing homes. Moreover, we can use access beans in servlets and JSPs,
because they simplify coding.
Creating an access bean for the entity bean
To create the access bean for the entity EJB:
1. Close the data perspective, and open the J2EE perspective, and choose the
J2EE Hierarchy.
2. Under the EJB Modul es category, select the CustomerInfo project,
right-click, and select New—>Access Bean.
The wizard for creating the Enterprise bean opens Figure 10-23. To create the
bean do the following:
1. Choose the type of the access bean to be a Data class, which will allow the
EJB to be consumed like a normal JavaBean.