Working with a bean's client interface methods

When you create an enterprise bean, a set of required methods for the bean is automatically created. You can use the Java™ editor to modify methods.

You can access the Java editor for the bean class from the deployment descriptor editor. You can also edit them by double-clicking the class in the Project Explorer view.

For CMP enterprise beans, you must define all Find methods directly in the home interface and not promote them from the enterprise bean class. Also, note that if you add or remove a home or remote method after generating the deployment code, error symbols will appear beside the enterprise bean and old generated code. You must regenerate the deployment code.

In most cases, you can create all of your home methods in exactly the same way. However, creating finder methods requires some additional steps.

The EJB label decorators on the methods will not display unless you have the EJB Java Method Decorator selected in the Label Decorations preferences page (Window > Preferences > General > Appearance > Label Decorations). This decorator adds a label for each method that is promoted to a client interface. The decorator uses the following labels:
  • R: remote interface
  • H: home
  • LH: local home
  • L: local
Related tasks
Adding methods to the home interface
Promoting methods to an interface
Demoting methods from an interface

Feedback