WAS v8.5 > Administer applications and their environment > Deploy enterprise applications

View deployment descriptors

A deployment descriptor is an extensible markup language (XML) file that specifies configuration and container options for an application or module.

This topic assumes that we have installed an application or module on a server and to view its deployment descriptor. When creating a Java 2 Platform, Enterprise Edition (J2EE) application or module in an assembly tool, the assembly tool creates deployment descriptor files for the application or module. Java EE 5 or later applications and modules might use annotations instead of deployment descriptors.

After an application or module is installed on a server, we can view its deployment descriptor in the dmgr console. We cannot view Java EE 5 or later annotations.

Unless an application supports Java EE 5 or later, an EAR file must contain an application.xml file. The application.xml identifies each module of an application. A Java EE 5 application is not required to provide an application.xml file in the EAR file. When an application.xml file does not exist, the product examines the JAR file contents to determine whether the JAR file is an EJB module or an application client module. A JAR file should not contain more than one deployment descriptor in it. When an ejb-jar.xml file is found in a JAR file, the product considers it an EJB module. If an ejb-jar.xml file is not found and an application-client.xml is found, the product considers the JAR file to be an application client module. If both ejb-jar.xml and application-client.xml files exist in the JAR file, the product might consider a JAR file intended to be an application client module to be an EJB module or a JAR file intended to be an EJB module to be an application client module. A JAR file should not contain more than one kind of deployment descriptor.

  1. Access a deployment descriptor view.

    Click the navigational option stated in Accessing a console view to view the deployment descriptor for a given module:

    Accessing View deployment descriptor pages in the console. Click links on the console navigation tree and pages.

    Module Deployment descriptor file Access a console view
    Enterprise application application.xml Applications > Application Types > WebSphere enterprise applications > application_name > View deployment descriptor
    Web application WEB-INF/web.xml Applications > Application Types > WebSphere enterprise applications > application_name > Manage modules > module_name > View deployment descriptor
    WEB-INF/portlet.xml Applications > Application Types > WebSphere enterprise applications > application_name > Manage modules > module_name > View portlet deployment descriptor
    Enterprise bean ejb-jar.xml Applications > Application Types > WebSphere enterprise applications > application_name > Manage modules > module_name > View deployment descriptor
    Application client application-client.xml Applications > Application Types > WebSphere enterprise applications > application_name > Manage modules > module_name > View deployment descriptor
    Web service webservices.xml Applications > Application Types > WebSphere enterprise applications > application_name > Manage modules > module_name >

    • View web services client deployment descriptor extension
    • View web services server deployment descriptor
    • View web services server deployment descriptor extension

    For information about the views, see the topic on viewing Web services deployment descriptors in the dmgr console.

    Resource adapter embedded in enterprise application ra.xml Applications > Application Types > WebSphere enterprise applications > application_name > Manage modules > ra_module_name > View deployment descriptor
    Stand-alone Resource adapter ra.xml Resources > Resource Adapters > Resource adapters > module_name > View deployment descriptor

  2. Click Expand All to view the deployment descriptor contents.


Results

The deployment descriptor for the application or module is displayed.


Example

The deployment descriptor for the product DefaultApplication follows:

After displaying a deployment descriptor on the console page, do the following:

  1. Examine the deployment descriptor contents, including any configurations that it has for application bindings, security roles, references to other resources, or JNDI names.

    For example, examine the JAR files of your Java EE 5 or later module to ensure that each JAR file does not contain more than one kind of deployment descriptor. If a JAR file contains more than one kind of deployment descriptor, proceed to the next step and remove the extraneous deployment descriptor. Thus, if both ejb-jar.xml and application-client.xml files exist in a JAR file, remove the deployment descriptor that your module does not need.

  2. Change a deployment descriptor as needed.

    We can edit a deployment descriptor file manually. However, it is preferable to edit a deployment descriptor using the console or in an assembly tool deployment descriptor editor to ensure the deployment descriptor has valid properties and that its references contain appropriate values.

If your Java EE 5 or later module does not have a metadata-complete attribute or the metadata-complete attribute is set to false, we can instruct the product to write the entire module deployment descriptor, including deployment information from annotations, to XML format. On the Metadata for modules page, select metadata-complete attribute.

If your Java EE 5 or later application uses annotations and a shared library, do not select metadata-complete attribute. When the application uses annotations and a shared library, setting the metadata-complete attribute to true causes the product to incorrectly represent an @EJB annotation in the deployment descriptor as <ejb-ref> rather than <ejb-local-ref>. For web modules, setting the metadata-complete attribute to true might cause InjectionException errors. If set the metadata-complete attribute to true, avoid errors by not using a shared library, by placing the shared library in either the classes or lib directory of the application server, or by fully specifying the metadata in the deployment descriptors.


Subtopics


Related concepts:

Application bindings
Security annotations
Naming
Development and assembly tools


Related


View web services deployment descriptors in the dmgr console
Develop JAX-RPC web services deployment descriptor templates for an enterprise bean implementation
Develop JAX-RPC web services deployment descriptor templates for a JavaBeans implementation
Install enterprise application files


Reference:

EJB metadata annotations
JAX-WS annotations
web.xml file


+

Search Tips   |   Advanced Search