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.
For EJB modules, there are two types of deployment descriptors:
- The general J2EE deployment descriptor that configures deployment settings
on any J2EE-compliant implementation. The general EJB deployment descriptor
is called ejb-jar.xml. The IDE provides a graphical editor for the
general deployment descriptor and automatically updates it when you edit your
code.
- The server-specific deployment descriptor that configures deployment settings
for the application server to which you are deploying. For the Sun Java System
Application Server, the IDE provides a graphical deployment descriptor editor
and automatically updates the deployment descriptor as you edit your files.
For all other application servers, you have to write the server-specific deployment
descriptors yourself.
To edit ejb-jar.xml:
- In the Projects window, expand the Configuration Files node for your EJB
module project.
- Double-click ejb-jar.xml to open it in the graphical editor.
The graphical editor opens in a Source Editor tab. The editor contains a general
Module Details section and a section for each of the enterprise beans in your
module.
- Edit the deployment descriptor as necessary. See the following topics for
more information:
- (Optional) Click XML at the top of the deployment descriptor editor to view
and edit the deployment descripor's XML code.
- Choose File > Save
to save your changes.
- If you rename any CMP fields, methods, interfaces, or classes in the ejb-jar.xml
visual editor, the IDE updates the all references to the names in the appropriate
class and interface files.
To edit sun-ejb-jar.xml:
- Double-click sun-ejb-jar.xml to open it in the graphical editor.
The graphical editor opens in a Source Editor tab. The editor contains a tree
view of the module's contents on the left and property editors for each item
on the right.
- Edit the deployment descriptor as necessary. See the following topics for
more information:
- Choose File > Save to save your changes.
- Right-click sun-ejb-jar.xml and choose Edit to edit the deployment
descriptor's XML source. You can only open in this mode if the file is not
already open in the visual editor. The Source Editor provides code completion
and validation for all XML files.
To edit the server-specific deployment descriptor for any other application
server:
- Double-click the deployment descriptor node.
The IDE opens the XML source of the deployment descriptor in the Source Editor.
- If you enter any XML syntax errors the IDE automatically alerts you. To
fully ensure your changes have not cause any errors, you should verify the
EJB module.
- 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