Network Deployment (Distributed operating systems), v8.0 > Administer applications and their environment > Deploy and administering 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 you create a 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, you can view its deployment descriptor in the administrative console. We cannot view Java EE 5 or later annotations.

Unless an application supports Java EE 5 or later, an enterprise archive (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 enterprise bean (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.


Procedure

  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 administrative 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:

<application id="Application_ID" >
<display-name> DefaultApplication.ear
</display-name>
<description> This is the IBM WAS Default Application.
</
<description>
<module id="WebModule_1" >
<web>
<web-uri> DefaultWebApplication.war
</web-uri>
<context-root> /
</context-root>
</web>
</module>
<module id="EjbModule_1" >
<ejb> Increment.jar
</ejb>
</module>
<security-role id="SecurityRole_1204342979281" >
<description> All Authenticated users role.
</description>
<role-name> All Role
</role-name>
</security-role>
</application> 


What to do next

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.

    You 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 that 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, you 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 your 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.


Related


Metadata for module settings
Application bindings
Security annotations
Naming
Assembly tools
View web services deployment descriptors in the administrative 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


Related


EJB metadata annotations
JAX-WS annotations
web.xml file

+

Search Tips   |   Advanced Search