Refactoring EJB 3.x Java elements
Using workspace refactoring operations, you can quickly and safely rename code artifacts globally across your application. The workspace recognizes EJB 3.x applications and manages changes to relevant annotations and deployment descriptors.
Procedure
- In the Enterprise Explorer view, the Outline view, or the Java™ editor, right-click the field or method you want to rename and select Refactor. From the submenu that follows, select Rename. The Rename Field or Rename Method panel opens.
- Enter the new name for the field or method and click Next.
- Review each change to be performed. If you do not want to make a particular change, clear the box next to the change. Click Finish.
What to do next
Additionally, by selecting
from the context menu of a method, you can move the method to the business interface for the EJB. If a bean class specifies its business interfaces using annotations or the EJB deployment descriptor, you can still specify the business interface as the target of the operation. A operation moves a field or method from one package to another.