1.1MR: Servlet 3 and EE 6 requirements6

svn path=/trunk/; revision=546
diff --git a/spec/chapters/applications.tex b/spec/chapters/applications.tex
index afbc38d..769b221 100644
--- a/spec/chapters/applications.tex
+++ b/spec/chapters/applications.tex
@@ -27,12 +27,13 @@
 An implementation that supports publication via JAX-WS MUST support \code{create\-Endpoint} with an endpoint type of \code{javax\-.xml\-.ws\-.Provider}. JAX-WS describes how a \code{Provider} based endpoint can be published in an SE environment.
 
 \subsection{Servlet}
+\label{servlet}
 
-A \jaxrs\ application is packaged as a Servlet in a \code{.war} file. The \code{Application} subclass (see section \ref{config}), resource classes, and providers are packaged in \code{WEB-INF/classes}, required libraries are packaged in \code{WEB-INF/lib}. Included libraries MAY also contain resource classes and providers as desired. See the Servlet specification for full details on packaging of web applications.
+A \jaxrs\ application is packaged as a Web application in a \code{.war} Þle. The \code{Application} subclass (see section \ref{config}), resource classes, and providers are packaged in \code{WEB-INF/classes}, required libraries are packaged in \code{WEB-INF/lib}. Included libraries MAY also contain resource classes and providers as desired. See the Servlet speciÞcation for full details on packaging of web applications.
 
-When using a \jaxrs\ aware servlet container, the \code{servlet-class} element of the \code{web.xml} descriptor SHOULD name the application-supplied subclass of \code{Application}.
+When using a Servlet 3 container, the \code{Application} subclass is optional. By default, all root resource classes and providers packaged in the web application MUST be included in the published JAX-RS application. An \code{Application} subclass MAY be included in a \code{.war} file to override the default behavior. If both \code{getClasses} and \code{getSingletons} return an empty list then the default set of classes MUST be used. It is RECOMMENDED that implementations support the Servlet 3 framework pluggability mechanism to enable portability between containers and to avail themselves of container-supplied class scanning facilities.
 
-When using a non-\jaxrs\ aware servlet container, the \code{servlet-class} element of the \code{web.xml} descriptor SHOULD name the \jaxrs\ implementation-supplied Servlet class. The application-supplied subclass of \code{Application} is identified using an \code{init-param} with a \code{param-name} of \code{javax\-.ws\-.rs\-.Application}.
+When using a non-\jaxrs\ aware servlet container, the \code{servlet-class} or \code{filter-class} element of the web.xml descriptor SHOULD name the JAX-RS implementation-supplied \code{Servlet} or \code{Filter} class respectively. The application-supplied subclass of \code{Application} is identiÞed using an \code{init-param} with a \code{param-name} of \code{javax\-.ws\-.rs\-.Application}.
 
 \subsection{Other Container}
 
diff --git a/spec/chapters/changes.tex b/spec/chapters/changes.tex
index 577517b..c7f1a35 100644
--- a/spec/chapters/changes.tex
+++ b/spec/chapters/changes.tex
@@ -1,5 +1,12 @@
 \chapter{Change Log}
 
+\section{Changes Since 1.0 Release}
+
+\begin{itemize}
+\item Section \ref{servlet}: new requirements for Servlet 3 containers.
+\item Section \ref{javaee}: requirements for Java EE 6 containers.
+\end{itemize}
+
 \section{Changes Since Proposed Final Draft}
 
 \begin{itemize}
diff --git a/spec/chapters/environment.tex b/spec/chapters/environment.tex
index 36a34bd..e60dfaa 100644
--- a/spec/chapters/environment.tex
+++ b/spec/chapters/environment.tex
@@ -11,13 +11,16 @@
 
 An injected \code{Http\-Servlet\-Response} allows a resource method to commit the HTTP response prior to returning. An implementation MUST check the committed status and only process the return value if the response is not yet committed.
 
-\section{Java EE Container (Non-normative)}
+\section{Java EE Container}
+\label{javaee}
 
-This section describes the additional features anticipated to be available to a \jaxrs\ application hosted in a Java EE 6 container. It is planned that \jaxrs\ will be finalized prior to Java EE 6 so the contents of this section are preliminary and subject to change. Nothing in this section should be considered a conformance requirement.
+This section describes the additional features available to an application hosted in a Java EE 6 container that supports \jaxrs.
 
-\jaxrs\ root resource classes and providers are supplied with the same resource injection capabilities as are provided for a Servlet instance running in a Java EE Web container. In particular the following annotations may be used according to their individual semantics: \code{@Resource}, \code{@Resources}, \code{@EJB}, \code{@EJBs}, \code{@Web\-Service\-Ref}, \code{@Web\-Service\-Refs}, \code{@Persistence\-Context}, \code{@Persistence\-Contexts}, \code{@Persistence\-Unit} and \code{@Persistence\-Units}.
+An implementation MUST support applications packaged as described in section \ref{servlet}. An implementation MUST support use of session beans as root resource classes and stateless session and singleton beans as providers in a Web application. \jaxrs\ annotations MAY be applied to a bean's local interface or directly to a no-interface bean.
 
-\jaxrs\ root resource classes and providers may also make use of the following JSR 250 lifecycle management and security annotations:  \code{@Post\-Construct}, \code{@Pre\-Destroy}, \code{@RunAs}, \code{@Roles\-Allowed}, \code{@Permit\-All}, \code{@Deny\-All} and \code{@Declare\-Roles}.
+\begin{note}The new \code{java:module} JNDI context enables easy lookup of a bean instance given a bean local interface or class name.\end{note}
+
+In a container that also includes support for JSR-299 (Contexts and Dependency Injection for Java), an implementation MUST support use of JSR-299 beans as root resource classes, providers and as \code{Application} subclasses in a Web application. \code{Provider} and \code{Application} classes MUST use application scope. \jaxrs\ annotations MAY be directly applied to JSR-299 beans and the \jaxrs\ implementation MUST the appropriate APIs to obtain bean instances that use JSR-299 facilities.
 
 \section{Other}