blob: a341ad7f6b51f917264437f753ba0e68723895b5 [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 content="text/html; charset=utf-8" http-equiv="Content-Type" />
<meta name="copyright" content="Copyright (c) 2000, 2011 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 https://www.eclipse.org/legal/epl-2.0/. Contributors: IBM Corporation - initial API and implementation" />
<meta name="DC.rights.owner" content="(C) Copyright 2000, 2011" />
<meta content="public" name="security" />
<meta content="index,follow" name="Robots" />
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
<meta content="concept" name="DC.Type" />
<meta name="DC.Title" content="EJB 2.x client JAR projects" />
<meta name="abstract" content="An EJB client JAR project contains all the class files that a client program needs to use the client view of the enterprise beans that are contained in the EJB module." />
<meta name="description" content="An EJB client JAR project contains all the class files that a client program needs to use the client view of the enterprise beans that are contained in the EJB module." />
<meta content="EJB, client JAR projects" name="DC.subject" />
<meta content="EJB, client JAR projects" name="keywords" />
<meta scheme="URI" name="DC.Relation" content="../topics/ceresrc.html" />
<meta content="XHTML" name="DC.Format" />
<meta content="ceclientjars" name="DC.Identifier" />
<meta content="en-us" name="DC.Language" />
<link href="../../org.eclipse.wst.doc.user/common.css" type="text/css" rel="stylesheet" />
<title>EJB 2.x client JAR projects</title>
</head>
<body id="ceclientjars"><a name="ceclientjars"><!-- --></a>
<h1 class="topictitle1">EJB 2.x client JAR projects</h1>
<div><p>An EJB client JAR project contains all the class files that a client
program needs to use the client view of the enterprise beans that are contained
in the EJB module.</p>
<p>With the EJB tooling, you can create an EJB project with a corresponding
EJB client JAR project. The EJB project will depend on the EJB client JAR
project. The EJB client JAR project contains all necessary classes for a client
of the enterprise beans, including all interface classes, key classes, and
supporting classes. Because these classes are not duplicated in the EJB project,
the EJB project depends on its EJB client JAR project. Any project that has
a reference to an enterprise bean in the EJB project will need a reference
to the EJB client JAR project. If the EJB client JAR project is in another
enterprise application, the EJB client JAR file must be added to the referencing
EAR file as a utility JAR file. </p>
<p>After the EJB client JAR project is created, it is up to you to add any
necessary value objects to this project that are needed by the home or component
interfaces. If the objects are not present, compilation errors will result. </p>
<p><strong>EJB client JAR files</strong></p>
<div class="p">EJB client projects are exported as EJB client JAR files when the application
is exported. The EJB client JAR file is specified in the deployment descriptor
of the EJB JAR file using the optional <samp class="codeph">ejb-client-jar</samp> element.
The value of the <samp class="codeph">ejb-client-jar</samp> element is the path name
specifying the location of the EJB client JAR file in the containing Java
EE Enterprise Application Archive (.ear) file. The value of the path name
is a URI relative to the EJB JAR file within the application. <div class="note"><span class="notetitle">Note:</span> The relative
URI path for the EJB client JAR file should be the same in all applications
that the EJB project belongs to.</div>
</div>
<p>When you create an EJB client JAR project for an EJB project, the EJB client
JAR file is added to the containing enterprise application as a project utility
JAR. The reference to this EJB client JAR file cannot be removed from the
enterprise application as long as the EJB project is defined as a module for
the application.</p>
<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 export the EJB client JAR project separately as a JAR
file.</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="../topics/ceresrc.html" title="This topic describes resources and development tools that are commonly used in EJB version 2.x development.">EJB 2.x development resources</a></div>
</div>
</div>
</body>
</html>