A revision to clarify the EJB 3.2 spec section 15.5 ("Deployment
Descriptor and Annotation Processing") follows below:


--- subsection 15.5.1 ---

[This is intended to replace the paragraph at the beginning of section
15.5.1]

The metadata-complete attribute defines whether this deployment
descriptor and the related web service descriptor for this module, if
any, are complete, or whether the class files available to this module
and packaged with this application should be examined for annotations
that specify deployment information.  Deployment information, in this
sense, refers to any information that could have been specified by the
EJB and related web service deployment descriptors for this module.

If the value of the metadata-complete attribute is specified as
“true”, the deployment tool must ignore any annotations that specify
such deployment information in the class files packaged in the ejb-jar
file.  Such annotations must also be ignored in the class files that
are available to the EJB module according to section EE.8.5.2 of the
Java EE Platform specification ("Deploying a Java EE Application")
except for those class files that are available to another module for
which the metadata-complete attribute is not specified or whose value
is set to "false".

Note that a "true" value for the metadata-complete attribute does
*not* preempt the processing of *all* annotations, only those
listed below.

The annotations to which the metadata-complete attribute applies
consist of the following: [Include here the list appended further below.]

If the metadata-complete attribute is not specified or its value is
“false”, the deployment tool must examine the class files of the
application for such annotations.


Table 16 summarizes the requirements for determining when to process
annotations that specify deployment information on the classes in a
standalone ejb-jar file or an ejb-jar file packaged within an .ear
file. If the deployment descriptor is not included or is included but
does not specify metadata-complete as "true", the deployment tool must
process such annotations.

[In Table 16, the second item under "process annotations?" should
be modified as "No, except as indicated above"


--- rewrite of subsection 15.5.2 ---

Table 17 summarizes the requirements for determining when to process
annotations that specify deployment information on the enterprise bean
classes of a .war file. If the .war file contains an ejb-jar.xml file,
the deployment tool must process such annotations unless the
ejb-jar.xml specifies the value of the metadata-complete attribute as
"true". If the .war file does not contain an ejb-jar.xml file, the
deployment tool must process such annotations unless the web.xml
specifies the value of the metadata-complete attibute as "true" or its
version is prior to web-app_2_5.


---- Annotations covered by metadata-complete in ejb-jar.xml ------

The following are the annotations in javax.ejb.  All of these have
corresponding deployment descriptor metadata covered by the EJB xsd.

    javax.ejb.AccessTimeout
    javax.ejb.ActivationConfigProperty
    javax.ejb.AfterBegin
    javax.ejb.AfterCompletion
    javax.ejb.ApplicationException
    javax.ejb.Asynchronous
    javax.ejb.BeforeCompletion
    javax.ejb.ConcurrencyManagement
    javax.ejb.DependsOn
    javax.ejb.EJB
    javax.ejb.EJBs
    javax.ejb.Init
    javax.ejb.Lock
    javax.ejb.Local
    javax.ejb.LocalBean
    javax.ejb.LocalHome
    javax.ejb.MessageDriven
    javax.ejb.PostActivate
    javax.ejb.PrePassivate
    javax.ejb.Remote
    javax.ejb.RemoteHome
    javax.ejb.Remove
    javax.ejb.Schedule
    javax.ejb.Schedules
    javax.ejb.Singleton
    javax.ejb.Startup
    javax.ejb.Stateful
    javax.ejb.StatefulTimeout
    javax.ejb.Stateless
    javax.ejb.Timeout
    javax.ejb.TransactionAttribute
    javax.ejb.TransactionManagement

The following annotations from related packages are also covered
by the EJB descriptor.

  javax.annotation.PostConstruct
  javax.annotation.PreDestroy
  javax.annotation.Resource 
  javax.annotation.Resources
  javax.annotation.security.DeclareRoles
  javax.annotation.security.DenyAll
  javax.annotation.security.PermitAll
  javax.annotation.security.RolesAllowed
  javax.annotation.security.RunAs
  javax.annotation.sql.DataSourceDefinition
  javax.annotation.sql.DataSourceDefinitions

  javax.jms.JMSConnectionFactoryDefinition
  javax.jms.JMSConnectionFactoryDefinitions
  javax.jms.JMSDestinationDefinition
  javax.jms.JMSDestinationDefinitions

  javax.mail.MailSessionDefinition
  javax.mail.MailSessionDefinitions

  javax.interceptor.AroundConstruct
  javax.interceptor.AroundInvoke
  javax.interceptor.AroundTimeout
  javax.interceptor.ExcludeClassInterceptors
  javax.interceptor.ExcludeDefaultInterceptors
  javax.interceptor.Interceptors

  javax.jws.WebService
  javax.jws.WebMethod

  javax.persistence.PersistenceContext
  javax.persistence.PersistenceContexts
  javax.persistence.PersistenceUnit
  javax.persistence.PersistenceUnits

  javax.resource.AdministeredObjectDefinition
  javax.resource.AdministeredObjectDefinitions
  javax.resource.ConnectionFactoryDefinition
  javax.resource.ConnectionFactoryDefinitions

  javax.xml.ws.WebServiceRef
  javax.xml.ws.WebServiceRefs