IntelliJ IDEA 2017.1 Help

Apply EJB 3.0 Style

EJB Tool Window | context menu of a module with an EJB facet | Apply EJB 3.0 Style


Use this dialog box to bring the beans created according to the EJB 1.x or EJB 2.0 specifications into compliance with the EJB 3.0 specification.

ItemDescription
EnterpriseBeans to apply EJB 3.0 style toThis table shows the list of Objects encountered in the selected module with EJB facet. Use the check boxes in the left column of the table to include or exclude beans from refactoring. If a certain bean has a home interface, use the check box in the Retain Home interfaces column to convert home interfaces, rather than delete them.
Environment AccessSelect the preferred mode of environment access:
  • Prefer resource injection: click this radio-button to force convert all environment access to resource injection.
  • Prefer lookup: click this radio-button to force convert all environment access to context lookup.
  • Leave as is if possible: click this radio-button to leave environment access as is in case it does not interfere with the converted code. If not, IntelliJ IDEA automatically selects the most appropriate method.
Replace JNDI lookup with EJB context lookupIf this check box is selected, the system resources will be retrieved using the EJBContext.lookup(). Otherwise, JNDI environment lookup will be used.
Inline injected fieldsIf this check box is selected, all usages of a context lookup will be replaced with a reference to an an injected field.
Copy metadata from XML descriptorSelect this check box to copy meta information to the ejb-jar.xml file.
Delete copied XML tagsClear this check box to preserve duplicates.
Replace Entity beans with CMP to Persistence Unit Select this check box, if you want to try to convert outdated entity beans to Container Managed Persistence.
RefactorClick this button to perform refactoring, and close the dialog box.
PreviewClick this button to open tentative refactoring results in the dedicated tab of the Find Tool Window, and close the dialog box.

See Also

Last modified: 18 July 2017