Configuring EJB Deployment Descriptors

See Also

Deployment descriptors are XML-based text files whose elements describe how to assemble and deploy a module to a specific environment. The elements also contain behavioral information about components not included directly in code.

If you are developing enterprise beans on the Java EE 5 platform and deploying to a Java EE 5 compliant application server, you develop enterprise beans using EJB 3.0 technology. If you are developing enterprise beans on the Java EE 6 platform and deploying to a Java EE 6 compliant application server, you develop enterprise beans using EJB 3.1 technology. EJB 3.0 and EJB 3.1 technology support the use of annotations in your code to describe behavior that was described using deployment descriptors in EJB 2.1 technology. As a result, deployment descriptors files are no longer required when deploying to a Java EE 6 compliant server. EJB 3.0 and EJB 3.1 technology also support the use of deployment descriptors. You may need to use a combination of annotations and deployment descriptors in your project when you configure your project, for example to configure security settings.

For EJB modules, there are two types of deployment descriptors:

To edit ejb-jar.xml:

  1. In the Projects window, expand the Configuration Files node for your EJB module project.
  2. Double-click ejb-jar.xml to open the file in the visual editor.
  3. Select one of the following tabs:
  4. Edit the properties.
  5. Save your changes.

To edit glassfish-ejb-jar.xml:

  1. In the Projects window, expand the Configuration Files node for your EJB module project.
  2. Double-click glassfish-ejb-jar.xml to open the file in the visual editor.
  3. Select a tab at the top of the editor. See the following topic for more information about the editor tabs:
  4. Edit the descriptor file as necessary and save your changes.

To edit the server-specific deployment descriptor for any other application server:

  1. Double-click the deployment descriptor node in the Projects window.
    The IDE opens the XML source of the deployment descriptor in the Source Editor.
See Also
About Deployment Descriptors
About Configuring EJB Modules
Configuring Web Application Deployment Descriptors
Managing Container-Managed Relationships
Verifying an Enterprise Application
Refactoring an Enterprise Bean

Legal Notices