IntelliJ IDEA 13.1 Web Help

Some features described here are available in Ultimate edition only.

IntelliJ IDEA provides the following ways to create beans:

  • Manually, by means of direct editing the ejb-jar.xml file, using the extensive coding assistance provided by IntelliJ IDEA.
  • Using the context menu commands.
To create an enterprise Java bean using the editor
  1. Open the deployment descriptor file ejb-jar.xml for editing.
  2. Create the <enterprise-beans> section.
  3. In this section, create tags for the desired bean types: <session>, <entity>, or <message-driven >
  4. Specify the bean name and class by adding tags <ejb-name>. and <ejb-class>. Note that you can specify the target package in this tag, for example, samples.ejb.ManuallyCreatedEntity, using code completion after each dot.
  5. If the declared class does not yet exist, IntelliJ IDEA suggests a quick fix:

    createEjb1.png

    Choose Create Class <class name> from the suggestion list. If the target package was not defined in the <ejb-class> tag, select the desired package in the Choose Destination Directory dialog box. The stub class is created in the specified location.

  6. Proceed with defining the other bean components.
To create an enterprise Java bean, follow these general steps
  1. Open the EJB tool window.
  2. Right-click the desired module, choose New on the context menu, and then select the bean type on the submenu.

    The New <bean type> Bean dialog box opens.

    Tip

    Alternatively, choose Jump to Source on the context menu of a module, to open the dedicated editor, in the General tab click New, or right-click the diagram background in the EJB Relationships tab, and select the desired bean type.

  3. Specify the bean name, class and package.
  4. Define the bean-specific settings:

See Also

Concepts:

Procedures:

Reference:

External Links:

Web Resources: