dev@javaserverfaces.java.net

Retroactive review: rename FacesAnnotationHandler* to DiscoveryHandler*

From: Ed Burns <Ed.Burns_at_Sun.COM>
Date: Fri, 31 Oct 2008 09:59:36 -0400

Issue: [121-JarOrdering]

I discussed this with Pete Muir from RedHat and we agreed this would be ok.

Considering that [121-JarOrdering] needs a pluggable classpath scanner,
I think this would make sense to add-on to the feature set of the
existing annotation-handler. However, doing so requires a rename, so I
chose discovery-handler.

All automated tests continue to run.


SECTION: Modified Files
----------------------------
M jsf-api/doc/web-facesconfig_2_0.xsd
M jsf-api/src/javax/faces/application/Application.java
M jsf-api/src/javax/faces/application/ApplicationWrapper.java
M jsf-ri/src/com/sun/faces/jsf-ri-config.xml
M jsf-ri/src/com/sun/faces/application/ApplicationImpl.java
M jsf-ri/src/com/sun/faces/application/annotation/AnnotationHandler.java
M jsf-ri/src/com/sun/faces/config/processor/ApplicationConfigProcessor.java


A + jsf-api/src/javax/faces/application/DiscoveryHandler.java
A + jsf-api/src/javax/faces/application/DiscoveryHandlerWrapper.java


D jsf-api/src/javax/faces/application/FacesAnnotationHandler.java
D jsf-api/src/javax/faces/application/FacesAnnotationHandlerWrapper.java


SECTION: Diffs
----------------------------
Index: jsf-api/doc/web-facesconfig_2_0.xsd
===================================================================
--- jsf-api/doc/web-facesconfig_2_0.xsd (revision 5649)
+++ jsf-api/doc/web-facesconfig_2_0.xsd (working copy)
@@ -327,7 +327,7 @@
                     </xsd:documentation>
                 </xsd:annotation>
             </xsd:element>
- <xsd:element name="annotation-handler"
+ <xsd:element name="discovery-handler"
                          type="javaee:fully-qualified-classType">
                 <xsd:annotation>
                     <xsd:documentation>
Index: jsf-api/src/javax/faces/application/Application.java
===================================================================
--- jsf-api/src/javax/faces/application/Application.java (revision 5649)
+++ jsf-api/src/javax/faces/application/Application.java (working copy)
@@ -172,7 +172,7 @@
      * @since 2.0
      */
     
- public FacesAnnotationHandler getFacesAnnotationHandler() {
+ public DiscoveryHandler getFacesAnnotationHandler() {
 
         if (defaultApplication != null) {
             return defaultApplication.getFacesAnnotationHandler();
@@ -188,7 +188,7 @@
      *
      * @since 2.0
      */
- public void setFacesAnnotationHandler(FacesAnnotationHandler newHandler) {
+ public void setFacesAnnotationHandler(DiscoveryHandler newHandler) {
         if (defaultApplication != null) {
             defaultApplication.setFacesAnnotationHandler(newHandler);
         } else {
Index: jsf-api/src/javax/faces/application/ApplicationWrapper.java
===================================================================
--- jsf-api/src/javax/faces/application/ApplicationWrapper.java (revision 5649)
+++ jsf-api/src/javax/faces/application/ApplicationWrapper.java (working copy)
@@ -164,7 +164,7 @@
     }
 
     @Override
- public FacesAnnotationHandler getFacesAnnotationHandler() {
+ public DiscoveryHandler getFacesAnnotationHandler() {
         return getWrapped().getFacesAnnotationHandler();
     }
 
@@ -204,7 +204,7 @@
     }
 
     @Override
- public void setFacesAnnotationHandler(FacesAnnotationHandler newHandler) {
+ public void setFacesAnnotationHandler(DiscoveryHandler newHandler) {
         getWrapped().setFacesAnnotationHandler(newHandler);
     }
 
Index: jsf-api/src/javax/faces/application/DiscoveryHandler.java
===================================================================
--- jsf-api/src/javax/faces/application/DiscoveryHandler.java (revision 5649)
+++ jsf-api/src/javax/faces/application/DiscoveryHandler.java (working copy)
@@ -44,88 +44,95 @@
 import javax.faces.context.FacesContext;
 
 /**
- * <p class="changed_added_2_0"><strong>FacesAnnotationHandler</strong>
- * is the run-time API by which all the startup time annotations defined
- * in JavaServer Faces are discovered and processed. For discussion,
- * the following algorithm is called the "startup time annotation
- * processing algorithm".</p>
+ * <p class="changed_added_2_0"><strong>DiscoveryHandler</strong> is the
+ * run-time API by which non-container-compatible discovery is
+ * performed. This includes:</p>
  *
  * <div class="changed_added_2_0">
+
+ * <ul>
  *
+ * <li><p>discovery and processing of all the startup time annotations
+ * defined in JavaServer Faces.</p></li>
+ *
+ * <li><p>discovery of resources on the classpath.</p></li>
+ *
+ * </ul>
+ *
+ * <p><strong>Usage</strong></p>
+ *
+ * <ul>
+ *
+ * <p>The specification for the usage of this class in the context of
+ * each of the above features follows.</p>
+ *
+ * <p><strong><a name="startupTimeAnnotationProcessingAlgorithm">Startup
+ * Time Annotation Processing Algorithm</a></strong></p>
+ *
  * <ul>
- *
+
  * <li><p>Call {_at_link #getClassNamesWithFacesAnnotations}, passing
- * the startup time {_at_link FacesContext}.</p></li>
+ * the startup time {_at_link FacesContext}.</p>
+
+ * </li>
  *
  * <li><p>Call {_at_link #processAnnotatedClasses}, passing the
  * startup time <code>FacesContext</code> and the result from
  * the previous step.</p></li>
  *
  * </ul>
+
+ * </ul>
  *
- * <p>If the <code>&lt;faces-config&gt;</code> element of the
- * application configuration resource file located at
- * <code>WEB-INF/faces-config.xml</code> contains a
- * <code>metadata-complete</code> attribute whose value is "true", the
- * "startup time annotation processing algorithm" must not be called.
- * Otherwise, the implementation must cause the "startup time annotation
- * processing algorithm" to be executed as early as possible at
- * application startup time. Because the
- * <code>FacesAnnotationHandler</code> is maintained as a decoratable
- * singleton on the {_at_link Application} instance, and is installed into
- * the runtime by nesting an <code>&lt;annotation-handler /&gt;</code>
- * element within the application configuration resources, the earliest
- * possible point this algorithm can be executed is after all of the
- * <code>&lt;application&gt;</code> elements from all of the application
- * configuration resources have been processed. The implementation must
- * guarantee that any conflicts between a constituent of the application
- * configuration resources and a constituent of the processed
- * annotations are resolved to favor the constituent in the application
- * configuration resources.</p>
- *
  * <p>The runtime must employ the decorator pattern as for every other
  * pluggable artifact in JSF.</p>
 
- * <p><em><a name="configAnnotationScanningSpecification">Algorithm for
- * scanning classes for configuration annotations</a></em></p>
-
- * <p>The following algorithm or one semantically equivalent to it must
- * be followed to scan the classes available to the application for the
- * presence of annotations that take the place of elements in the
- * application configuration resources. Each annotation for which this
- * algorithm applies will specifically reference this algorithm in its
- * javadoc.</p>
-
- * <ul>
-
- * <li><p>If the <code>&lt;faces-config&gt;</code> element in the
- * <code>WEB-INF/faces-config.xml</code> file contains
- * <code>metadata-complete</code> attribute whose value is
- * <code>"true"</code>, the implementation must not perform annotation
- * scanning on any classes except for those classes provided by the
- * implementation itself. Otherwise, continue as follows.</p></li>
-
- * <li><p>All classes in <code>WEB-INF/classes</code> must be scanned.</p></li>
-
- * <li><p>For every jar in the application's <code>WEB-INF/lib</code>
- * directory, if the jar contains a
- * <code>META-INF/faces-config.xml</code> file (even an empty one), all
- * classes in that jar must be scanned.</p></li>
  *
- * </ul>
-
- *
  * </div>
  *
  * @since 2.0
  */
-public abstract class FacesAnnotationHandler {
+public abstract class DiscoveryHandler {
 
     /**
      * <p class="changed_added_2_0">Return a set of strings where each
      * string is a fully qualified java class name that must be
      * inspected for the presence of startup time annotations.</p>
      *
+ * <div class="changed_added_2_0">
+
+ * <p><strong><a name="configAnnotationScanningSpecification">Algorithm for
+ * scanning classes for configuration annotations</a></strong></p>
+
+ * <p>The following algorithm or one semantically equivalent to it must
+ * be followed to scan the classes available to the application for the
+ * presence of annotations that take the place of elements in the
+ * application configuration resources. Each annotation for which this
+ * algorithm applies will specifically reference this algorithm in its
+ * javadoc.</p>
+
+ * <ul>
+
+ * <li><p>If the <code>&lt;faces-config&gt;</code> element in the
+ * <code>WEB-INF/faces-config.xml</code> file contains
+ * <code>metadata-complete</code> attribute whose value is
+ * <code>"true"</code>, the implementation must not perform annotation
+ * scanning on any classes except for those classes provided by the
+ * implementation itself. Otherwise, continue as follows.</p></li>
+
+ * <li><p>All classes in <code>WEB-INF/classes</code> must be
+ * scanned.</p></li>
+
+ * <li><p>For every jar in the application's <code>WEB-INF/lib</code>
+ * directory, if the jar contains a
+ * <code>META-INF/faces-config.xml</code> file (even an empty one), all
+ * classes in that jar must be scanned.</p></li>
+ *
+
+ * </ul>
+
+ * </div>
+
      * @param context the startup time <code>FacesContext</code>
      * for this application.
      *
@@ -138,7 +145,16 @@
      * from {_at_link #getClassNamesWithFacesAnnotations}, process each
      * class to look for and handle startup time annotations as
      * described in the javadoc for each annotation.</p>
+
+ * <div class="changed_added_2_0">
+
+ * <p>The implementation must guarantee that any conflicts between a
+ * constituent of the application configuration resources and a
+ * constituent of the processed annotations are resolved to favor
+ * the constituent in the application configuration resources.</p>
      *
+ * </div>
+
      * @param context the startup time <code>FacesContext</code>
      * for this application.
 
Index: jsf-api/src/javax/faces/application/DiscoveryHandlerWrapper.java
===================================================================
--- jsf-api/src/javax/faces/application/DiscoveryHandlerWrapper.java (revision 5649)
+++ jsf-api/src/javax/faces/application/DiscoveryHandlerWrapper.java (working copy)
@@ -42,11 +42,11 @@
 
 /**
  * <p class="changed_added_2_0">Provides a simple implementation of
- * {_at_link FacesAnnotationHandler} that can be subclassed by developers
+ * {_at_link DiscoveryHandler} that can be subclassed by developers
  * wishing to provide specialized behavior to an existing {_at_link
- * FacesAnnotationHandler} instance. The default implementation of all
+ * DiscoveryHandler} instance. The default implementation of all
  * methods is to call through to the wrapped {_at_link
- * FacesAnnotationHandler}.</p>
+ * DiscoveryHandler}.</p>
  *
  * <div class="changed_added_2_0">
  *
@@ -57,23 +57,23 @@
  *
  * @since 2.0
  */
-public abstract class FacesAnnotationHandlerWrapper
- extends FacesAnnotationHandler
- implements FacesWrapper<FacesAnnotationHandler> {
+public abstract class DiscoveryHandlerWrapper
+ extends DiscoveryHandler
+ implements FacesWrapper<DiscoveryHandler> {
 
     /**
      * @return the instance that we are wrapping.
      */
- public abstract FacesAnnotationHandler getWrapped();
+ public abstract DiscoveryHandler getWrapped();
 
 
- // ------------------------------------- Methods from FacesAnnotationHandler
+ // ------------------------------------- Methods from DiscoveryHandler
 
     /**
      * <p class="changed_added_2_0">The default behavior of this method
      * is to call {_at_link
- * FacesAnnotationHandler#getClassNamesWithFacesAnnotations}
- * on the wrapped {_at_link FacesAnnotationHandler} object.</p>
+ * DiscoveryHandler#getClassNamesWithFacesAnnotations}
+ * on the wrapped {_at_link DiscoveryHandler} object.</p>
      */
     @Override
     public Set<String> getClassNamesWithFacesAnnotations(FacesContext context) {
@@ -84,8 +84,8 @@
 
    /**
      * <p class="changed_added_2_0">The default behavior of this method
- * is to call {_at_link FacesAnnotationHandler#processAnnotatedClasses}
- * on the wrapped {_at_link FacesAnnotationHandler} object.</p>
+ * is to call {_at_link DiscoveryHandler#processAnnotatedClasses}
+ * on the wrapped {_at_link DiscoveryHandler} object.</p>
      */
     @Override
     public void processAnnotatedClasses(FacesContext context,
Index: jsf-api/src/javax/faces/application/FacesAnnotationHandler.java
===================================================================
--- jsf-api/src/javax/faces/application/FacesAnnotationHandler.java (revision 5649)
+++ jsf-api/src/javax/faces/application/FacesAnnotationHandler.java (working copy)
@@ -1,154 +0,0 @@
-/*
- * $Id: ConfigManager.java,v 1.24 2008/03/05 21:34:52 rlubke Exp $
- */
-
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
- *
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common Development
- * and Distribution License("CDDL") (collectively, the "License"). You
- * may not use this file except in compliance with the License. You can obtain
- * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
- * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
- * language governing permissions and limitations under the License.
- *
- * When distributing the software, include this License Header Notice in each
- * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
- * Sun designates this particular file as subject to the "Classpath" exception
- * as provided by Sun in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License
- * Header, with the fields enclosed by brackets [] replaced by your own
- * identifying information: "Portions Copyrighted [year]
- * [name of copyright owner]"
- *
- * Contributor(s):
- *
- * If you wish your version of this file to be governed by only the CDDL or
- * only the GPL Version 2, indicate your decision by adding "[Contributor]
- * elects to include this software in this distribution under the [CDDL or GPL
- * Version 2] license." If you don't indicate a single choice of license, a
- * recipient has the option to distribute your version of this file under
- * either the CDDL, the GPL Version 2 or to extend the choice of license to
- * its licensees as provided above. However, if you add GPL Version 2 code
- * and therefore, elected the GPL Version 2 license, then the option applies
- * only if the new code is made subject to such option by the copyright
- * holder.
- */
-
-package javax.faces.application;
-
-import java.util.Set;
-import javax.faces.context.FacesContext;
-
-/**
- * <p class="changed_added_2_0"><strong>FacesAnnotationHandler</strong>
- * is the run-time API by which all the startup time annotations defined
- * in JavaServer Faces are discovered and processed. For discussion,
- * the following algorithm is called the "startup time annotation
- * processing algorithm".</p>
- *
- * <div class="changed_added_2_0">
- *
- * <ul>
- *
- * <li><p>Call {_at_link #getClassNamesWithFacesAnnotations}, passing
- * the startup time {_at_link FacesContext}.</p></li>
- *
- * <li><p>Call {_at_link #processAnnotatedClasses}, passing the
- * startup time <code>FacesContext</code> and the result from
- * the previous step.</p></li>
- *
- * </ul>
- *
- * <p>If the <code>&lt;faces-config&gt;</code> element of the
- * application configuration resource file located at
- * <code>WEB-INF/faces-config.xml</code> contains a
- * <code>metadata-complete</code> attribute whose value is "true", the
- * "startup time annotation processing algorithm" must not be called.
- * Otherwise, the implementation must cause the "startup time annotation
- * processing algorithm" to be executed as early as possible at
- * application startup time. Because the
- * <code>FacesAnnotationHandler</code> is maintained as a decoratable
- * singleton on the {_at_link Application} instance, and is installed into
- * the runtime by nesting an <code>&lt;annotation-handler /&gt;</code>
- * element within the application configuration resources, the earliest
- * possible point this algorithm can be executed is after all of the
- * <code>&lt;application&gt;</code> elements from all of the application
- * configuration resources have been processed. The implementation must
- * guarantee that any conflicts between a constituent of the application
- * configuration resources and a constituent of the processed
- * annotations are resolved to favor the constituent in the application
- * configuration resources.</p>
- *
- * <p>The runtime must employ the decorator pattern as for every other
- * pluggable artifact in JSF.</p>
-
- * <p><em><a name="configAnnotationScanningSpecification">Algorithm for
- * scanning classes for configuration annotations</a></em></p>
-
- * <p>The following algorithm or one semantically equivalent to it must
- * be followed to scan the classes available to the application for the
- * presence of annotations that take the place of elements in the
- * application configuration resources. Each annotation for which this
- * algorithm applies will specifically reference this algorithm in its
- * javadoc.</p>
-
- * <ul>
-
- * <li><p>If the <code>&lt;faces-config&gt;</code> element in the
- * <code>WEB-INF/faces-config.xml</code> file contains
- * <code>metadata-complete</code> attribute whose value is
- * <code>"true"</code>, the implementation must not perform annotation
- * scanning on any classes except for those classes provided by the
- * implementation itself. Otherwise, continue as follows.</p></li>
-
- * <li><p>All classes in <code>WEB-INF/classes</code> must be scanned.</p></li>
-
- * <li><p>For every jar in the application's <code>WEB-INF/lib</code>
- * directory, if the jar contains a
- * <code>META-INF/faces-config.xml</code> file (even an empty one), all
- * classes in that jar must be scanned.</p></li>
- *
- * </ul>
-
- *
- * </div>
- *
- * @since 2.0
- */
-public abstract class FacesAnnotationHandler {
-
- /**
- * <p class="changed_added_2_0">Return a set of strings where each
- * string is a fully qualified java class name that must be
- * inspected for the presence of startup time annotations.</p>
- *
- * @param context the startup time <code>FacesContext</code>
- * for this application.
- *
- * @since 2.0
- */
- public abstract Set<String> getClassNamesWithFacesAnnotations(FacesContext context);
-
- /**
- * <p class="changed_added_2_0">Given the set of strings obtained
- * from {_at_link #getClassNamesWithFacesAnnotations}, process each
- * class to look for and handle startup time annotations as
- * described in the javadoc for each annotation.</p>
- *
- * @param context the startup time <code>FacesContext</code>
- * for this application.
-
- * @param annotatedClassnames the <code>Set&lt;String&gt;</code>
- * returned from <code>getClassNamesWithFacesAnnotations()</code>.
- *
- * @since 2.0
- */
- public abstract void processAnnotatedClasses(FacesContext context,
- Set<String> annotatedClassnames);
-
-
-}
Index: jsf-api/src/javax/faces/application/FacesAnnotationHandlerWrapper.java
===================================================================
--- jsf-api/src/javax/faces/application/FacesAnnotationHandlerWrapper.java (revision 5649)
+++ jsf-api/src/javax/faces/application/FacesAnnotationHandlerWrapper.java (working copy)
@@ -1,102 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
- *
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common Development
- * and Distribution License("CDDL") (collectively, the "License"). You
- * may not use this file except in compliance with the License. You can obtain
- * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
- * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
- * language governing permissions and limitations under the License.
- *
- * When distributing the software, include this License Header Notice in each
- * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
- * Sun designates this particular file as subject to the "Classpath" exception
- * as provided by Sun in the GPL Version 2 section of the License file that
- * accompanied this code. If applicable, add the following below the License
- * Header, with the fields enclosed by brackets [] replaced by your own
- * identifying information: "Portions Copyrighted [year]
- * [name of copyright owner]"
- *
- * Contributor(s):
- *
- * If you wish your version of this file to be governed by only the CDDL or
- * only the GPL Version 2, indicate your decision by adding "[Contributor]
- * elects to include this software in this distribution under the [CDDL or GPL
- * Version 2] license." If you don't indicate a single choice of license, a
- * recipient has the option to distribute your version of this file under
- * either the CDDL, the GPL Version 2 or to extend the choice of license to
- * its licensees as provided above. However, if you add GPL Version 2 code
- * and therefore, elected the GPL Version 2 license, then the option applies
- * only if the new code is made subject to such option by the copyright
- * holder.
- */
-
-package javax.faces.application;
-
-import java.util.Set;
-import javax.faces.FacesWrapper;
-import javax.faces.context.FacesContext;
-
-/**
- * <p class="changed_added_2_0">Provides a simple implementation of
- * {_at_link FacesAnnotationHandler} that can be subclassed by developers
- * wishing to provide specialized behavior to an existing {_at_link
- * FacesAnnotationHandler} instance. The default implementation of all
- * methods is to call through to the wrapped {_at_link
- * FacesAnnotationHandler}.</p>
- *
- * <div class="changed_added_2_0">
- *
- * <p>Usage: extend this class and override {_at_link #getWrapped} to
- * return the instance we are wrapping.</p>
- *
- * </div>
- *
- * @since 2.0
- */
-public abstract class FacesAnnotationHandlerWrapper
- extends FacesAnnotationHandler
- implements FacesWrapper<FacesAnnotationHandler> {
-
- /**
- * @return the instance that we are wrapping.
- */
- public abstract FacesAnnotationHandler getWrapped();
-
-
- // ------------------------------------- Methods from FacesAnnotationHandler
-
- /**
- * <p class="changed_added_2_0">The default behavior of this method
- * is to call {_at_link
- * FacesAnnotationHandler#getClassNamesWithFacesAnnotations}
- * on the wrapped {_at_link FacesAnnotationHandler} object.</p>
- */
- @Override
- public Set<String> getClassNamesWithFacesAnnotations(FacesContext context) {
-
- return getWrapped().getClassNamesWithFacesAnnotations(context);
-
- }
-
- /**
- * <p class="changed_added_2_0">The default behavior of this method
- * is to call {_at_link FacesAnnotationHandler#processAnnotatedClasses}
- * on the wrapped {_at_link FacesAnnotationHandler} object.</p>
- */
- @Override
- public void processAnnotatedClasses(FacesContext context,
- Set<String> annotatedClasses) {
-
- getWrapped().processAnnotatedClasses(context, annotatedClasses);
-
- }
-
-
-
-
-
-}
Index: jsf-ri/src/com/sun/faces/jsf-ri-config.xml
===================================================================
--- jsf-ri/src/com/sun/faces/jsf-ri-config.xml (revision 5649)
+++ jsf-ri/src/com/sun/faces/jsf-ri-config.xml (working copy)
@@ -80,9 +80,9 @@
     <resource-handler>
       com.sun.faces.application.resource.ResourceHandlerImpl
     </resource-handler>
- <annotation-handler>
+ <discovery-handler>
       com.sun.faces.application.annotation.AnnotationHandler
- </annotation-handler>
+ </discovery-handler>
     <system-event-listener>
         <system-event-listener-class>
             com.sun.faces.config.listeners.ProjectStagePhaseListenerInstallationListener
Index: jsf-ri/src/com/sun/faces/application/ApplicationImpl.java
===================================================================
--- jsf-ri/src/com/sun/faces/application/ApplicationImpl.java (revision 5649)
+++ jsf-ri/src/com/sun/faces/application/ApplicationImpl.java (working copy)
@@ -116,7 +116,7 @@
 import java.util.TimeZone;
 
 import javax.el.ValueExpression;
-import javax.faces.application.FacesAnnotationHandler;
+import javax.faces.application.DiscoveryHandler;
 import javax.faces.application.Resource;
 import javax.faces.webapp.pdl.PageDeclarationLanguage;
 
@@ -164,7 +164,7 @@
     private ProjectStage projectStage;
 
     private volatile ActionListener actionListener = null;
- private volatile FacesAnnotationHandler annotationHandler = null;
+ private volatile DiscoveryHandler annotationHandler = null;
     private volatile NavigationHandler navigationHandler = null;
     private volatile PropertyResolverImpl propertyResolver = null;
     private volatile VariableResolverImpl variableResolver = null;
@@ -544,7 +544,7 @@
      * @return
      */
     @Override
- public FacesAnnotationHandler getFacesAnnotationHandler() {
+ public DiscoveryHandler getFacesAnnotationHandler() {
 
         return annotationHandler;
 
@@ -552,10 +552,10 @@
 
 
     /**
- * @see javax.faces.application.Application#setFacesAnnotationHandler(javax.faces.application.FacesAnnotationHandler)
+ * @see javax.faces.application.Application#setFacesAnnotationHandler(javax.faces.application.DiscoveryHandler)
      */
     @Override
- public synchronized void setFacesAnnotationHandler(FacesAnnotationHandler newHandler) {
+ public synchronized void setFacesAnnotationHandler(DiscoveryHandler newHandler) {
 
         annotationHandler = newHandler;
         
Index: jsf-ri/src/com/sun/faces/application/annotation/AnnotationHandler.java
===================================================================
--- jsf-ri/src/com/sun/faces/application/annotation/AnnotationHandler.java (revision 5649)
+++ jsf-ri/src/com/sun/faces/application/annotation/AnnotationHandler.java (working copy)
@@ -43,7 +43,7 @@
 import java.util.logging.Logger;
 import java.util.logging.Level;
 
-import javax.faces.application.FacesAnnotationHandler;
+import javax.faces.application.DiscoveryHandler;
 import javax.faces.application.Application;
 import javax.faces.context.FacesContext;
 import javax.faces.event.SystemEventListener;
@@ -57,13 +57,13 @@
 
 /**
  * <p>
- * Default implementation of {_at_link FacesAnnotationHandler}. Note that this
+ * Default implementation of {_at_link DiscoveryHandler}. Note that this
  * implementation does not perform any search for annotated classes, but instead
  * relies on the scan results being pushed to the <code>ServletContext</code>
  * by {_at_link com.sun.faces.config.ConfigManager}.
  * </p>
  */
-public class AnnotationHandler extends FacesAnnotationHandler implements SystemEventListener {
+public class AnnotationHandler extends DiscoveryHandler implements SystemEventListener {
 
     private static final Logger LOGGER = FacesLogger.APPLICATION.getLogger();
 
@@ -110,11 +110,11 @@
 
 
 
- // ------------------------------------- Methods from FacesAnnotationHandler
+ // ------------------------------------- Methods from DiscoveryHandler
 
 
     /**
- * @see javax.faces.application.FacesAnnotationHandler#getClassNamesWithFacesAnnotations(javax.faces.context.FacesContext)
+ * @see javax.faces.application.DiscoveryHandler#getClassNamesWithFacesAnnotations(javax.faces.context.FacesContext)
      */
     public Set<String> getClassNamesWithFacesAnnotations(FacesContext context) {
 
@@ -127,7 +127,7 @@
 
 
     /**
- * @see javax.faces.application.FacesAnnotationHandler#processAnnotatedClasses(javax.faces.context.FacesContext, java.util.Set)
+ * @see javax.faces.application.DiscoveryHandler#processAnnotatedClasses(javax.faces.context.FacesContext, java.util.Set)
      */
     public void processAnnotatedClasses(FacesContext context,
                                         Set<String> annotatedClassnames) {
Index: jsf-ri/src/com/sun/faces/config/processor/ApplicationConfigProcessor.java
===================================================================
--- jsf-ri/src/com/sun/faces/config/processor/ApplicationConfigProcessor.java (revision 5649)
+++ jsf-ri/src/com/sun/faces/config/processor/ApplicationConfigProcessor.java (working copy)
@@ -57,7 +57,7 @@
 import javax.faces.application.ResourceHandler;
 import javax.faces.application.StateManager;
 import javax.faces.application.ViewHandler;
-import javax.faces.application.FacesAnnotationHandler;
+import javax.faces.application.DiscoveryHandler;
 import javax.faces.context.FacesContext;
 import javax.faces.el.PropertyResolver;
 import javax.faces.el.VariableResolver;
@@ -138,10 +138,10 @@
          = "resource-handler";
 
     /**
- * <code>/faces-config/application/annotation-handler</code>
+ * <code>/faces-config/application/discovery-handler</code>
      */
- private static final String ANNOTATION_HANDLER =
- "annotation-handler";
+ private static final String DISCOVERY_HANDLER =
+ "discovery-handler";
 
     /**
      * <code>/faces-config/application/el-resolver</code>
@@ -295,7 +295,7 @@
                                 setResourceHandler(app, n);
                             } else if (SYSTEM_EVENT_LISTENER.equals(n.getLocalName())) {
                                 addSystemEventListener(app, n);
- } else if (ANNOTATION_HANDLER.equals(n.getLocalName())) {
+ } else if (DISCOVERY_HANDLER.equals(n.getLocalName())) {
                                 setAnnotationHandler(app, n);
                             }
                         }
@@ -308,7 +308,7 @@
 
         // all application level artifacts are in place, process any annotated
         // components that have been found
- FacesAnnotationHandler handler = getApplication().getFacesAnnotationHandler();
+ DiscoveryHandler handler = getApplication().getFacesAnnotationHandler();
         FacesContext ctx = FacesContext.getCurrentInstance();
         handler.processAnnotatedClasses(ctx, handler.getClassNamesWithFacesAnnotations(ctx));
 
@@ -773,7 +773,7 @@
             String handler = getNodeText(annotationHandler);
             if (handler != null) {
                 Object instance = createInstance(handler,
- FacesAnnotationHandler.class,
+ DiscoveryHandler.class,
                                                  application.getResourceHandler(),
                                                  annotationHandler);
                 if (instance != null) {
@@ -783,7 +783,7 @@
                                         "Calling Application.setAnnotationHandler({0})",
                                         handler));
                     }
- application.setFacesAnnotationHandler((FacesAnnotationHandler) instance);
+ application.setFacesAnnotationHandler((DiscoveryHandler) instance);
                 }
             }
         }


--