Use this page to instruct a Java Platform,
Enterprise Edition (Java EE) enterprise bean (EJB) or Web module deployment
descriptor to ignore annotations that specify deployment information.
To view this administrative console page, click . This page
is the same as the Metadata for modules page on the application installation
and update wizards.
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
Annotations are a standard mechanism of adding
metadata to Java classes. You can use metadata to simplify development
and deployment of Java EE 5 artifacts. Prior to the introduction of
Java language annotations, deployment descriptors were the standard
mechanism used by Java EE components. These deployment descriptors
were mapped to XML format, which facilitated their persistence. If
you select to lock deployment descriptors, the product 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:
- 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.
- 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.
- 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.
- 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.
Specifies whether to write the complete module deployment
descriptor, including deployment information from annotations, to
extensible markup language (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.
Avoid trouble: If your Java EE 5 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 you 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 application server, or by fully specifying the metadata in
the deployment descriptors.
gotcha
After you select a check box, you cannot deselect (clear) the check
box and the module is no longer shown in the list of modules on this
page. If you 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) |