View deployment descriptors


 

+

Search Tips   |   Advanced Search

 

A deployment descriptor is an XML file that specifies configuration and container options for an application or module.

This page assumes that we have installed an application or module on a server and that you want to view its deployment descriptor.

By creating a J2EE application or module in an assembly tool, the assembly tool creates deployment descriptor files for the application or module. Java EE 5 applications or 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 admin console. We cannot view Java EE 5 annotations.

Unless an application supports Java EE 5, 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, WAS 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.

A JAR file should not contain more than one kind of deployment descriptor.

 

Enterprise application

application.xml

Applications | Application Types | WebSphere enterprise apps | application_name | View deployment descriptor

 

Web app

WEB-INF/web.xml

Applications | Application Types | WebSphere enterprise apps | application_name | Manage modules | module_name | View deployment descriptor

 

Portlet

WEB-INF/portlet.xml

Applications | Application Types | WebSphere enterprise apps | application_name | Manage modules | module_name | View portlet deployment descriptor

 

Enterprise bean

ejb-jar.xml

Applications | Application Types | WebSphere enterprise apps | application_name | Manage modules | module_name | View deployment descriptor

 

Application client

application-client.xml

No console view

 

Web service

webservices.xml

Applications | Application Types | WebSphere enterprise apps | application_name | Manage modules | module_name


View Web services deployment descriptors in the admin console describes the views.

 

Resource adapter

ra.xml

Resources | Resource Adapters | Resource adapters | module_name | View deployment descriptor

 

Example

The deployment descriptor for WAS 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>

 

Next steps

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 bindings, security roles, references to other resources, or JNDI names.

    For example, examine the JAR files of the Java EE 5 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 the 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 verify the deployment descriptor has valid properties and that its references contain appropriate values.

If the EJB 3.0 or Web 2.5 module does not have a metadata-complete attribute or the metadata-complete attribute is set to false, we can instruct WAS 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 the Java EE 5 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 WAS 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 we must 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 appserver, or by fully specifying the metadata in the deployment descriptors.


Metadata for module settings

 

Related concepts

Application bindings
Security Annotations
Assembly tools

 

Related tasks

Develop JAX-RPC Web services deployment descriptor templates for an enterprise bean implementation
Develop JAX-RPC Web services deployment descriptor templates for a Java Beans implementation

 

Related


EJB 3.0 metadata annotations
JAX-WS annotations
web.xml file