Creating copy helper access beans

Use the Add an Access Bean wizard to create a copy helper access bean.

Procedure

  1. In the Java™ EE perspective, click File > New > Other. Select EJB > Access Bean and click Next.
  2. Select Copy helper and click Next.
  3. 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.
  4. 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.
  5. 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
  6. Select the Attribute helpers for the access bean.
  7. 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.


Feedback