If you want to use the advantages of EJB 3.0 specification, you can migrate your existing beans of the various types from EJB 1.x or 2.0 to EJB 3.0. IntelliJ IDEA suggests the Apply EJB 3.0 Style refactoring that brings the structure of the beans into compliance with the requirements of EJB 3.0 specification.
- Open the EJB tool window.
- Select the desired module, or bean, to be migrated, and choose on the context menu.
- In the Apply EJB 3.0 Style dialog box displaying the list of all items within
the module, select the ones to be migrated:
If you want to convert home interfaces rather than remove them, select the Retain Home INterfaces check box, where applicable.
- Configure the environment access and XML descriptor options. Refer to the Apply EJB 3.0 Style dialog for the detailed description of options.
- Though you can click Refactor and perform migration straight away, it is recommended to click Preview first, and explore the tentative migration results in the Find Tool Window.
- In the Find tool window, click Do Refactor.