BEA Logo BEA WebLogic Server Release 6.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

   Developing WebLogic Server Applications:   Previous Topic   |   Next Topic   |   Contents   

 

Client Application Deployment Descriptor Elements

 

The following sections describe deployment descriptors for J2EE Client applications on WebLogic Server. Two deployment descriptors are required: a J2EE standard deployment descriptor, named application.xml, and a WebLogic-specific runtime deployment descriptor with a name derived from the client application JAR file.

application.xml Deployment Descriptor Elements

The application.xml file is the deployment descriptor for Enterprise Application Archives. The file is located in the META-INF subdirectory of the application archive. It must begin with the following DOCTYPE declaration:

<!DOCTYPE application PUBLIC "-//Sun Microsystems, 
Inc.//DTD J2EE Application 1.2//EN"
"http://java.sun.com/dtd/application_1_2.dtd">

The following diagram summarizes the structure of the application.xml deployment descriptor.

app_xml2.jpg application element icon element

The following sections describe each of the elements that can appear in the file.

application

application is the root element of the application deployment descriptor. The elements within the application element are described in the following sections.

icon

The icon element specifies the locations of small and large images that represent the application in a GUI tool. This element is not currently used by WebLogic Server.

small-icon

Optional. Specifies the location for a small (16x16 pixel) .gif or .jpg image used to represent the application in a GUI tool. Currently, this is not used by WebLogic Server.

large-icon

Optional. Specifies the location for a large (32x32 pixel) .gif or .jpg image used to represent the application in a GUI tool. Currently, this element is not used by WebLogic Server.

display-name

Optional. The display-name element specifies the application display name, a short name that is intended to be displayed by GUI tools.

description

The optional description element provides descriptive text about the application.

module

The application.xml deployment descriptor contains one module element for each module in the Enterprise Archive file. Each module element contains an ejb, java, or web element that indicates the module type and location of the module within the application. An optional alt-dd element specifies an optional URI to the post-assembly version of the deployment descriptor.

ejb

Defines an EJB module in the application file. Contains the path to an EJB JAR file in the application.

Example:

<ejb>petStore_EJB.jar</ejb>

java

Defines a client application module in the application file.

Example:

<java>client_app.jar</java>

web

Defines a Web application module in the application file. The web element contains a web-uri element and, optionally, a context-root element.

web-uri

Defines the location of a Web module in the application file. This is the name of the .war file.

context-root

Optional. Specifies a context root for the Web application.

Example:

<web>
  <web-uri>petStore.war</web-uri>
  <context-root>estore</context-root>
</web>

security-role

The security-role element contains the definition of a security role which is global to the application. Each security-role element contains an optional description element, and a role-name element.

description

Optional. Text description of the security role.

role-name

Required. Defines the name of a security role or principal that is used for authorization within the application. Roles are mapped to WebLogic Server users or groups in the weblogic-application.xml deployment descriptor.

Example:

<security-role>
  <description>the gold customer role</description>
  <role-name>gold_customer</role-name>
</security-role>
<security-role>
  <description>the customer role</description>
  <role-name>customer</role-name>
</security-role>

WebLogic Run-time Client Application Deployment Descriptor

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 runtime deployment descriptor is in the file named c:/applications/ClientMain.runtime.xml.

The following diagram shows the structure of the elements in the runtime deployment descriptor.app_xmla.jpg

application-client

The application-client element is the root element of a WebLogic-specific runtime client deployment descriptor.

env-entry*

The env-entry element specifies values for environment entries declared in the deployment descriptor.

env-entry-name

The env-entry-name element contains the name of an application client's environment entry.

Example:

<env-entry-name>EmployeeAppDB</env-entry-name>

env-entry-value

The env-entry-value element contains the value of an application client's environment entry. The value must be a string valid for the constructor of the specified type that takes a single string parameter.

ejb-ref*

The ejb-ref element specifies the JNDI name for a declared EJB reference in the deployment descriptor.

ejb-ref-name

The ejb-ref-name element contains the name of an EJB reference. The EJB reference is an entry in the application client's environment. It is recommended that name is prefixed with ejb/.

Example:

<ejb-ref-name>ejb/Payroll</ejb-ref-name>

jndi-name

The jndi-name element specifies the JNDI name for the EJB.

resource-ref*

The resource-ref element declares an application client's reference to an external resource. It contains the resource factory reference name , an indication of the resource factory type expected by the application client's code, and the type of authentication (bean or container).

Example:

<resource-ref>
  <res-ref-name>EmployeeAppDB</res-ref-name>
  <jndi-name>enterprise/databases/HR1984</jndi-name>
</resource-ref>

resource-ref-name

The res-ref-name element specifies the name of the resource factory reference name. The resource factory reference name is the name of the application client's environment entry whose value contains the JNDI name of the data source.

jndi-name

The jndi-name element specifies the JNDI name for the resource.

 

Back to Top