Working with the client interface methods of a bean

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.

About this task

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 Enterprise 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 the same way. However, creating finder methods requires some additional steps.

The EJB label decorators on the methods do 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

Feedback