Defining Operations for EJBs

You can create the following types of operations for an EJB from the property sheet of the Bean class or EJB interfaces:

Note: You cannot create an operation from the Operations page of the component property sheet as this page is only used to view the operations of the EJB component. You view operations of an EJB from the Operations page in the component property sheet

Stereotypes

The following standard stereotypes, as defined for EJBs, are assigned to these operations:

  • <<EJBCreateMethod>>

  • <<EJBFinderMethod>>

  • <<EJBSelectMethod>>

CMP Entity Beans

You can create the following operations for CMP Entity Beans only:

  • EJB Create(...) Method (local)

  • EJB Create(...) Method (remote)

When you create an EJB Create(...) Method (local), the method is created in the local home interface with all the persistent attributes as parameters. When you create an EJB Create(...) Method (remote), the method is created in the remote home interface with all the persistent attributes as parameters.

Moreover, all linked methods ejbCreate(...) and ejbPostCreate(...) are created automatically in the Bean class with all the persistent attributes as parameters. Parameters are synchronized whenever a change is applied.

Note: If you need to modify the methods of an interface, you can do so from the Operations page of the interface property sheet.