<?xml version="1.0" encoding="utf-8"?> | |
<!--Arbortext, Inc., 1988-2005, v.4002--> | |
<!DOCTYPE task PUBLIC "-//OASIS//DTD DITA Task//EN" "task.dtd"> | |
<task id="tecrtpro" xml:lang="en-us"> | |
<title>Creating EJB projects</title> | |
<shortdesc>An EJB project is used to organize the resources contained in an | |
EJB module.</shortdesc> | |
<prolog><metadata> | |
<keywords><indexterm>EJBs<indexterm>projects<indexterm>creating</indexterm></indexterm></indexterm> | |
</keywords> | |
</metadata></prolog> | |
<taskbody> | |
<context><p>An EJB module is used to assemble one or more enterprise beans | |
into a single deployable unit. It is deployed in a standard <tm tmclass="special" | |
tmowner="Sun Microsystems, Inc." tmtype="tm" trademark="Java">Java</tm> archive | |
(JAR) file. An EJB module can be used as a standalone application, or it can | |
be combined with other modules to create a J2EE enterprise application. An | |
EJB module is installed and run in an enterprise bean container. An EJB project | |
must be referenced by an enterprise application project (defined as a module | |
in an EAR) in order to be deployed successfully and run on a server.</p><p>An | |
EJB module contains the following:</p><ul> | |
<li>One or more deployable enterprise beans.</li> | |
<li>A deployment descriptor, stored in an Extensible Markup Language (XML) | |
file. This file declares the contents of the module, defines the structure | |
and external dependencies of the beans in the module, and describes how the | |
enterprise beans are to be used at run time.</li> | |
</ul><p>To create a new EJB project:</p></context> | |
<steps> | |
<step><cmd>In the J2EE perspective, select <b>File > New > Other > EJB > EJB | |
Project</b>. The New EJB Project wizard opens.</cmd></step> | |
<step><cmd>In the <b>Project Name</b> field, type a name for the EJB project. </cmd> | |
<info></info></step> | |
<step importance="optional"><cmd>To use a different workspace directory for | |
your EJB project, modify the settings for <b>Project contents.</b> </cmd> | |
<info><b>Important</b>: If you specify a non-default project location that | |
is already being used by another project, the project creation will fail.</info> | |
</step> | |
<step><cmd>In the <b>Target runtime</b> drop-down list, select the application | |
server that you want to target for your development. This selection affects | |
the compilation and runtime settings by modifying the class path entries for | |
the project. Use the <b>New</b> button if a target runtime does not exist, | |
or if you want to use a different one.</cmd></step> | |
<step importance="optional"><cmd>Select the <b>Add project to an EAR </b> check | |
box to add the new module to an enterprise application (EAR) project.</cmd> | |
<info>Type a new project name or select an existing enterprise application | |
project from the drop-down list in the <b>EAR Project </b> combination box. | |
Or, click the <b>New</b> button to launch the New Enterprise Application Project | |
wizard.</info></step> | |
<step><cmd>Click <b>Next</b>.</cmd></step> | |
<step><cmd>Select the appropriate <b>Project Facets</b> for your EJB project. | |
A project facet is a set of internal functions that add support for a given | |
technology. </cmd></step> | |
<step><cmd>Click <b>Next</b>.</cmd></step> | |
<step importance="optional"><cmd>Change the value of <b>Source Folder</b> to | |
change the directory where the Java source files are stored. </cmd></step> | |
<step importance="optional"><cmd>Select the <b>Create an EJB Client JAR Project | |
to hold the client interfaces and classes</b> check box if you want the client | |
interface classes for your enterprise beans to be kept in a separate EJB client | |
JAR file. This EJB client JAR file will be added to the enterprise application | |
as a project utility JAR file. You can also modify the <b>Name </b> of the | |
EJB Client JAR project, or the name (<b>Client JAR URI)</b> of the client | |
JAR file. </cmd></step> | |
<step><cmd>Click <b>Finish</b>.</cmd></step> | |
</steps> | |
</taskbody> | |
</task> | |
<?Pub *0000003884?> |