blob: 8d4e16c529a4f55c3e6fd5a42879495de878f51b [file] [log] [blame]
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" />
<title>EJB Deployment Descriptor editor</title>
</head>
<body id="ceejbed"><a name="ceejbed"><!-- --></a>
<h1 class="topictitle1">EJB Deployment Descriptor editor</h1>
<div><p>The EJB deployment descriptor editor is used to modify EJB JAR
files and associated Java™ files.</p><p>The EJB deployment descriptor editor is organized with pages and sections
that represent the various properties and settings in the EJB deployment descriptor.
Additionally, the editor includes sections and pages related specifically
to WebSphere<sup>®</sup> Application
Server bindings and extensions to the EJB specification.</p>
<p>The core function is typically located at the top of an editor page. To
see core pages and sections, set focus on the editor and press alt-shift-c.
The core pages, sections, headers, and tabs will highlight blue and remain
in this state until you press alt-shift-c again. The extensions and bindings
are usually nested sections and found at the bottom of the editor pages. Collapsing
a section hides the content, but leaves the heading information. This is useful
in filtering through the data and properties on each page. The editor remember
the sections that you collapse when you close and reopen the editor. Also,
you can resize sections by dragging a hidden border at the end or beginning
of each section.</p>
<p>Another important feature of the editor is the enhanced wizard support.
You can open wizards from the editor that walk you through creation and modification
of the various elements. The wizards help you determine problems while stepping
through the creation process. If an error occurs, or if you enter invalid
data, the wizard displays a warning or error message at the top of the wizard
page. Wizards offer the ability to create or edit many objects at one time,
and you can work on multiple beans at the same time.</p>
<p>The EJB editor modifies the following resources:</p>
<ul><li>ejb-jar.xml</li>
<li>ibm-ejb-jar-bnd.xmi</li>
<li>ibm-ejb-jar-ext.xmi</li>
<li>ibm-ejb-access-bean.xml</li>
<li>ws-handler.xmi</li>
<li>webservicesclient.xml</li>
<li>ibm-webservicesclient-bnd.xmi</li>
<li>ibm-webservicesclient-ext.xmi</li>
</ul>
<p>Although the EJB deployment descriptor editor pages can change depending
on the capabilities that you have enabled (<span class="menucascade"><span class="uicontrol">Window</span> &gt; <span class="uicontrol">Preferences</span> &gt; <span class="uicontrol">Workbench</span> &gt; <span class="uicontrol">Capabilities</span></span>) the EJB deployment descriptor editor typically displays the
following main tabbed pages:</p>
<div class="skipspace"><h4 class="sectiontitle">Overview page</h4><p>Use the <span class="uicontrol">Overview</span> page
to view, create, and modify the basic properties of the EJB module. This should
be the first place that you look for editor content. The body of this page
is a user interface representation of the ejb-jar.xml file. The core XML tags
of the ejb-jar.xml are broken down into the following sections:</p>
<dl><dt class="bold">General Information</dt>
<dd>Use this section to add a display and description name. These names are
used for identification on the Web server and J2EE view.</dd>
<dt class="bold">Usage</dt>
<dd>Use this section to view a list of links to editors that are associated
with the EJB JAR. For example, if the EJB JAR was defined in an EAR, the EAR
name would appear as a link. Clicking on the link launches the EAR deployment
descriptor editor.</dd>
<dt class="bold">Enterprise JavaBeans™</dt>
<dd>Use this section to view a list of links corresponding to the beans in
the EJB. Clicking on a link takes you to the <span class="uicontrol">Beans</span> page
and highlights the enterprise bean.</dd>
<dt class="bold">Assembly Descriptor</dt>
<dd>This section has a <span class="uicontrol">Details</span> button that links to
the <span class="uicontrol">Assembly</span> page. The <span class="uicontrol">Assembly</span> page
has sections and wizards for security roles, method permissions, container
transactions, and the excludes list.</dd>
<dt class="bold">EJB Client JAR</dt>
<dd>This section displays the name of the EJB client JAR file that is created
for the EJB module. If no EJB client JAR file has been created, you can click
the <span class="uicontrol">Create</span> button to open the EJB Client JAR Creation
wizard and create the JAR file.</dd>
<dt class="bold">References</dt>
<dd>This section also has a <span class="uicontrol">Details</span> button that links
to the <span class="uicontrol">References</span> page.</dd>
<dt class="bold">Relationships 2.0</dt>
<dd>This section is available for EJB 2.0 modules only. The relationship section
contains a list of existing relationships. All creation and modification of
a relationship can be done here.</dd>
<dt class="bold">Icons</dt>
<dd>Use this section to assign an icon for the EJB JAR. This is primarily
used for identification at run time.</dd>
<dt class="bold">WebSphere Extensions</dt>
<dd>Displays only if the project is targeted to a WebSphere Application Server.
This section contains <span class="uicontrol">1.x Relationships</span> and <b>Inheritance</b> composites.
Each area has an <span class="uicontrol">Edit</span> button that launches a wizard
to update the deployment descriptor properties for the selected bean.</dd>
<dt class="bold">WebSphere Bindings</dt>
<dd>Displays only if the project is targeted to a WebSphere Application Server. <p>For
EJB 1.1 modules:</p>
<ul><li><span class="uicontrol">JNDI Default DataSource Binding</span>: Use this section
to specify the DataSource JNDI name, the JNDI user ID, and DataSource password.</li>
</ul>
<div class="p">For EJB 2.0 modules: <ul><li><span class="uicontrol">Backend ID</span>: Use this section to determine the persister
classes that get loaded at deployment.</li>
<li><span class="uicontrol">JNDI CMP Factory Connection Binding</span>: Use this section
to specify the JNDI name container authorization type. You can choose either
container-managed authentication or component-managed authentication.</li>
</ul>
</div>
</dd>
</dl>
</div>
<div class="skipspace"><h4 class="sectiontitle">Bean page</h4><p>Use the <span class="uicontrol">Bean</span> page
to create, modify, and remove function and resources from enterprise beans.
The left side of the Bean page shows a list of beans in the EJB project. On
the right side, a scrollable section contains the details for the selected
bean. For example, if you select an EJB 1.x CMP entity bean, only the sections
that are relevant to that type of bean are displayed.</p>
<p>The beans page
includes the following sections:</p>
<dl><dt class="bold">General section</dt>
<dd>All enterprise beans have a general section that gives you quick access
to common information. For EJB 1.1 CMP entity beans, the section contains
the display name, reentrant type, description, and CMP Fields. EJB 2.x CMP
entity beans also have a field for abstract schema name. The display name
and description field are used for identification within the J2EE view and
on the Web server. You can use the reentrant field when you do not want a
bean to be accessed until it has finished with its current execution. Abstract
schema name is set and used when you are creating EJBQL statements. The Attribute
section allows you to create and remove attributes. Attributes are mapped
fields that access the database to persist and retrieve data.<p>Double-click
a bean to open the Java source code in the Java editor.</p>
</dd>
<dt class="bold">Class and Interface Files</dt>
<dd>For EJB 1.1 and EJB 2.x beans. Use this section to modify Java resources
associated with the bean. For example, if you want to open the bean Java class
and add business logic, you could double-click the bean class or select the
bean class in the table and click <b>Open</b>. The <span class="uicontrol">Open</span> button
launches a Java editor that supports editing enterprise beans.
The class interface section also gives you the ability to change Java resources
to other existing resources. Clicking the <span class="uicontrol">Browse</span> button
can access this reuse function. You will be prompted with a resource browse
dialog. You can also use the remove function that launches a wizard that helps
you delete resources.</dd>
<dt class="bold">Environment Variables</dt>
<dd>For EJB 1.1 and EJB 2.x beans. Use this section to add, remove, and modify
environment variables. Double-clicking a variable in the editor highlights
the appropriate element in the Source view.<p>Environment variables are constant
variables that you define in Web and EJB components. For example, if you define
a <samp class="codeph">Circle</samp> bean, you could create an environment variable called <samp class="codeph">PI</samp> and
set the value to <samp class="codeph">3.1415926</samp>. If you had another enterprise
bean or servlet called <samp class="codeph">Cone</samp>, it could access the <samp class="codeph">PI</samp> variable
by doing a JNDI lookup.</p>
</dd>
<dt class="bold">Icons</dt>
<dd>For EJB 1.1 and EJB 2.x beans. The icon section is similar to the EJB
JAR section. Use this section to assign an icon on the bean level. This is
primarily used for identification at runtime.</dd>
<dt class="bold">Message-Driven Destination</dt>
<dd>For EJB 2.x message-driven beans. Use this section to specify the destination
type and subscription durability for the message-driven bean.</dd>
<dt class="bold">Relationships</dt>
<dd>For EJB 2.x CMP entity beans. Use this section to create and work with
relationships for EJB 2.0 CMP entity beans.</dd>
<dt class="bold">Access Beans</dt>
<dd>For EJB 1.1 and EJB 2.x session and entity beans. Not available for message-driven
beans. Use this section to create and edit access beans. Access beans are
convenient ways to gain access to your enterprise beans.</dd>
<dt class="bold">Queries</dt>
<dd>For EJB 2.x CMP entity beans. Use this section to create finder methods
and assign finder statements to those methods. You can also remove finder
descriptors. A finder method resides on the home interface. Finder Descriptors
are assigned to these methods. The finder descriptor is used to query the
database to return specific bean instances. Click <span class="uicontrol">Add</span> to
open the finder wizard that gives you the option to create or use an existing
finder method. After the method is created, the wizard helps you to add descriptor
information.</dd>
<dt class="bold">WebSphere Bindings</dt>
<dd>Displays only if the project is targeted to a WebSphere Application Server.
For EJB 1.1 and EJB 2.x beans. Use this section to specify binding properties
for the WebSphere Application
Server. The datasource is used to lookup the designated database at runtime.
You must create the datasource in the server configuration. If you are using WebSphere Application
Server, you can do this using the server tools. The user name and password
are used for verification upon access of the database.</dd>
<dt class="bold">WebSphere Extensions</dt>
<dd>Displays only if the project is targeted to a WebSphere Application Server.
For EJB 1.1 and EJB 2.x beans. Use this section to specify additional extensions
for use with the WebSphere Application Server. The following sections or
fields are available, depending on the type and level of the selected bean: <dl><dt class="bold">Session timeout</dt>
<dd>For session beans, use this section to specify a timeout value and activity
session type.</dd>
<dt class="bold">Relationships</dt>
<dd>For EJB 1.1 CMP entity beans. Use this section to define relationships.</dd>
<dt class="bold">Finders</dt>
<dd>For EJB 1.1 CMP entity beans. Use this section to create finder methods
and assign finder statements to those methods. You can also remove finder
descriptors. A finder method resides on the home interface. Finder Descriptors
are assigned to these methods. The finder descriptor is used to query the
database to return specific bean instances. Click <span class="uicontrol">Add</span> to
open the finder wizard that gives you the option to create or use an existing
finder method. After the method is created, the wizard helps you to add descriptor
information.</dd>
<dt class="bold">Bean Cache</dt>
<dd>Use this section to define the bean cache settings.</dd>
<dt class="bold">Local Transaction 2.0</dt>
<dd>Use this section to define the local transaction settings.</dd>
<dt class="bold">Locale Invocation</dt>
<dd>Using these settings can maximize the performance of the EJB running on WebSphere Application
Server.</dd>
<dt class="bold">Data Cache</dt>
<dd>For EJB 2.x CMP entity beans. Use this section to specify lifetime in
cache and lifetime in cache usage.</dd>
<dt class="bold">Concurrency Control</dt>
<dd>For 1.1 CMP entity beans. By default, optimistic locking is not enabled,
which means that if an entity bean is accessing a row in the database, another
bean will not be able to edit that row until the original bean has released
it. If an edit is attempted while the row is locked an exception will be thrown.</dd>
</dl>
</dd>
</dl>
</div>
<div class="skipspace"><h4 class="sectiontitle">References page</h4><p>Use the References page to define
references for the enterprise beans in the project. WebSphere Bindings
for the references, such as the JNDI name for the reference, are also set
on this page. Select a bean and click <span class="uicontrol">Add</span> to open the
Add Reference wizard. See <a href="../../com.ibm.etools.j2eeapp.doc/topics/tjaddrefs.html">Defining
references for J2EE modules</a> for more information.</p>
<p>The Reference
page is setup like the bean page, where the selection in the left main section
dynamically changes the right side detail sections.</p>
</div>
<div class="skipspace"><h4 class="sectiontitle">WS Handler page</h4><p>Use the Handlers page to define
Web service handlers for each Web service reference that is defined for the
enterprise beans in the EJB module. See <a href="../../com.ibm.etools.j2eeapp.doc/topics/tjaddwshandlers.html">Defining
Web service handlers</a> for more information.</p>
</div>
<div class="skipspace"><h4 class="sectiontitle">Assembly page</h4><p>Use this page to define security roles,
method permissions, and method transactions. It also allows you to exclude
methods from security constraints. The Assembly page has the following sections:</p>
<dl><dt class="bold">Security Roles</dt>
<dd>Use this section to define security roles. Security roles are needed in
order to build the method permissions. This section lists the security roles
that are defined and displays details for the selected security role.</dd>
<dt class="bold">Method Permissions</dt>
<dd>Use this section to add permissions to beans on the method level. This
section contains a tree that has a list of existing method permissions. When
you create a new method permission, you will see it in the tree. If you expand
the tree, the bean and methods that are defined in the method permission are
displayed.</dd>
<dt class="bold">Container Transactions</dt>
<dd>To add a container transaction, click <span class="uicontrol">Add</span> to launch
the Container Transaction wizard. Clicking the <span class="uicontrol">Remove</span> button
while any tree object is selected will remove the Transaction.</dd>
<dt class="bold">Excludes List</dt>
<dd>For EJB 2.x modules, use this section to mark method elements as uncallable
by the deployment descriptor.</dd>
</dl>
</div>
<div class="skipspace"><h4 class="sectiontitle">Access page</h4><p>Use the Access page to define access
intent, isolation level, and security identity properties variables for CMP
entity beans. Depending on the EJB version level of the EJB project, the access
page displays different sections, including WebSphere extensions. Available sections include
the following sections:</p>
<dl><dt class="bold">Security Identity (Bean level)</dt>
<dd>Use this section to add security identities.</dd>
<dt class="bold">Default Access Intent for Entities 2.x (Bean Level)</dt>
<dd>Use this section to define default access intent for bean-level security
identity.</dd>
<dt class="bold">Access Intent for Entities 2.x (Method Level)</dt>
<dd>Use this section to define access intent for method-level security identity.</dd>
<dt class="bold">Access Intent for Entities 1.x</dt>
<dd>A WebSphere Application Server extension. Use this section to define default
access intent for bean-level security identity.</dd>
<dt class="bold">Isolation level</dt>
<dd>A WebSphere Application Server extension. Use this section to define default
access intent for bean-level security identity.</dd>
<dt class="bold">Security Identity (Method level)</dt>
<dd>A WebSphere Application Server extension. Use this section
to add security identities.</dd>
</dl>
</div>
<div class="skipspace"><h4 class="sectiontitle">WS Extension page</h4><p>Use this page to define Web service
client security extensions for WebSphere Application Server.</p>
</div>
<div class="skipspace"><h4 class="sectiontitle">WS Binding page</h4><p>Use this page to define Web service
client bindings for WebSphere Application Server.</p>
</div>
<div class="skipspace"><h4 class="sectiontitle">Source page</h4><p>Use the Source page to view and modify
the XML source code associated with deployment descriptor (ejb-jar.xml) for
the EJB module. The Source page is an XML editor. The XML changes dynamically
when the EJB deployment descriptor editor is edited. When you make changes
to the XML source, the other pages of the EJB deployment descriptor editor
reflect these changes.</p>
<p>Changes in the EJB deployment descriptor editor
are not committed until the editor is saved. If the editor is closed without
saving, then the changes are not committed. This also includes the changes
that are made to the Java files and the bindings and extension
files, which can be edited by the EJB deployment descriptor editor. If an
existing Java editor is currently opened and a change is made
in the EJB deployment descriptor editor that causes code to be generated into
the Java file
that is currently opened, the changes will be generated into the open editor.
If the EJB deployment descriptor editor is saved, the Java changes
will also be saved. If the EJB deployment descriptor editor is closed without
saving, all changes will be thrown away except the change that is currently
in the open Java editor. Those changes will remain because there
was another reference to the file that was currently opened. You will only
be prompted to save the EJB deployment descriptor editor if there are no other
references to it or its resources. If there are two EJB deployment descriptor
editors opened in two different perspectives, or you have an EJB deployment
descriptor editor and EJB deployment descriptor editor open in one or more
perspectives, the changes will appear in both and you will only be prompted
to save when the last is closed.</p>
</div>
</div>
<div><p><b class="reltaskshd">Related tasks</b><br />
<a href="../topics/teaddclientviews.html" title="You can use the EJB deployment descriptor editor to add and remove client views, or interfaces, from existing entity or session beans.">Adding client views or interfaces to beans</a><br />
<a href="../topics/teaddcontainertran.html" title="Some container transaction settings are not available for all enterprise beans. Also, some methods are not available for particular transaction settings and beans. These rules have been implemented in the Add Container Transaction wizard based on the EJB 1.1 and EJB 2.x specifications.">Defining container transactions for EJB modules</a><br />
<a href="../topics/teaddmethperm.html" title="You can use the Method Permission wizard to add permissions to enterprise beans on the method level.">Defining method permissions for EJB modules</a><br />
<a href="../topics/teassoc.html" title="Use the EJB deployment descriptor editor to specify the relationship between two enterprise beans in your EJB module.">Defining bean relationships</a><br />
<a href="../topics/teaddsecurityrole.html" title="You need to add security roles in order to build method permissions.">Defining security roles for EJB modules</a><br />
<a href="../topics/tecrteev.html" title="Environment variables are constant variables that you can define in EJB modules.">Defining environment variables</a><br />
<a href="../../com.ibm.etools.j2eeapp.doc/topics/tjaddwshandlers.html">Defining Web service handlers</a><br />
</p>
</div> <br />
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.
</body>
</html>