Follow these steps to add a business method to an entity or session bean:
- Make sure that the EJB is displayed in Design View.
- Right-click the right-hand area of the bean, and choose Add Component
Method. A new component method appears.
- Enter the correct method name and signature.
- Right-click the arrow to the left of the method name to change the visibility.
You can define a bean's business method in the local interface, the remote
interface, or both.
Notice that for entity beans, by default a business
method is defined in the local interface. For session beans,
a business
method
is defined by default in the remote interface.
- Click the method name to go to Source View, and implement the business
logic.
Related Topics
How Do I: Test an Enterprise JavaBean?
How Do I: Use an Enterprise JavaBean
in a Web Application?
Developing Enterprise JavaBeans