blob: 32e13f3c040d3ba5cfdb5d31864238ed043a3792 [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>Deleting enterprise beans</title>
</head>
<body id="tedelete"><a name="tedelete"><!-- --></a>
<h1 class="topictitle1">Deleting enterprise beans</h1>
<div><p>You can delete enterprise beans, bean classes, access beans, and
deployment code. In some cases, you may want to only delete the access beans
or deployment code that are associated with enterprise beans.</p><div class="skipspace"><p>Note that the packages that are used to hold the generated Java™ types
are not deleted with the associated enterprise bean. You must manually delete
unused packages from your project when the generated classes in those packages
are removed.</p>
<p>You can delete some or all of the artifacts that compose
an enterprise bean:</p>
<ul><li>EJB metadata in deployment descriptor editor</li>
<li>Deployment code</li>
<li>Access bean classes</li>
<li>Bean classes</li>
</ul>
<p>If you delete the EJB metadata from the deployment descriptor, the
generated access bean classes and deployment code will also be deleted because
they cannot exist without the bean classes. If you delete an enterprise bean
using the EJB editor (or while an EJB editor is open), the delete is not committed
until the editor is saved. Therefore, if you close the editor without saving,
the enterprise bean remains and the deleted Java files are returned.</p>
<p>When an
EJB is deleted, all of the metadata that is associated with the bean is also
deleted, including metadata from the bindings and extension documents.</p>
<div class="note"><span class="notetitle">Note: </span>When
a CMP entity bean is deleted, any mappings related to this bean will not be
automatically removed. When the Mapping editor is opened on these files after
an entity bean is deleted, the mappings will be removed. This is expected
behavior. You will need to open the Mapping editor prior to generating deployment
code.</div>
<p>To delete enterprise beans, access beans, or deployment code:</p>
</div>
<ol><li class="skipspace"><span>In the Project Explorer view of the J2EE perspective, expand an
EJB module and select one or more enterprise beans. </span> <div class="tip"><span class="tiptitle">Tip: </span>You
can also delete a bean from the Bean page of the deployment descriptor editor
by selecting the bean and clicking <span class="uicontrol">Remove</span>.
Deleting from the Project Explorer view commits the deletion immediately,
if no editor is open. Deleting from the deployment descriptor editor commits
the changes when the editor is saved.</div>
</li>
<li class="skipspace"><span>Right-click and select <span class="uicontrol">Delete</span>. A dialog
opens and gives you additional options that you can select to further define
what you want to delete.</span></li>
<li class="skipspace"><span>Click <span class="uicontrol">OK</span>.</span></li>
</ol>
</div>
<br />
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.
</body>
</html>