Use the metadata-complete attribute for Java EE 5 modules without annotations

Java EE 5 supports the use of annotations to specify deployment information. 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:

The metadata-complete flag can be defined int the in the ejb-jar.xml or the web.xml deployment descriptor file.

For example, an EJB module deployment descriptor would define the metadata-complete attribute as:

<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee"
         http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd"
         version="3.0" metadata-complete="true">

</ejb-jar>

A web module deployment descriptor would define the metadata-complete attribute as:

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://java.sun.com/xml/ns/javaee"
         xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee"
         http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
         id="WebApp_ID" version="2.5" metadata-complete="true">

</web-app>

For additional information, see Metadata for module settings.