blob: d07a5cf0a6e897e02afb81356ee0ad5fb844b9ab [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN"
"concept.dtd">
<concept id="cjappcliproj" xml:lang="en-us">
<title outputclass="id_title">Application client projects</title>
<shortdesc outputclass="id_shortdesc"></shortdesc>
<prolog><metadata>
<keywords><indexterm>projects<indexterm>application client</indexterm></indexterm>
<indexterm>application client projects<indexterm>overview</indexterm></indexterm>
<indexterm>J2EE modules<indexterm>application client</indexterm></indexterm>
</keywords>
</metadata></prolog>
<conbody outputclass="id_conbody">
<p outputclass="anchor_topictop"> Application client projects contain the
resources needed for application client modules. An application client module
is used to contain a full-function client <tm tmclass="special" tmowner="Sun Microsystems, Inc."
tmtype="tm" trademark="Java">Java</tm> application (non Web-based) that connects
to and uses the J2EE resources defined in your server. When you place the
client code in an application client module instead of a simple JAR file,
the application client benefits from the server's resources (it does not need
to re-specify the class path to J2EE and server JAR files) as well as from
easier JNDI lookup (the client container fills in the initial context and
other parameters). The application client project allows you to work as if
you are creating a standalone <tm tmclass="special" tmowner="Sun Microsystems, Inc."
tmtype="tm" trademark="Java">Java</tm> application in a <tm tmclass="special"
tmowner="Sun Microsystems, Inc." tmtype="tm" trademark="Java">Java</tm> project.</p>
<p>An application client project enables you to do the following things:</p>
<ul>
<li>Develop the <tm tmclass="special" tmowner="Sun Microsystems, Inc." tmtype="tm"
trademark="Java">Java</tm> classes that implement the client module</li>
<li>Set the application client deployment descriptor</li>
<li>Test the application client</li>
</ul>
<p>Like <tm tmclass="special" tmowner="Sun Microsystems, Inc." tmtype="tm"
trademark="Java">Java</tm> projects, application client projects contain the
resources needed for application clients, including <tm tmclass="special"
tmowner="Sun Microsystems, Inc." tmtype="tm" trademark="Java">Java</tm> class
files. When you create a new application client project, the environment is
set up for <tm tmclass="special" tmowner="Sun Microsystems, Inc." tmtype="tm"
trademark="Java">Java</tm> development. A <tm tmclass="special" tmowner="Sun Microsystems, Inc."
tmtype="tm" trademark="Java">Java</tm> <i>builder</i> is associated with the
project so the <tm tmclass="special" tmowner="Sun Microsystems, Inc." tmtype="tm"
trademark="Java">Java</tm> source can be incrementally compiled as it is updated.
The application client project contains information about the type hierarchy
and <tm tmclass="special" tmowner="Sun Microsystems, Inc." tmtype="tm" trademark="Java">Java</tm> elements.
This information is kept current as changes are made, and the <tm tmclass="special"
tmowner="Sun Microsystems, Inc." tmtype="tm" trademark="Java">Java</tm> builder
will incrementally compile the resources within these projects as the resources
are updated.</p>
<p>In the workbench, application client projects are always referenced by
enterprise application (EAR) projects. When you create an application client
project, you specify the enterprise application project to which the application
client project belongs. A module element is automatically added to the <codeph>application.xml</codeph> deployment
descriptor for the EAR project.</p>
<p>An application client project is deployed as a JAR file. This application
client JAR file contains the necessary resources for the application, including <tm
tmclass="special" tmowner="Sun Microsystems, Inc." tmtype="tm" trademark="Java">Java</tm> class
files, and deployment descriptor information and any meta-data extensions
and bindings files.</p>
<p>Application client projects are typically run on networked client systems
connected to J2EE (EJB) servers. The point of entry for the application client
is a <tm tmclass="special" tmowner="Sun Microsystems, Inc." tmtype="tm" trademark="Java">Java</tm> main-class,
which is simply a <tm tmclass="special" tmowner="Sun Microsystems, Inc." tmtype="tm"
trademark="Java">Java</tm> class that contains a static main method. The class
is declared in the manifest file of the client module. </p>
<p>A J2EE application client container provides access to the J2EE service
(JNDI naming services, deployment services, transaction services, and security
services) and communications APIs (internet protocols, Remote Method Invocation
protocols, Object Management Group protocols, Messaging protocols, and data
formats).</p>
<p>By default, application client projects contain one folder named <uicontrol>appClientModule</uicontrol>,
which contains both <tm tmclass="special" tmowner="Sun Microsystems, Inc."
tmtype="tm" trademark="Java">Java</tm> source code and compiled <codeph>.class</codeph> files,
along with all the meta-data files in the <uicontrol>META-INF</uicontrol> subfolder.</p>
<p outputclass="anchor_topicbottom"></p>
</conbody>
</concept>