Use the Add an Access Bean wizard
to create a copy helper access bean.
Procedure
- In the Java™ EE perspective,
click . Select and click Next.
- Select Copy helper and click Next.
- In the EJB Project field, make sure
that the correct name of the EJB project appears that contains the
enterprise bean for which you want to create an access bean.
- In the Enterprise Beans table, select
the enterprise bean for which you want to create an access bean, then
click Next.
Note: Enterprise beans
with only a local client view do not appear.
- In the Constructor method field,
make sure that the correct home interface method is selected. The
home interface method that you select is used to instantiate the enterprise
bean when the access bean is instantiated. See the following example
for how each option can be used:
- Select create if you want to use the zero argument constructor
to create a new instance
- Select findByPrimaryKey if you want the zero argument constructor
to find an existing instance
- Select the Attribute helpers for
the access bean.
- Click Finish to generate the new
copy helper access bean.
To identify the enterprise
bean properties that are selectable for the access bean, the wizard
performs introspection of the enterprise bean using the JavaBeans specification rules for detecting
getter and setter accessors. If either the getter or setter method
in the enterprise bean class throws an exception, the property are
not recognized and the wizard does not display it. This is a requirement
of the wizard, not an Enterprise JavaBeans requirement.