Metadata for module settings


 

+

Search Tips   |   Advanced Search

 

To instruct a Java EE EJB or Web module deployment descriptor to ignore annotations that specify deployment information.

To view this admin console page, click...

Applications | Application Types | WebSphere enterprise apps | application_name | Metadata for modules

New feature: If your application contains EJB 3.0 or Web 2.5 modules, you can select to lock the deployment descriptor of one or more of the EJB 3.0 or Web 2.5 modules on the Metadata for modules page. If you set the metadata-complete attribute to true and lock deployment descriptors, the product writes the complete module deployment descriptor, including deployment information from annotations, to XML format.newfeat

This page is the same as the Metadata for modules page on the application installation and update wizards.

If we set the metadata-complete attribute to true and lock deployment descriptors, WAS writes the complete module deployment descriptor, including deployment information from annotations, to XML format

Annotations are a standard mechanism of adding metadata to Java classes. Prior to their introduction deployment descriptors were the standard mechanism used by Java EE components.

These deployment descriptors were mapped to XML format, which facilitated their persistence. If we select to lock deployment descriptors, WAS ND merges Java EE 5 annotation-based metadata with the XML-based existing deployment descriptor metadata and persists the result.

When applications contain a large number of Java classes, the deployment processing time for the annotations can increase. To minimize the performance impact, you can use one of the following methods:

  1. Determine whether the module needs to use Java EE 5. If the module does not need to use Java EE 5, the annotations within the Java classes are not scanned.

  2. Use the metadata-complete attribute in the module descriptor if the module uses Java EE 5 and it does not contain any annotations. This attribute disables the annotations processing for the module, but Java EE 5 modules might still be placed in the descriptor file. If you are migrating your application, but you are not adding annotations, consider using this attribute value.

  3. Restructure the application to place the utility Java archive (JAR) files into shared libraries if those JAR files do not have annotation information. Consider this method if you cannot set the metadata-complete attribute.

  4. Move the JAR files in the WEB-INF\lib directory to the root directory of the enterprise archive (EAR) file. Nested archives, such as a JAR file that is within a Web archive (WAR) that is within an enterprise application archive (EAR) file, are very cumbersome to search through because of the multiple levels of compression.

Module

Name of a module in the installed (or deployed) application.

Data type String

URI

Location of the module relative to the root of the application (EAR file).

Data type String

metadata-complete attribute

Whether to write the complete module deployment descriptor, including deployment information from annotations, to XML format.

The default is not to write out a module deployment descriptor.

If your EJB 3.0 or Web 2.5 module does not have a metadata-complete attribute or the metadata-complete attribute is set to false, you can select a check box and instruct the product to write out a module deployment descriptor.

If the Java EE 5 application uses annotations AND a shared library, do NOT select the metadata-complete attribute.

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 metadata-complete is set to to true, avoid errors by...

  • Not using a shared library
  • Placing the shared library in either the classes or lib directory of the appserver
  • Fully specifying the metadata in the deployment descriptors

After you select a check box, we cannot deselect (clear) the check box and the module is no longer shown in the list of modules on this page.

If we select all of the check boxes, the link to this page is no longer shown on the enterprise application settings page.

Data type Boolean
Default false (deselected)






 

Related tasks

Set enterprise application files
Install enterprise application files with the console
View deployment descriptors

 

Related

Enterprise application settings