IntelliJ IDEA 13.1.0 Web Help

Some features described here are available in Ultimate edition only.

Local and remote interfaces are used to provide access to the bean from the calling clients, and are defined for the following types of beans:

  • Entity Beans, both CMP and BMP versions 1.x and 2.x
  • Session Beans versions prior to 3.0

IntelliJ IDEA provides the following ways to create local and remote interfaces:

  • 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 define local and remote interfaces of an enterprise bean using the editor
  1. Open the deployment descriptor file ejb-jar.xml for editing.
  2. In the <entity> section, create tag <local>, or <remote> and type the name of the desired interface. Note that you can specify the target package in this tag, for example, samples.ejb.ManuallyCreatedEntityLocalInterface, using code completion after each dot.
  3. If the declared class does not yet exist, IntelliJ IDEA suggests a quick fix. 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.
To configure local and remote interfaces
  1. Open the New Bean dialog box.
  2. If you need to configure remote client view of a bean, select the Remote Interface check box.
    • In the Home field specify the name for the bean remote home interface.
    • In the Remote field specify the name for the bean remote interface.
  3. If you need to configure local client view of a bean, select the Local Interface check box.
    • In the Home field specify the name for the bean local home interface.
    • In the Remote field specify the name for the bean local interface.

See Also

Concepts:

Reference:

Web Resources: