blob: 4dd44b441bd130b1c1bfb294be711fb1bb9f9073 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- /*******************************************************************************
* Copyright (c) 2000, 2005 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/ -->
<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" />
<title>Creating an EJB client JAR project</title>
</head>
<body id="teclientjarcreate"><a name="teclientjarcreate"><!-- --></a>
<h1 class="topictitle1">Creating an EJB client JAR project</h1>
<div><p>You can create an EJB client JAR project for an existing EJB project.</p>
<div class="section"> <p>If you have an existing EJB project that currently does not take
advantage of the EJB client JAR specification and tooling, you can quickly
create an EJB client JAR project for the EJB project. The EJB client JAR project
is exported as an EJB client JAR file when the application is exported.</p>
<p>When
you create an EJB Client JAR project for an existing EJB project, all Java™ JAR
dependencies are updated appropriately. In other words, all Java project
references on the Java build paths and the MANIFEST class path entries
are modified. The EJB client JAR is added as a utility JAR to any EAR projects
that include the EJB project. Any remote and local client interfaces are moved
from the EJB project to the EJB client JAR project. The interfaces are moved
to the new project, which is categorized in the Project Explorer under <span class="uicontrol">Other
projects</span>.</p>
<p>To create an EJB client JAR project for an existing
EJB project:</p>
</div>
<ol><li class="stepexpand"><span>In the Project Explorer view of the J2EE perspective, right-click
the EJB module, and select <span class="menucascade"><span class="uicontrol">EJB Client JAR</span> &gt; <span class="uicontrol">Create EJB Client JAR Project</span></span> from the
pop-up menu. The EJB Client JAR Creation wizard opens.</span></li>
<li class="stepexpand"><span>In the <span class="uicontrol">Client JAR URI</span> field, type a name
for the EJB client JAR file. For this URI value, you need to enter a value
relative to the EJB JAR file with an EAR file.</span></li>
<li class="stepexpand"><span>In the <span class="uicontrol">Name</span> field, type a name for the EJB
client JAR project.</span></li>
<li class="stepexpand"><span>To change the default <span class="uicontrol">Project location</span>,
click the <span class="uicontrol">Browse</span> button to select a new location.</span> If you specify a non-default project location that is already being
used by another project, the project creation will fail.</li>
<li class="stepexpand"><span>Click <span class="uicontrol">Finish</span>.</span></li>
</ol>
<div class="section">The EJB client JAR project is created, any remote and local interface
classes are moved to the EJB client JAR project, class paths are updated with
appropriate references, and the EJB client JAR project is added as a project
utility JAR file to any enterprise application (EAR) project that includes
the EJB project.<div class="important"><span class="importanttitle">Important:</span> If you use the Export EJB JAR file wizard to export an EJB
project, the export wizard does not include an EJB project's associated EJB
client JAR project. To include the EJB client JAR file, it is recommended
that you export the enterprise application EAR file that contains the EJB
project. The resulting EAR file will include any dependent EJB client JAR
files as utility JAR files. Alternatively, you can <a href="teclientjarremove.html">remove
the EJB client JAR file</a> before exporting the EJB project, or export
the EJB client JAR project separately as a JAR file. </div>
<div class="restriction"><span class="restrictiontitle">Restriction:</span> <span>If you want to create
an EJB client JAR project for an existing EJB project that has already been
deployed, you must first manually delete all deployment code from the EJB
project. After the deployment code is deleted from the EJB project, you can
create the EJB client JAR project and redeploy the EJB project.</span></div>
</div>
</div>
<p>
(C) Copyright IBM Corporation 2000, 2005. All Rights Reserved.
</p>
</body>
</html>