Programming Stand-alone Clients
The following sections describe deployment descriptors for J2EE client applications on WebLogic Server:
When it comes to J2EE applications, often users are only concerned with the server-side modules (Web applications, EJBs, and connectors). You configure these server-side modules using the application.xml deployment descriptor, discussed in "Enterprise Application Deployment Descriptor Elements" in Developing Applications with WebLogic Server.
However, it is also possible to include a client module (a JAR file) in an EAR file. This JAR file is only used on the client side; you configure this client module using the application-client.xml deployment descriptor. This scheme makes it possible to package both client and server side modules together. The server looks only at the parts it is interested in (based on the application.xml file) and the client looks only at the parts it is interested in (based on the application-client.xml file).
For client-side modules, two deployment descriptors are required: a J2EE standard deployment descriptor, application-client.xml
, and a WebLogic-specific runtime deployment descriptor with a name derived from the client application JAR file.
The application-client.xml
file is the deployment descriptor for J2EE client applications. It must begin with the following DOCTYPE declaration:
<!DOCTYPE application-client PUBLIC "-//Sun Microsystems,
Inc.//DTD J2EE Application Client 1.2//EN"
"http://java.sun.com/j2ee/dtds/application-client_1_2.dtd">
The following sections describe each of the elements that can appear in the file.
application-client
is the root element of the application client deployment descriptor. The application client deployment descriptor describes the EJB modules and other resources used by the client application.
The following table describes the elements you can define within an application-client
element.
This XML-formatted deployment descriptor is not stored inside of the client application JAR file like other deployment descriptors, but must be in the same directory as the client application JAR file.
The file name for the deployment descriptor is the base name of the JAR file, with the extension .runtime.xml
. For example, if the client application is packaged in a file named c:/applications/ClientMain.jar
, the run-time deployment descriptor is in the file named c:/applications/ClientMain.runtime.xml
.
The application-client
element is the root element of a WebLogic-specific run-time client deployment descriptor. The following table describes the elements you can define within an application-client
element.