Editing EJB access beans

Use the Edit an Access Bean wizard to change existing access beans.

To edit an access bean:

  1. In the Project Explorer view, right-click the EJB project that contains the enterprise bean for which you want to edit an access bean.

  2. From the pop-up menu, select Access Beans > Edit Access Beans. The Edit an Access Bean wizard opens.

  3. In the Enterprise Bean field, make sure that the correct name of the enterprise bean appears for which you want to edit an access bean, then click Next.

  4. In the Access Bean field, select the access bean that you want to edit, then click Next.

  5. Choose from one of the following three steps:

    • If you are editing a data class access bean, a wizard page is opened that allows you to change enterprise bean properties. Ensure that the checkbox is selected for each enterprise bean property for which you would like to have copy helper support, then click Finish to immediately update the data class access bean. (To identify the enterprise bean properties that are selectable for the data class access bean, the wizard performs introspection of the enterprise bean using the EJB 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 will not be recognized and the wizard will not display it. This is a WebSphere Studio requirement rather than an EJB specification requirement.)

    • If you are editing a Java bean wrapper access bean, a wizard page is opened that allows you to specify a home interface method to correspond to the zero argument constructor of the access bean. (For instance, if you want to use the zero argument constructor to create a new instance, you should select a create method, but if you want the zero argument constructor to find an existing instance, you should select a findByPrimaryKey method. The home interface method that you select is used to instantiate the enterprise bean when the access bean is instantiated.) In the Constructor method field, ensure that the correct home interface method is selected and then click Finish to immediately update the Java bean wrapper.

    • If you are editing a copy helper access bean, a wizard page is opened that allows you to specify a home interface method to correspond to the zero argument constructor of the access bean. (For instance, if you want to use the zero argument constructor to create a new instance, you should select a create method, but if you want the zero argument constructor to find an existing instance, then should select a findByPrimaryKey method. The home interface method that you select is used to instantiate the enterprise bean when the access bean is instantiated.) In the Constructor method field, ensure that the correct home interface method is selected and then click Next. A wizard page is opened that allows you to choose enterprise bean properties for which you want copy helper support.

  6. Make sure that the check box is selected for each enterprise bean property for which you would like to have copy helper support, then click Finish to update the copy helper access bean.

 

Parent topic

Creating EJB access beans