dev@javaserverfaces.java.net

[REVIEW] New configuration and managed bean code

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Thu, 19 Apr 2007 12:25:37 -0700

Change bundle and new source files are attached.

Looking for any/all feedback ;)





This change bundle addresses, directly or indirectly, the following issues:

   398 - https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=398
   409 - https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=409
   539 - https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=539
   540 - https://javaserverfaces.dev.java.net/issues/show_bug.cgi?id=540
   
This new code passes:
   - RI unit tests
   - demo unit tests
   - JSF 1.2 TCK

I've tested this against Trinidad and Woodstock as was as the GlassFish
admin application.

Overview
-----------------------------------------------------------------------
The primary purpose of this change bundle to to remove our dependencies
on Jakarta commons code in favor of APIs found in SE5.

To that end, digester has been replaced with the use of DOM. Some concerns
have been expressed about possible performance issues with this choice, but so
far, parsing a document into a Document object has been at least twice as fast
as the same document being parsed by Digester.

We were using commons-beanutils in the ManagedBeanFactoryImpl code to set properties
etc. The new code uses bean introspection to obtain an interaction point with
managed bean properties

The managed bean facility was completely rewritten with the goal of making the
runtime profile as small as possible. The old managed bean code would perform
the same validation (property types, property is readable, etc) each time the
bean was created. This type of action could be performed once. So the new managed
bean code has a concept of 'baking'. Either during startup, or the first time
the bean is loaded (depending on a new configuration option), all related bean classes
will be loaded, and the bean will be validated agains the requirements put forth
by the specification. If the bean is valid, then all of the preloaded information
will be used to create the bean at runtime.

See the javadocs for all the new source files in newfiles.zip for additional
details.

TODO
-----------------------------------------------------------------------

Items remaining TODO:
  - Figure out how to find and register custom ConfigurationResourceProvider
    implementations. The idea behind this SPI is to allow a pluggable way
    to return URLs to faces-config files from non-standard locations. This
    feature was started per a private discussion between myself and representatives
    from OSGI. Right now, the SPI is in place, but that's about it.
    
  - There are still dependencies on commons-digester in jsf-tools and in
    one of the navigation tests. These need to be phased out in favor
    of using standard APIs.
    
  - Commons-beanutils is still used in the API tests. This will need to be addressed
    at a later date.
    
  - Implement a feature to expose the result of parsing all resources in the form
    of a merged DOM which application developers may make use of (originally I had
    thought of just pushing an array of DOMs that developers could sift through, but
    it was pointed out that a merged dom would be more useful)
    
  - The verifyObjects feature is currently a no-op. It needs to be reimplemented
    witin the ConfigProcessor code.
    
  - Re-enable xml document validation
  
  - Replace use of Logger directly in RI classes with FacesLogger
  
    
I will be logging new TASKS in the issue tracker for the above items after this code
has been approved and committed.

NEW PACKAGES
-----------------------------------------------------
package com.sun.faces.config.configprovider
  - the classes here are implementations of com.sun.faces.spi.ConfigurationResourceProvider.
    These provide one or more URLs to faces-config resources that will need to be
    parsed.
    
package com.sun.faces.config.processor
  - these classes are the new config/bootstrap code. Each class handles specifc
    sections of a config file (i.e. one processor for factory elements, another for
    components, etc).
    
package com.sun.faces.mgbean
  - these classes are the new managed bean facililty.
    
   

SECTION: Modified Files
----------------------------
M build-tests.xml
  - commented out the config file test case for now;
    there is no direct translation with the new code
    
M build.xml
  - exclude the com.sun.commons classes from being
    packaged in jsf-impl.jar. The runtime code
    has no dependencies on commons now
    
M src/com/sun/faces/LogStrings.properties
  - new logging messages for old pending i18n comments
  
M src/com/sun/faces/RIConstants.java
  - removed scope and implicit object names from RIConstants
    and moved them to ELUtils
    
M src/com/sun/faces/jsf-ri-config.xml
  - added the JavaScript resource PL to the RI config
    resource. If the option isn't enabled, the PL
    will be ignored by the config code
    
M src/com/sun/faces/application/ApplicationAssociate.java
  - removed all references to ManagedBeanFactory/Impl and
    the associated methods in ApplicationAssociate that
    dealt with managed beans.
  - Application resource bundles are now represented by
    the ApplicationResourceBundle object
    
M src/com/sun/faces/application/ConfigNavigationCase.java
  - added a new ctor to ConfigNavigationCase with parameters
    for all relevant information
    
M src/com/sun/faces/application/WebappLifecycleListener.java
  - We use BeanManager to call the @PreDestroy callbacks on
    managed beans
    
M src/com/sun/faces/config/ConfigureListener.java
  - Removed all the old config code
  
M src/com/sun/faces/config/WebConfiguration.java
  - Added a new configuration option 'com.sun.faces.enableLazyBeanValidation'
    With the new managed bean infrastructure, a lot of the validation required
    by the specification now only happens once. The config option above
    determines when this validation occurs. By default, it will occur
    the first time the bean is requsted. If disabled, then validation
    will occur at startup (which means startup will be slower, but with no
    runtime impact)
    
M src/com/sun/faces/el/ELUtils.java
  - Moved EL utility methods from ManagedBeanFactory impl to here.
    These are leveraged by the new ManagedBean facility, but may
    only be temporary. Some ideas have been proposed on eliminating
    static parsing of expression strings.
    
M src/com/sun/faces/el/FacesResourceBundleELResolver.java
 - Leverage the new ApplicationResourceBundle
 
M src/com/sun/faces/el/ManagedBeanELResolver.java
 - Leverage the managed bean facility.
 - Additionally, reduce the number of map hits.
    * check to see of the property is a managed bean, if it
      is get the scope and search the map it should be found in.
      
M src/com/sun/faces/lifecycle/LifecycleImpl.java
 - clean up the timing logging using the new Timer class
 
M src/com/sun/faces/spi/ManagedBeanFactory.java
 - this is Deprecated and as of now, has no equivalent SPI.
 
M src/com/sun/faces/util/MessageUtils.java
 - added constants for new messages added
 
M src/javax/faces/Messages.properties
M src/javax/faces/Messages_de.properties
M src/javax/faces/Messages_en.properties
M src/javax/faces/Messages_es.properties
M src/javax/faces/Messages_fr.properties
 - new messages, particularly in the managed bean area. The
   new code gives consise messages when problems are found with
   managed beans instead of a generic 'failed to instatiate' message
   we had with the old code
   
M systest-per-webapp/replace-application/src/java/com/sun/faces/systest/ReplaceApplicationTestCase.java
M systest-per-webapp/replace-application/web/test.jsp
M systest-per-webapp/replace-application/web/WEB-INF/web.xml
  - commented out/removed the use of the ManagedBeanFactory SPI
  
M test/com/sun/faces/config/TestManagedBeanFactory.java
 - Kept the same name, but this in fact test the new managed bean code
 
M test/com/sun/faces/el/TestValueBindingImpl.java
M test/com/sun/faces/el/TestValueExpressionImpl.java
M test/com/sun/faces/el/TestVariableResolverImpl.java
M test/com/sun/faces/lifecycle/TestUpdateModelValuesPhase.java
M test/com/sun/faces/renderkit/html_basic/TestRenderers_1.java
M test/com/sun/faces/renderkit/html_basic/TestRenderers_2.java
 - test updates based on internal api changes
 
M test/com/sun/faces/util/TestUtil_messages.java
 - test the new messages


A src/com/sun/faces/application/ApplicationResourceBundle.java
 - represents application-level resource bundles

A src/com/sun/faces/config/ConfigManager.java
 - primary point for bootstrapping a JSF application from configuration
   resources
 
A src/com/sun/faces/config/ConfigurationException.java
 - thrown if an error occurs during configuration processing
 
A src/com/sun/faces/config/DbfFactory.java
 - Factory to create and return DocumentBuilderFactories
 
A src/com/sun/faces/config/configprovider/MetaInfResourceProvider.java
 - returns one or more URLs for faces-config documents found
   in the META-INF directory of JAR files
   
A src/com/sun/faces/config/configprovider/RIConfigResourceProvider.java
 - returns a URL to the RI config resource
 
A src/com/sun/faces/config/configprovider/WebResourceProvider.java
 - returns a URL to one or more config resources that can
   be found in a web application

A src/com/sun/faces/config/processor/AbstractConfigProcessor.java
 - base ConfigProcessor - provides common functionality
 
A src/com/sun/faces/config/processor/ApplicationConfigProcessor.java
 - process all children of the application element
 
A src/com/sun/faces/config/processor/ComponentConfigProcessor.java
 - process all children of the component element
 
A src/com/sun/faces/config/processor/ConfigProcessor.java
 - ConfigProcessor interface
 
A src/com/sun/faces/config/processor/ConverterConfigProcessor.java
 - process all children of the converter element
 
A src/com/sun/faces/config/processor/FactoryConfigProcessor.java
 - process all children of the factory element
 
A src/com/sun/faces/config/processor/LifecycleConfigProcessor.java
 - process all chilren of the lifecycle element
 
A src/com/sun/faces/config/processor/ManagedBeanConfigProcessor.java
 - process all children of all managed-bean elements
 
A src/com/sun/faces/config/processor/NavigationConfigProcessor.java
 - process navigation rules
 
A src/com/sun/faces/config/processor/RenderKitConfigProcessor.java
 - process renderkits
 
A src/com/sun/faces/config/processor/ValidatorConfigProcessor.java
 - process validators
 
A src/com/sun/faces/mgbean/BeanBuilder.java
 - base class for building managed beans
 
A src/com/sun/faces/mgbean/BeanManager.java
 - object to register/create managed beans
 
A src/com/sun/faces/mgbean/ErrorBean.java
 - if a bean type cannot be determined, this bean
   will be used. Any error messages associated with
   this bean will be displayed when it is requested
   
A src/com/sun/faces/mgbean/ManagedBeanBuilder.java
 - concrete beanbuilder for a typical managed bean
 
A src/com/sun/faces/mgbean/ManagedBeanCreationException.java
 - thrown if there is some issue creating a managed bean at runtime
 
A src/com/sun/faces/mgbean/ManagedBeanInfo.java
 - This class contains the parsed data from the configuration
   resources
   
A src/com/sun/faces/mgbean/ManagedBeanPreProcessingException.java
 - if there is an exception performing static validation on a
   managed bean
   
A src/com/sun/faces/mgbean/ManagedListBeanBuilder.java
 - represents managed beans that are List instances
 
A src/com/sun/faces/mgbean/ManagedMapBeanBuilder.java
 - represents managed beans that are Map instances
 
A src/com/sun/faces/spi/ConfigurationResourceProvider.java
 - described above or see the docs
 
A src/com/sun/faces/util/FacesLogger.java
 - a utility Logger that internalizes all of the Logger.isLoggable() calls.
   It also uses an enum to describe all available loggers. Existing RI
   code needs to be updated to use FacesLogger
   
A src/com/sun/faces/util/Timer.java
 - A simple class to provide times for execution of certain methods
   (e.g. lifecycle processing, document parsing, startup time, etc)


SECTION: Diffs
----------------------------
Index: build-tests.xml
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/build-tests.xml,v
retrieving revision 1.242
diff -u -r1.242 build-tests.xml
--- build-tests.xml 28 Feb 2007 05:32:07 -0000 1.242
+++ build-tests.xml 11 Apr 2007 21:22:47 -0000
@@ -160,13 +160,15 @@
               token="@serialVersionUID@"
               value="7410146713650507654L"/>
         <jsf.javac srcdir="${src.test.dir}"
- destdir="${out.test.dir}/classes">
+ destdir="${out.test.dir}/classes"
+ excludes="**/ConfigFileTestCase.java">
             <classpath>
                 <path refid="test.compile.classpath"/>
             </classpath>
         </jsf.javac>
         <jsf.javac srcdir="${out.test.dir}/classes"
- destdir="${out.test.dir}/classes">
+ destdir="${out.test.dir}/classes"
+ excludes="**/ConfigFileTestCase.java">
             <classpath>
                 <path refid="test.compile.classpath"/>
             </classpath>
@@ -280,8 +282,10 @@
                       name="com.sun.faces.application.TestStateManagerImpl"/>
                 <test todir="${impl.test.results.dir}"
                     name="com.sun.faces.application.TestViewHandlerImpl"/>
+ <!--
                 <test todir="${impl.test.results.dir}"
                       name="com.sun.faces.config.ConfigFileTestCase"/>
+ -->
                 <test todir="${impl.test.results.dir}"
                       name="com.sun.faces.config.TestConfigListener"/>
                 <test todir="${impl.test.results.dir}"
@@ -420,7 +424,9 @@
                              com/sun/faces/config/TestConverter.java,
                              com/sun/faces/config/TestRenderer.java,
                              com/sun/faces/config/TestValidator.java,
- com/sun/faces/mock/*.java">
+ com/sun/faces/mock/*.java"
+ excludes="com/sun/faces/config/ConfigFileTestCase.java">
+
             <classpath>
                 <path refid="test.compile.classpath"/>
                 
Index: build.xml
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/build.xml,v
retrieving revision 1.222
diff -u -r1.222 build.xml
--- build.xml 8 Feb 2007 21:06:55 -0000 1.222
+++ build.xml 17 Apr 2007 21:45:39 -0000
@@ -203,10 +203,10 @@
                 <enable/>
             </assertions>
         </generateTaglib>
-
+ <!--
         <copy todir="${build.generate.dir}">
 
- <!-- Copy the configuration processing classes -->
+
             <fileset dir="${tools.dir}/src">
                 <include name="com/sun/faces/config/DigesterFactory.java"/>
                 <include name="com/sun/faces/config/beans/*.java"/>
@@ -215,6 +215,8 @@
             </fileset>
            
         </copy>
+ -->
+
 
         <touch file="${build.generate.dir}/last-taglib-generation"/>
         
@@ -227,7 +229,8 @@
 
         <!-- Run javac through everything -->
         <jsf.javac srcdir="${source.dir}:${build.generate.dir}"
- destdir="${build.classes.dir}">
+ destdir="${build.classes.dir}"
+ excludes="**/ManagedBeanFactoryImpl.java">
             <classpath>
                 <path refid="impl.compile.classpath"/>
             </classpath>
@@ -235,7 +238,7 @@
 
         <copy todir="${build.classes.dir}">
             <fileset dir="${source.dir}" includes="**/*.properties,**/*.js"/>
- <fileset dir="${tools.dir}/src" includes="**/*.properties"/>
+ <!--<fileset dir="${tools.dir}/src" includes="**/*.properties"/>-->
         </copy>
         
         <!-- Massage the version number into LogStrings.properties -->
@@ -401,14 +404,16 @@
     -->
 
     <target name="jars" depends="compile">
+ <!--
         <unjar dest="${build.classes.dir}">
             <fileset dir="${dependency.jar.dir}"
                      includes="com-sun-commons*.jar"/>
         </unjar>
+ -->
         <jsf.manifested.jar jarfile="${build.dir}/lib/${name}.jar"
                             basedir="${build.classes.dir}"
                             extension-name="com.sun.faces"/>
- <delete dir="${build.classes.dir}/com/sun/org"/>
+ <!--<delete dir="${build.classes.dir}/com/sun/org"/>-->
     </target>
 
     <target name="main" depends="update,jars"/>
@@ -419,6 +424,7 @@
               out="merged.xml"
               style="conf/xslt/merge-config.xsl">
         </xslt>
+ <copy file="merged.xml" tofile="test-merged.xml"/>
         <replace file="${basedir}/merged.xml">
             <replacetoken><![CDATA[xmlns:jsf="http://java.sun.com/xml/ns/javaee"]]></replacetoken>
             <replacevalue><![CDATA[]]></replacevalue>
Index: src/com/sun/faces/LogStrings.properties
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/LogStrings.properties,v
retrieving revision 1.30
diff -u -r1.30 LogStrings.properties
--- src/com/sun/faces/LogStrings.properties 3 Apr 2007 18:25:17 -0000 1.30
+++ src/com/sun/faces/LogStrings.properties 13 Apr 2007 00:18:18 -0000
@@ -84,4 +84,6 @@
 jsf.spi.serialization.provider.entry_not_discoverable=JSF1051: Service entry ''{0}'' does not extend DiscoverableInjectionProvider. Entry will be ignored.
 jsf.spi.serialization.provider.cannot_read_service=JSF1052: Unexpected error processing service entry 'com.sun.faces.spi.injectionprovider'.
 jsf.lifecycle.phaselistener.exception=JSF1053: (Listener: {0}, Phase ID: {1}, View ID: {2}) Exception thrown during phase-listener execution: {3}
-jsf.lifecycle.phase.exception=JSF1054: (Phase ID: {0}, View ID: {1}) Exception thrown during phase execution: {2}
\ No newline at end of file
+jsf.lifecycle.phase.exception=JSF1054: (Phase ID: {0}, View ID: {1}) Exception thrown during phase execution: {2}
+jsf.config.cannot_resolve_entities=JSF1055: Unable to locate local resource ''{0}''. Standard entity resolution will be used when a request is present for ''{1}''.
+jsf.config.cannot_create_inputsource=JSF1056: Unable to create InputSource for URL ''{0}''.
\ No newline at end of file
Index: src/com/sun/faces/RIConstants.java
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/RIConstants.java,v
retrieving revision 1.90
diff -u -r1.90 RIConstants.java
--- src/com/sun/faces/RIConstants.java 20 Sep 2006 17:50:20 -0000 1.90
+++ src/com/sun/faces/RIConstants.java 22 Mar 2007 20:05:14 -0000
@@ -78,22 +78,6 @@
     public static final String CLIENT_ID_MESSAGES_NOT_DISPLAYED = FACES_PREFIX +
             "clientIdMessagesNotDisplayed";
 
- public static final String APPLICATION = "application";
- public static final String APPLICATION_SCOPE = "applicationScope";
- public static final String SESSION = "session";
- public static final String SESSION_SCOPE = "sessionScope";
- public static final String REQUEST = "request";
- public static final String REQUEST_SCOPE = "requestScope";
- public static final String NONE = "NONE";
- public static final String COOKIE_IMPLICIT_OBJ = "cookie";
- public static final String FACES_CONTEXT_IMPLICIT_OBJ = "facesContext";
- public static final String HEADER_IMPLICIT_OBJ = "header";
- public static final String HEADER_VALUES_IMPLICIT_OBJ = "headerValues";
- public static final String INIT_PARAM_IMPLICIT_OBJ = "initParam";
- public static final String PARAM_IMPLICIT_OBJ = "param";
- public static final String PARAM_VALUES_IMPLICIT_OBJ = "paramValues";
- public static final String VIEW_IMPLICIT_OBJ = "view";
-
     /*
      * <p>TLV Resource Bundle Location </p>
      */
Index: src/com/sun/faces/jsf-ri-config.xml
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/jsf-ri-config.xml,v
retrieving revision 1.71
diff -u -r1.71 jsf-ri-config.xml
--- src/com/sun/faces/jsf-ri-config.xml 18 Oct 2006 17:11:57 -0000 1.71
+++ src/com/sun/faces/jsf-ri-config.xml 10 Apr 2007 20:09:46 -0000
@@ -169,7 +169,8 @@
     
     <!-- Add our implementation specific PhaseListeners -->
     <lifecycle>
- <phase-listener>com.sun.faces.lifecycle.ELResolverInitPhaseListener</phase-listener>
+ <phase-listener>com.sun.faces.lifecycle.ELResolverInitPhaseListener</phase-listener>
+ <phase-listener>com.sun.faces.renderkit.JsfJsResourcePhaseListener</phase-listener>
     </lifecycle>
 
   <!-- Configure Standard Validators -->
Index: src/com/sun/faces/application/ApplicationAssociate.java
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/application/ApplicationAssociate.java,v
retrieving revision 1.44
diff -u -r1.44 ApplicationAssociate.java
--- src/com/sun/faces/application/ApplicationAssociate.java 21 Mar 2007 18:04:07 -0000 1.44
+++ src/com/sun/faces/application/ApplicationAssociate.java 17 Apr 2007 17:18:55 -0000
@@ -30,27 +30,22 @@
 package com.sun.faces.application;
 
 import com.sun.faces.RIConstants;
-import com.sun.faces.config.beans.ResourceBundleBean;
+import com.sun.faces.config.WebConfiguration;
+import com.sun.faces.mgbean.BeanManager;
 import com.sun.faces.spi.InjectionProvider;
-import com.sun.faces.spi.InjectionProviderException;
 import com.sun.faces.spi.InjectionProviderFactory;
-import com.sun.faces.spi.ManagedBeanFactory;
-import com.sun.faces.spi.ManagedBeanFactory.Scope;
 import com.sun.faces.util.MessageUtils;
 import com.sun.faces.util.Util;
 
 import javax.el.CompositeELResolver;
 import javax.el.ELResolver;
 import javax.el.ExpressionFactory;
-import javax.faces.FacesException;
 import javax.faces.component.UIViewRoot;
 import javax.faces.context.ExternalContext;
 import javax.faces.context.FacesContext;
 import javax.faces.el.PropertyResolver;
 import javax.faces.el.VariableResolver;
 import javax.servlet.ServletContext;
-
-import java.text.MessageFormat;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
@@ -60,7 +55,6 @@
 import java.util.Map;
 import java.util.ResourceBundle;
 import java.util.TreeSet;
-import java.util.logging.Level;
 import java.util.logging.Logger;
 
 /**
@@ -85,11 +79,7 @@
 
     private ApplicationImpl app = null;
 
- //
- // This map stores "managed bean name" | "managed bean factory"
- // mappings.
- //
- private Map<String, ManagedBeanFactory> managedBeanFactoriesMap = null;
+
 
 
     /**
@@ -143,6 +133,8 @@
     private String contextName;
     private boolean requestServiced;
 
+ private BeanManager beanManager;
+
     public ApplicationAssociate(ApplicationImpl appImpl) {
         app = appImpl;
 
@@ -162,11 +154,13 @@
              appImpl);
         externalContext.getApplicationMap().put(ASSOCIATE_KEY, this);
         //noinspection CollectionWithoutInitialCapacity
- managedBeanFactoriesMap = new HashMap<String, ManagedBeanFactory>();
- //noinspection CollectionWithoutInitialCapacity
         caseListMap = new HashMap<String, List<ConfigNavigationCase>>();
         wildcardMatchList = new TreeSet<String>(new SortIt());
         injectionProvider = InjectionProviderFactory.createInstance(externalContext);
+ WebConfiguration webConfig = WebConfiguration.getInstance(externalContext);
+ beanManager = new BeanManager(injectionProvider,
+ webConfig.getBooleanContextInitParameter(
+ WebConfiguration.BooleanWebContextInitParameter.EnableLazyBeanValidation));
     }
 
     public static ApplicationAssociate getInstance(ExternalContext
@@ -220,6 +214,11 @@
         applicationMap.remove(ASSOCIATE_KEY);
     }
 
+
+ public BeanManager getBeanManager() {
+ return beanManager;
+ }
+
     /**
      * This method is called by <code>ConfigureListener</code> and will
      * contain any <code>VariableResolvers</code> defined within
@@ -427,7 +426,8 @@
 
     public ResourceBundle getResourceBundle(FacesContext context,
                                             String var) {
- if (!resourceBundles.containsKey(var)) {
+ ApplicationResourceBundle bundle = resourceBundles.get(var);
+ if (bundle == null) {
             return null;
         }
         UIViewRoot root;
@@ -444,21 +444,9 @@
             }
         }
         assert (null != locale);
- ResourceBundleBean bean = resourceBundles.get(var);
- ResourceBundle result = null;
-
- if (null != bean) {
- String baseName = bean.getBasename();
- if (null != baseName) {
- result =
- ResourceBundle.getBundle(baseName,
- locale,
- Thread.currentThread().
- getContextClassLoader());
- }
- }
- // PENDING(edburns): should cache these based on var/Locale pair for performance
- return result;
+ //ResourceBundleBean bean = resourceBundles.get(var);
+ return bundle.getResourceBundle(locale);
+
     }
 
     /**
@@ -468,133 +456,17 @@
      */
 
     @SuppressWarnings({"CollectionWithoutInitialCapacity"})
- Map<String, ResourceBundleBean> resourceBundles = new HashMap<String, ResourceBundleBean>();
+ Map<String, ApplicationResourceBundle> resourceBundles =
+ new HashMap<String, ApplicationResourceBundle>();
 
- public void addResourceBundleBean(String var, ResourceBundleBean bean) {
- resourceBundles.put(var, bean);
+ public void addResourceBundle(String var, ApplicationResourceBundle bundle) {
+ resourceBundles.put(var, bundle);
     }
 
- public Map<String, ResourceBundleBean> getResourceBundleBeanMap() {
+ public Map<String, ApplicationResourceBundle> getResourceBundles() {
         return resourceBundles;
     }
 
- /**
- * <p>Adds a new mapping of managed bean name to a managed bean
- * factory instance.</p>
- *
- * @param managedBeanName the name of the managed bean that will
- * be created by the managed bean factory instance.
- * @param factory the managed bean factory instance.
- */
- synchronized public void addManagedBeanFactory(String managedBeanName,
- ManagedBeanFactory factory) {
- managedBeanFactoriesMap.put(managedBeanName, factory);
- factory.setManagedBeanFactoryMap(managedBeanFactoriesMap);
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, MessageFormat.format("Added managedBeanFactory {0} for {1}",
- factory,
- managedBeanName));
- }
- }
-
- public Map<String, ManagedBeanFactory> getManagedBeanFactoryMap() {
- return managedBeanFactoriesMap;
- }
-
-
- /**
- * <p>The managedBeanFactories HashMap has been populated
- * with ManagedBeanFactoryImpl object keyed by the bean name.
- * Find the ManagedBeanFactoryImpl object and if it exists instantiate
- * the bean and store it in the appropriate scope, if any.</p>
- *
- * @param context The Faces context.
- * @param managedBeanName The name identifying the managed bean.
- * @return The managed bean.
- * @throws FacesException if the managed bean
- * could not be created.
- */
- public Object createAndMaybeStoreManagedBeans(FacesContext context,
- String managedBeanName) throws FacesException {
- ManagedBeanFactory managedBean = managedBeanFactoriesMap.get(managedBeanName);
- if (managedBean == null) {
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.fine("Couldn't find a factory for " + managedBeanName);
- }
- return null;
- }
-
- Object bean;
- Scope scope = managedBean.getScope();
-
- boolean scopeIsApplication;
- boolean scopeIsRequest;
-
- ExternalContext extContext = context.getExternalContext();
- if ((scopeIsApplication = (scope == Scope.APPLICATION)) ||
- ((scope == Scope.SESSION))) {
- if (scopeIsApplication) {
- Map<String, Object> applicationMap = extContext.getApplicationMap();
- synchronized (extContext.getContext()) {
- try {
- bean = managedBean.newInstance(context);
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.fine(MessageFormat.format("Created application scoped bean {0} successfully ", managedBeanName));
- }
- } catch (Exception ex) {
- Object[] params = {managedBeanName};
- if (LOGGER.isLoggable(Level.SEVERE)) {
- LOGGER.log(Level.SEVERE,
- "jsf.managed_bean_creation_error", params);
- }
- throw new FacesException(ex);
- }
- //add bean to appropriate scope
- applicationMap.put(managedBeanName, bean);
- }
- } else {
- Map<String, Object> sessionMap = extContext.getSessionMap();
- synchronized (extContext.getSession(true)) {
- try {
- bean = managedBean.newInstance(context);
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.fine(MessageFormat.format("Created session scoped bean {0} successfully ", managedBeanName));
- }
- } catch (Exception ex) {
- Object[] params = {managedBeanName};
- if (LOGGER.isLoggable(Level.SEVERE)) {
- LOGGER.log(Level.SEVERE,
- "jsf.managed_bean_creation_error", params);
- }
- throw new FacesException(ex);
- }
- //add bean to appropriate scope
- sessionMap.put(managedBeanName, bean);
- }
- }
- } else {
- scopeIsRequest = (scope == Scope.REQUEST);
- try {
- bean = managedBean.newInstance(context);
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE, MessageFormat.format("Created bean {0} successfully ", managedBeanName));
- }
- } catch (Exception ex) {
- Object[] params = {managedBeanName};
- if (LOGGER.isLoggable(Level.SEVERE)) {
- LOGGER.log(Level.SEVERE,
- "jsf.managed_bean_creation_error", params);
- }
- throw new FacesException(ex);
- }
-
- if (scopeIsRequest) {
- extContext.getRequestMap().put(managedBeanName, bean);
- }
- }
- return bean;
- }
-
     // This is called by ViewHandlerImpl.renderView().
     void responseRendered() {
         responseRendered = true;
@@ -606,34 +478,6 @@
 
 
     /**
- * <p>Attempts to look up a ManagedBeanFactory from the
- * managedBeanFactoriesMap. If not </code>null</code> and
- * <code>ManagedBeanFactory.isInjectable()</code> returns true,
- * pass <code>bean</code> to <code>InjectionProvider.invokePreDestr
- *
- * @param beanName the name of the bean for which to call PreDestroy
- * annotated methods. If <code>null</code>, all beans in argument
- * <code>scope</code> have their PreDestroy annotated methods
- * called.
- * @param bean the target bean associated with <code>beanName</code>
- * @param scope the managed bean scope in which to look for the bean
- * or beans.
- */
-
- public void handlePreDestroy(String beanName, Object bean, Scope scope) {
- ManagedBeanFactory factory = managedBeanFactoriesMap.get(beanName);
- if (factory != null && factory.isInjectable()) {
- try {
- injectionProvider.invokePreDestroy(bean);
- } catch (InjectionProviderException ipe) {
- if (LOGGER.isLoggable(Level.SEVERE)) {
- LOGGER.log(Level.SEVERE, ipe.getMessage(), ipe);
- }
- }
- }
- }
-
- /**
      * This Comparator class will help sort the <code>ConfigNavigationCase</code> objects
      * based on their <code>fromViewId</code> properties in descending order -
      * largest string to smallest string.
Index: src/com/sun/faces/application/ConfigNavigationCase.java
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/application/ConfigNavigationCase.java,v
retrieving revision 1.10
diff -u -r1.10 ConfigNavigationCase.java
--- src/com/sun/faces/application/ConfigNavigationCase.java 5 Feb 2007 04:04:37 -0000 1.10
+++ src/com/sun/faces/application/ConfigNavigationCase.java 10 Apr 2007 22:00:55 -0000
@@ -40,6 +40,23 @@
     private String fromOutcome = null;
     private String toViewId = null;
     private String key = null;
+ private boolean redirect;
+
+
+ public ConfigNavigationCase(String fromViewId,
+ String fromAction,
+ String fromOutcome,
+ String toViewId,
+ boolean redirect) {
+ this.fromViewId = fromViewId;
+ this.fromAction = fromAction;
+ this.fromOutcome = fromOutcome;
+ this.toViewId = toViewId;
+ this.key = fromViewId
+ + ((fromAction == null) ? "-" : fromAction)
+ + ((fromOutcome == null) ? "-" : fromOutcome);
+ this.redirect = redirect;
+ }
 
 
     public String getFromViewId() {
@@ -82,15 +99,12 @@
     }
 
 
- protected String redirect = null;
-
-
     public boolean hasRedirect() {
- return null != redirect;
+ return redirect;
     }
 
 
- public void setRedirect(String redirect) {
+ public void setRedirect(boolean redirect) {
         this.redirect = redirect;
     }
 
@@ -112,11 +126,11 @@
 
     public String toString() {
         StringBuilder sb = new StringBuilder(64);
- sb.append("FROM VIEW ID:").append(getFromViewId());
- sb.append("\nFROM ACTION:").append(getFromAction());
- sb.append("\nFROM OUTCOME:").append(getFromOutcome());
- sb.append("\nTO VIEW ID:").append(getToViewId());
- sb.append("\nREDIRECT:").append(hasRedirect());
+ sb.append("from-view-id=").append(getFromViewId());
+ sb.append(" from-action=").append(getFromAction());
+ sb.append(" from-outcome=").append(getFromOutcome());
+ sb.append(" to-view-id=").append(getToViewId());
+ sb.append(" redirect=").append(hasRedirect());
         return sb.toString();
     }
 }
Index: src/com/sun/faces/application/WebappLifecycleListener.java
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/application/WebappLifecycleListener.java,v
retrieving revision 1.6
diff -u -r1.6 WebappLifecycleListener.java
--- src/com/sun/faces/application/WebappLifecycleListener.java 21 Mar 2007 17:57:40 -0000 1.6
+++ src/com/sun/faces/application/WebappLifecycleListener.java 10 Apr 2007 19:08:35 -0000
@@ -28,6 +28,7 @@
 import com.sun.faces.io.FastStringWriter;
 import com.sun.faces.spi.ManagedBeanFactory.Scope;
 import com.sun.faces.util.Util;
+import com.sun.faces.mgbean.BeanManager;
 
 import javax.servlet.ServletContext;
 import javax.servlet.ServletContextAttributeEvent;
@@ -226,7 +227,10 @@
         ApplicationAssociate associate = getAssociate();
         try {
             if (associate != null) {
- associate.handlePreDestroy(beanName, bean, scope);
+ BeanManager beanManager = associate.getBeanManager();
+ if (beanManager.isManaged(beanName)) {
+ beanManager.destroy(beanName, bean);
+ }
             }
         } catch (Exception e) {
             String className = e.getClass().getName();
Index: src/com/sun/faces/config/ConfigureListener.java
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/config/ConfigureListener.java,v
retrieving revision 1.101
diff -u -r1.101 ConfigureListener.java
--- src/com/sun/faces/config/ConfigureListener.java 3 Apr 2007 20:19:44 -0000 1.101
+++ src/com/sun/faces/config/ConfigureListener.java 16 Apr 2007 23:52:28 -0000
@@ -28,45 +28,23 @@
 
 package com.sun.faces.config;
 
-import com.sun.faces.RIConstants;
 import com.sun.faces.application.ApplicationAssociate;
-import com.sun.faces.application.ConfigNavigationCase;
 import com.sun.faces.config.WebConfiguration.BooleanWebContextInitParameter;
 import com.sun.faces.config.WebConfiguration.WebContextInitParameter;
-import com.sun.faces.config.beans.ApplicationBean;
-import com.sun.faces.config.beans.ComponentBean;
-import com.sun.faces.config.beans.ConverterBean;
-import com.sun.faces.config.beans.FacesConfigBean;
-import com.sun.faces.config.beans.FactoryBean;
-import com.sun.faces.config.beans.LifecycleBean;
-import com.sun.faces.config.beans.LocaleConfigBean;
-import com.sun.faces.config.beans.ManagedBeanBean;
-import com.sun.faces.config.beans.NavigationCaseBean;
-import com.sun.faces.config.beans.NavigationRuleBean;
-import com.sun.faces.config.beans.RenderKitBean;
-import com.sun.faces.config.beans.RendererBean;
-import com.sun.faces.config.beans.ResourceBundleBean;
-import com.sun.faces.config.beans.ValidatorBean;
-import com.sun.faces.config.rules.FacesConfigRuleSet;
-import com.sun.faces.el.ChainAwareVariableResolver;
-import com.sun.faces.el.DummyPropertyResolverImpl;
 import com.sun.faces.el.FacesCompositeELResolver;
-import com.sun.faces.renderkit.JsfJsResourcePhaseListener;
 import com.sun.faces.renderkit.RenderKitUtils;
-import com.sun.faces.spi.ManagedBeanFactory;
-import com.sun.faces.util.MessageUtils;
+import com.sun.faces.util.FacesLogger;
 import com.sun.faces.util.Util;
-import com.sun.org.apache.commons.digester.Digester;
+import com.sun.faces.util.Timer;
 import org.xml.sax.Attributes;
 import org.xml.sax.InputSource;
 import org.xml.sax.SAXException;
-import org.xml.sax.SAXParseException;
 import org.xml.sax.helpers.DefaultHandler;
 
 import javax.el.CompositeELResolver;
+import javax.el.ELContext;
 import javax.el.ELResolver;
 import javax.el.ExpressionFactory;
-import javax.el.ELContext;
 import javax.el.FunctionMapper;
 import javax.el.VariableMapper;
 import javax.faces.FacesException;
@@ -74,24 +52,12 @@
 import javax.faces.application.Application;
 import javax.faces.application.ApplicationFactory;
 import javax.faces.application.FacesMessage;
-import javax.faces.application.NavigationHandler;
-import javax.faces.application.StateManager;
-import javax.faces.application.ViewHandler;
 import javax.faces.component.UIViewRoot;
 import javax.faces.context.ExternalContext;
 import javax.faces.context.FacesContext;
 import javax.faces.context.ResponseStream;
 import javax.faces.context.ResponseWriter;
-import javax.faces.el.PropertyResolver;
-import javax.faces.el.VariableResolver;
-import javax.faces.event.ActionListener;
-import javax.faces.event.PhaseListener;
-import javax.faces.lifecycle.Lifecycle;
-import javax.faces.lifecycle.LifecycleFactory;
 import javax.faces.render.RenderKit;
-import javax.faces.render.RenderKitFactory;
-import javax.faces.render.Renderer;
-import javax.faces.webapp.FacesServlet;
 import javax.servlet.ServletContext;
 import javax.servlet.ServletContextEvent;
 import javax.servlet.ServletContextListener;
@@ -99,30 +65,19 @@
 import javax.servlet.jsp.JspFactory;
 import javax.xml.parsers.SAXParser;
 import javax.xml.parsers.SAXParserFactory;
-
-import java.io.BufferedInputStream;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.StringReader;
 import java.io.UnsupportedEncodingException;
 import java.net.MalformedURLException;
 import java.net.URL;
-import java.net.URLConnection;
-import java.text.MessageFormat;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.HashSet;
+import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
-import java.util.Map.Entry;
 import java.util.Set;
-import java.util.SortedMap;
-import java.util.TreeMap;
-import java.util.Collections;
 import java.util.logging.Level;
-import java.util.logging.Logger;
 
 /**
  * <p>Parse all relevant JavaServer Faces configuration resources, and
@@ -133,36 +88,9 @@
 public class ConfigureListener implements ServletContextListener {
 
 
- // -------------------------------------------------------- Static Variables
+ private static final FacesLogger LOGGER =
+ FacesLogger.getLogger(FacesLogger.Logger.CONFIG);
 
- /**
- * <p><code>ServletContext</code> attribute key.</p>
- */
- protected static final String FACES_CONFIG_BEAN_KEY =
- RIConstants.FACES_PREFIX + "FACES_CONFIG_BEAN";
-
- /**
- * <p>The path to the RI main configuration file.</p>
- */
- protected static final String JSF_RI_CONFIG =
- "com/sun/faces/jsf-ri-runtime.xml";
-
- /**
- * <p>The resource path for faces-config files included in the
- * <code>META-INF</code> directory of JAR files.</p>
- */
- protected static final String META_INF_RESOURCES =
- "META-INF/faces-config.xml";
-
- /**
- * <p>The resource path for the faces configuration in the
- * <code>WEB-INF</code> directory of an application.</p>
- */
- protected static final String WEB_INF_RESOURCE =
- "/WEB-INF/faces-config.xml";
-
-
- protected WebConfiguration webConfig;
 
     /**
      * <p>All known factory names.</p>
@@ -172,26 +100,11 @@
         FactoryFinder.FACES_CONTEXT_FACTORY,
         FactoryFinder.LIFECYCLE_FACTORY,
         FactoryFinder.RENDER_KIT_FACTORY
- };
+ };
 
 
- /**
- * <p>The set of <code>ClassLoader</code> instances that have
- * already been configured by this <code>ConfigureListener</code>.</p>
- */
- @SuppressWarnings({"CollectionWithoutInitialCapacity"})
- private static final Set<ClassLoader> LOADERS = new HashSet<ClassLoader>();
-
+ protected WebConfiguration webConfig;
 
- /**
- * <p>The <code>Log</code> instance for this class.</p>
- */
- private static final Logger LOGGER = Util.getLogger(Util.FACES_LOGGER
- + Util.CONFIG_LOGGER);
-
- private ArrayList<ELResolver> elResolversFromFacesConfig = null;
- private Application application;
- private ApplicationAssociate associate;
    
     
     // ------------------------------------------ ServletContextListener Methods
@@ -203,33 +116,40 @@
      * happened for a particular feature.
      */
     public void logOverriddenContextConfigValues() {
- for (BooleanWebContextInitParameter param : BooleanWebContextInitParameter.values()) {
+ for (BooleanWebContextInitParameter param : BooleanWebContextInitParameter
+ .values()) {
 
- if (webConfig.getBooleanContextInitParameter(param) != isFeatureEnabled(param)) {
- if (LOGGER.isLoggable(Level.INFO)) {
- LOGGER.log(Level.INFO,
- (isFeatureEnabled(param)
- ? "jsf.config.webconfig.configinfo.reset.enabled"
- : "jsf.config.webconfig.configinfo.reset.disabled"),
- new Object[]{webConfig.getServletContextName(),
- param.getQualifiedName()});
- }
+ if (webConfig.getBooleanContextInitParameter(param)
+ != isFeatureEnabled(param)) {
+ LOGGER.log(Level.INFO,
+ (isFeatureEnabled(param)
+ ? "jsf.config.webconfig.configinfo.reset.enabled"
+ : "jsf.config.webconfig.configinfo.reset.disabled"),
+
+ webConfig.getServletContextName(),
+ param.getQualifiedName());
             }
         }
     }
 
 
- public void contextInitialized(ServletContextEvent sce) {
+ public void contextInitialized(ServletContextEvent sce) {
+ Timer timer = Timer.getInstance();
+ if (timer != null) {
+ timer.startTiming();
+ }
         ServletContext context = sce.getServletContext();
+
+
+ LOGGER.logFormatted(Level.FINE,
+ "ConfigureListener.contextInitialized({0})",
+ context.getServletContextName());
+
         webConfig = WebConfiguration.getInstance(context);
         logOverriddenContextConfigValues();
- Digester digester = null;
- boolean initialized;
+ ConfigManager configManager = ConfigManager.getInstance();
 
- // Ensure that we initialize a particular application ony once.
- // Note that we need to cache this in a local variable so we
- // can check it from our finally block.
- if (initialized = initialized()) {
+ if (configManager.hasBeenInitialized(context)) {
             return;
         }
 
@@ -239,19 +159,11 @@
         if (!isFeatureEnabled(BooleanWebContextInitParameter.ForceLoadFacesConfigFiles)) {
             WebXmlProcessor processor = new WebXmlProcessor(context);
             if (!processor.isFacesServletPresent()) {
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.fine(
- "No FacesServlet found in deployment descriptor -"
- +
- " bypassing configuration.");
- }
- return;
- }
-
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.fine("FacesServlet found in deployment descriptor -"
- +
- " processing configuration.");
+ LOGGER.log(Level.FINE,
+ "No FacesServlet found in deployment descriptor - bypassing configuration");
+ } else {
+ LOGGER.log(Level.FINE,
+ "FacesServlet found in deployment descriptor - processing configuration.");
             }
         }
 
@@ -259,184 +171,61 @@
 
         try {
 
- if (LOGGER.isLoggable(Level.INFO)) {
- LOGGER.log(Level.INFO,
- "jsf.config.listener.version",
- getServletContextIdentifier(context));
- }
-
- // Prepare local variables we will need
- FacesConfigBean fcb = new FacesConfigBean();
-
- // see if we're operating in the unit test environment
- try {
- if (Util.isUnitTestModeEnabled()) {
- // if so, put the fcb in the servletContext
- context.setAttribute(FACES_CONFIG_BEAN_KEY, fcb);
- }
- }
- catch (Exception e) {
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.fine("Can't query for test environment");
- }
- }
+ LOGGER.log(Level.INFO,
+ "jsf.config.listener.version",
+ getServletContextIdentifier(context));
 
             // see if we need to disable our TLValidator
             Util.setHtmlTLVActive(
                   isFeatureEnabled(BooleanWebContextInitParameter.EnableHtmlTagLibraryValidator));
-
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.fine(MessageFormat.format("contextInitialized({0})", context.getServletContextName()));
- }
 
- // Step 1, configure a Digester instance we can use
- digester = digester(isFeatureEnabled(BooleanWebContextInitParameter.ValidateFacesConfigFiles));
-
- // Step 2, parse the RI configuration resource
- Bootstrapper bootstrapper = new Bootstrapper();
- bootstrapper.populateFacesConfigBean(fcb);
-
- // Step 3, parse any "/META-INF/faces-config.xml" resources
- SortedMap<String, URL> sortedJarMap = new TreeMap<String, URL>();
- //noinspection CollectionWithoutInitialCapacity
- List<URL> unsortedResourceList = new ArrayList<URL>();
-
- try {
- for (Enumeration<URL> items = Util.getCurrentLoader(this)
- .getResources(META_INF_RESOURCES);
- items.hasMoreElements();) {
-
- URL nextElement = items.nextElement();
- String jarUrl = nextElement.toString();
- String jarName = null;
- int resourceIndex;
- // If this resource has a faces-config file inside of it
- if (-1 != (resourceIndex =
- jarUrl.indexOf(META_INF_RESOURCES))) {
- // Search backwards for the previous occurrence of File.SEPARATOR
- int sepIndex = resourceIndex - 2;
- char sep = ' ';
- while (0 < sepIndex) {
- sep = jarUrl.charAt(sepIndex);
- if ('/' == sep) {
- break;
- }
- sepIndex--;
- }
- if ('/' == sep) {
- jarName =
- jarUrl.substring(sepIndex + 1, resourceIndex);
- }
- }
- if (null != jarName) {
- sortedJarMap.put(jarName, nextElement);
- } else {
- unsortedResourceList.add(0, nextElement);
- }
- }
- } catch (IOException e) {
- throw new FacesException(e);
- }
- // Load the sorted resources first:
- URL url;
- for (Entry<String, URL> entry : sortedJarMap.entrySet()) {
- url = entry.getValue();
- parse(digester, url, fcb);
- }
- // Then load the unsorted resources
- for (Iterator<URL> resources = unsortedResourceList.iterator();
- resources.hasNext(); ) {
- url = resources.next();
- parse(digester, url, fcb);
- }
-
- // Step 4, parse any context-relative resources specified in
- // the web application deployment descriptor
- String paths =
- context.getInitParameter(FacesServlet.CONFIG_FILES_ATTR);
- if (paths != null) {
- for (String token : Util.split(paths.trim(), ",")) {
- if (!WEB_INF_RESOURCE.equals(token.trim())) {
- url = getContextURLForPath(context, token.trim());
- if (url != null) {
- parse(digester, url, fcb);
- }
- }
-
- }
- }
-
- // Step 5, parse "/WEB-INF/faces-config.xml" if it exists
- url = getContextURLForPath(context, WEB_INF_RESOURCE);
- if (url != null) {
- parse(digester, url, fcb);
- }
-
- // Step 6, use the accumulated configuration beans to configure the RI
- try {
- configure(context, fcb);
- } catch (FacesException e) {
- e.printStackTrace();
- throw e;
- } catch (Exception e) {
- e.printStackTrace();
- throw new FacesException(e);
- }
+ configManager.initialize(context);
 
             // Step 7, verify that all the configured factories are available
             // and optionall that configured objects can be created. Clear
             // the InitFacesContext to ensure it isn't picked up by any of the
             // objects validated by these methods - reinit the context after
             // verification is complete.
- initContext.release();
+ // PENDING interweave verify logic into ConfigProcessors
             verifyFactories();
- if (isFeatureEnabled(BooleanWebContextInitParameter.VerifyFacesConfigObjects)) {
- verifyObjects(context, fcb);
- }
- initContext = new InitFacesContext(context);
- // Step 8, register FacesCompositeELResolver and ELContextListener with
- // Jsp.
             registerELResolverAndListenerWithJsp(context);
+
         } finally {
- if (!initialized) {
- JSFVersionTracker tracker = getJSFVersionTracker();
- if (null != tracker) {
- tracker.publishInstanceToApplication();
- }
- releaseDigester(digester);
- }
-
+
+ ApplicationAssociate associate =
+ ApplicationAssociate.getInstance(context);
             if (associate != null) {
                 associate.setContextName(getServletContextIdentifier(context));
             }
             RenderKitUtils.loadSunJsfJs(initContext.getExternalContext());
             initContext.release();
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.log(Level.FINE,
- "jsf.config.listener.version.complete",
- getServletContextIdentifier(context));
- }
-
- }
+ LOGGER.log(Level.FINE,
+ "jsf.config.listener.version.complete");
+ if (timer != null) {
+ timer.stopTiming();
+ timer.logResult("Initialization of context " +
+ getServletContextIdentifier(context));
+ }
+ }
     }
 
 
     public void contextDestroyed(ServletContextEvent sce) {
         ServletContext context = sce.getServletContext();
- try {
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.fine(MessageFormat.format("contextDestroyed({0})", context.getServletContextName()));
- }
 
- // Release any allocated application resources
- FactoryFinder.releaseFactories();
+ LOGGER.log(Level.FINE,
+ "ConfigureListener.contextDestroyed({0})",
+ context.getServletContextName());
 
+ try {
+ // Release any allocated application resources
+ FactoryFinder.releaseFactories();
         } finally {
             FacesContext initContext = new InitFacesContext(context);
             ApplicationAssociate
                   .clearInstance(initContext.getExternalContext());
             // Release the initialization mark on this web application
- release();
+ ConfigManager.getInstance().destory(context);
             initContext.release();
             WebConfiguration.clear(context);
         }
@@ -444,779 +233,7 @@
     }
 
     // --------------------------------------------------------- Private Methods
-
-
-
- /**
- * <p>Return the implementation-specific <code>Application</code>
- * instance for this application. You must <strong>NOT</strong>
- * call this method prior to configuring the appropriate
- * <code>ApplicationFactory</code> class.</p>
- * @return the <code>Application</code> object for this web
- * application
- */
- private Application application() {
-
- if (application == null) {
- ApplicationFactory afactory = (ApplicationFactory)
- FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
- application = afactory.getApplication();
- }
- return application;
-
- }
-
-
- /**
- * <p>Configure the JavaServer Faces reference implementation based on
- * the accumulated configuration beans.</p>
- *
- * @param context <code>ServletContext</code> for this web application
- * @param config <code>FacesConfigBean</code> that is the root of the
- * tree of configuration information
- * @throws Exception if an error occurs during the boostrap process
- */
- protected void configure(ServletContext context, FacesConfigBean config)
- throws Exception {
- configure(config.getFactory());
- configure(config.getLifecycle());
- configure(config.getApplication());
- configure(config.getComponents());
- configure(config.getConvertersByClass());
- configure(config.getConvertersById());
- configure(config.getManagedBeans());
- configure(config.getNavigationRules());
- configure(config.getRenderKits());
- configure(config.getValidators());
-
- }
-
-
- /**
- * <p>Configure the application objects for this application.</p>
- *
- * @param config <code>ApplicationBean</code> that contains our
- * configuration information
- * @throws Exception if an error occurs configuring the Application instance
- */
- @SuppressWarnings("deprecation")
- private void configure(ApplicationBean config)
- throws Exception {
-
- if (config == null) {
- return;
- }
- Application application = application();
- associate =
- ApplicationAssociate.getInstance(
- FacesContext.getCurrentInstance().getExternalContext());
-
- // Configure scalar properties
-
- configure(config.getLocaleConfig());
- configure(config.getResourceBundles());
-
- String value = config.getMessageBundle();
- if (value != null) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(MessageFormat.format("setMessageBundle({0})", value));
- }
- application.setMessageBundle(value);
- }
-
- value = config.getDefaultRenderKitId();
- if (value != null) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(MessageFormat.format("setDefaultRenderKitId({0})", value));
- }
- application.setDefaultRenderKitId(value);
- }
-
- // Configure chains of handlers
-
- String[] values = config.getActionListeners();
- if ((values != null) && (values.length > 0)) {
- for (int i = 0, len = values.length; i < len; i++) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(MessageFormat.format("setActionListener({0})", values[i]));
- }
- Object instance = Util.createInstance
- (values[i], ActionListener.class,
- application.getActionListener());
- if (instance != null) {
- application.setActionListener((ActionListener) instance);
- }
- }
- }
-
- values = config.getNavigationHandlers();
- if ((values != null) && (values.length > 0)) {
- for (int i = 0, len = values.length; i < len; i++) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(MessageFormat.format("setNavigationHandler({0})", values[i]));
- }
- Object instance = Util.createInstance
- (values[i], NavigationHandler.class,
- application.getNavigationHandler());
- if (instance != null) {
- application.setNavigationHandler
- ((NavigationHandler) instance);
- }
- }
- }
-
- values = config.getPropertyResolvers();
- if ((values != null) && (values.length > 0)) {
- // initialize the prevInChain to DummyPropertyResolver instance
- // to satisfy decorator pattern as well as satisfy the requirements
- // of unified EL. This resolver sets propertyResolved to false on
- // invocation of its method, so that variable resolution can move
- // further in the chain.
- Object prevInChain = new DummyPropertyResolverImpl();
- for (int i = 0, len = values.length; i < len; i++) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(MessageFormat.format("setPropertyResolver({0}}", values[i]));
- }
- prevInChain = Util.createInstance(values[i],
- PropertyResolver.class,
- prevInChain);
- }
- PropertyResolver legacyPRChainHead= (PropertyResolver) prevInChain;
- if (associate != null) {
- associate.setLegacyPRChainHead(legacyPRChainHead);
- }
- }
-
- // process custom el-resolver elements if any
- values = config.getELResolvers();
- if ((values != null) && (values.length > 0)) {
- for (int i = 0, len = values.length; i < len; i++) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(MessageFormat.format("setELResolver({0})", values[i]));
- }
- Object instance = Util.createInstance(values[i]);
- if (elResolversFromFacesConfig == null) {
- elResolversFromFacesConfig =
- new ArrayList<ELResolver>(values.length);
- }
- if (null != instance) {
- elResolversFromFacesConfig.add((ELResolver) instance);
- }
- }
- associate.setELResolversFromFacesConfig(elResolversFromFacesConfig);
- }
-
- values = config.getStateManagers();
- if ((values != null) && (values.length > 0)) {
- for (int i = 0, len = values.length; i < len; i++) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(MessageFormat.format("setStateManager({0})", values[i]));
- }
- Object instance = Util.createInstance
- (values[i], StateManager.class,
- application.getStateManager());
- if (instance != null) {
- application.setStateManager
- ((StateManager) instance);
- }
- }
- }
-
- values = config.getVariableResolvers();
- if ((values != null) && (values.length > 0)) {
- Object prevInChain = new ChainAwareVariableResolver();
- for (int i = 0, len = values.length; i < len; i++) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(MessageFormat.format("setVariableResolver({0})", values[i]));
- }
- Object instance = Util.createInstance(values[i],
- VariableResolver.class,
- prevInChain);
- if (instance != null) {
- prevInChain = instance;
- }
- }
- VariableResolver legacyVRChainHead = (VariableResolver) prevInChain;
- if (associate != null) {
- associate.setLegacyVRChainHead(legacyVRChainHead);
- }
- }
-
- values = config.getViewHandlers();
- if ((values != null) && (values.length > 0)) {
- for (int i = 0, len = values.length; i < len; i++) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(MessageFormat.format("setViewHandler({0})", values[i]));
- }
- Object instance = Util.createInstance
- (values[i], ViewHandler.class,
- application.getViewHandler());
- if (instance != null) {
- application.setViewHandler
- ((ViewHandler) instance);
- }
- }
- }
-
- }
-
-
- /**
- * <p>Configure all registered components.</p>
- *
- * @param config Array of <code>ComponentBean</code> that contains
- * our configuration information
- * @throws Exception if an error occurs configuring the application
- * components
- */
- private void configure(ComponentBean[] config) throws Exception {
-
- if (config == null) {
- return;
- }
- Application application = application();
-
- for (int i = 0, len = config.length; i < len; i++) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(MessageFormat.format("addComponent(componentType={0},componentClass={1})",
- config[i].getComponentType(),
- config[i].getComponentClass()));
- }
- application.addComponent(config[i].getComponentType(),
- config[i].getComponentClass());
- }
-
- }
-
-
- /**
- * <p>Configure all registered converters.</p>
- *
- * @param config Array of <code>ConverterBean</code> that contains
- * our configuration information
- * @throws Exception if an error occurs configuring the application
- * converters
- */
- private void configure(ConverterBean[] config) throws Exception {
-
- Application application = application();
-
- if (config == null) {
- return;
- }
-
- for (int i = 0, len = config.length; i < len; i++) {
- if (config[i].getConverterId() != null) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(MessageFormat.format("addConverterById(converterId={0},converterClass={1})",
- config[i].getConverterId(),
- config[i].getConverterClass()));
- }
- application.addConverter(config[i].getConverterId(),
- config[i].getConverterClass());
- } else {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(MessageFormat.format("addConverterByClass(converterForClass={0},converterClass={1})",
- config[i].getConverterForClass(),
- config[i].getConverterClass()));
- }
- application.addConverter(config[i].getConverterForClass(),
- config[i].getConverterClass());
- }
- }
-
- }
-
-
- /**
- * <p>Configure the object factories for this application.</p>
- *
- * @param config <code>FactoryBean</code> that contains our
- * configuration information
- * @throws Exception if an error occurs configuring the application
- * factories
- */
- private void configure(FactoryBean config) throws Exception {
-
- if (config == null) {
- return;
- }
-
- for (String value : config.getApplicationFactories()) {
- if (value != null) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(MessageFormat.format("setApplicationFactory({0})", value));
- }
- FactoryFinder.setFactory(FactoryFinder.APPLICATION_FACTORY,
- value);
- }
- }
-
- for (String value : config.getFacesContextFactories()) {
- if (value != null) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(MessageFormat.format("setFacesContextFactory({0})", value));
- }
- FactoryFinder.setFactory(FactoryFinder.FACES_CONTEXT_FACTORY,
- value);
- }
- }
-
- for (String value : config.getLifecycleFactories()) {
- if (value != null) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(MessageFormat.format("setLifecycleFactory({0})", value));
- }
- FactoryFinder.setFactory(FactoryFinder.LIFECYCLE_FACTORY,
- value);
- }
- }
-
- for (String value : config.getRenderKitFactories()) {
- if (value != null) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(MessageFormat.format("setRenderKitFactory({0})", value));
- }
- FactoryFinder.setFactory(FactoryFinder.RENDER_KIT_FACTORY,
- value);
- }
- }
-
- }
-
-
- /**
- * <p>Configure the lifecycle listeners for this application.</p>
- *
- * @param config <code>LifecycleBean</code> that contains our
- * @throws Exception if an error occurs configuring the application's
- * Lifecycle
- */
- private void configure(LifecycleBean config) throws Exception {
-
- if (config == null) {
- return;
- }
- String[] listeners = config.getPhaseListeners();
- LifecycleFactory factory = (LifecycleFactory)
- FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY);
-
- for (Iterator<String> iter = factory.getLifecycleIds(); iter.hasNext();) {
- String lifecycleId = iter.next();
- if (lifecycleId == null) {
- lifecycleId = LifecycleFactory.DEFAULT_LIFECYCLE;
- }
- Lifecycle lifecycle =
- factory.getLifecycle(lifecycleId);
- if (webConfig.getBooleanContextInitParameter(
- BooleanWebContextInitParameter.ExternalizeJavaScript)) {
- lifecycle.addPhaseListener(new JsfJsResourcePhaseListener());
- }
- for (int i = 0, len = listeners.length; i < len; i++) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(MessageFormat.format("addPhaseListener({0})", listeners[i]));
- }
- try {
- Class clazz = Util.loadClass(listeners[i], this);
- lifecycle.addPhaseListener((PhaseListener) clazz.newInstance());
- } catch (Exception e) {
- Object [] args = {MessageFormat.format("phase-listener: {0}", listeners[i])};
- String message =
- MessageUtils.getExceptionMessageString(MessageUtils.CANT_INSTANTIATE_CLASS_ERROR_MESSAGE_ID, args);
- LOGGER.log(Level.SEVERE, message);
- throw e;
- }
- }
- }
- }
-
-
- /**
- * <p>Configure the locale support for this application.</p>
- *
- * @param config <code>LocaleConfigBean</code> that contains our
- * configuration information
- * @throws Exception if an error occurs configuring the application
- * locales
- */
- private void configure(LocaleConfigBean config) throws Exception {
-
- if (config == null) {
- return;
- }
- Application application = application();
- String value;
- String[] values;
-
- value = config.getDefaultLocale();
- if (value != null) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(MessageFormat.format("setDefaultLocale({0})", value));
- }
- application.setDefaultLocale
- (Util.getLocaleFromString(value));
- }
-
- values = config.getSupportedLocales();
- if ((values != null) && (values.length > 0)) {
- List<Locale> locales = new ArrayList<Locale>(values.length);
- for (int i = 0, len = values.length; i < len; i++) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(MessageFormat.format("addSupportedLocale({0})", values[i]));
- }
- locales.add(Util.getLocaleFromString(values[i]));
- }
- application.setSupportedLocales(locales);
- }
-
- }
-
-
- /**
- * <p>Configure all registered managed beans.</p>
- *
- * @param config Array of <code>ManagedBeanBean</code> that contains
- * our configuration information
- * @throws Exception if an error occurs configuring the application
- * managed beans
- */
- private void configure(ManagedBeanBean[] config) throws Exception {
-
- if (config == null || associate == null) {
- return;
- }
-
- for (int i = 0, len = config.length; i < len; i++) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(MessageFormat.format("addManagedBean(managedBeanName={0},managedBeanClass={1})",
- config[i].getManagedBeanName(),
- config[i].getManagedBeanClass()));
- }
- ManagedBeanFactory mbf = new ManagedBeanFactoryImpl(config[i]);
-
- // See if the RI specific MANAGED_BEAN_FACTORY_DECORATOR is available
- String mbfdClassName =
- webConfig.getContextInitParameter(
- WebContextInitParameter.ManagedBeanFactoryDecorator);
- if (mbfdClassName != null) {
- ManagedBeanFactory newMbf =
- (ManagedBeanFactory) Util.createInstance(mbfdClassName,
- ManagedBeanFactory.class, mbf);
- if (null != newMbf) {
- mbf = newMbf;
- }
- }
- associate.addManagedBeanFactory(config[i].getManagedBeanName(),
- mbf);
- }
- }
-
-
- /**
- * <p>Configure all registered navigation rules.</p>
- *
- * @param config Array of <code>NavigationRuleBean</code> that contains
- * our configuration information
- */
- private void configure(NavigationRuleBean[] config) {
-
- if (config == null || associate == null) {
- return;
- }
-
- for (int i = 0, len = config.length; i < len; i++) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(MessageFormat.format("addNavigationRule({0})", config[i].getFromViewId()));
- }
- NavigationCaseBean[] ncb = config[i].getNavigationCases();
- for (int j = 0, len2 = ncb.length; j < len2; j++) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(
- MessageFormat.format("addNavigationCase(fromAction={0},fromOutcome={1},isRedirect={2},toViewId={3})",
- ncb[j].getFromAction(),
- ncb[j].getFromOutcome(),
- ncb[j].isRedirect(),
- ncb[j].getToViewId()));
- }
- ConfigNavigationCase cnc = new ConfigNavigationCase();
- if (config[i].getFromViewId() == null) {
- cnc.setFromViewId("*");
- } else {
- cnc.setFromViewId(config[i].getFromViewId());
- }
- cnc.setFromAction(ncb[j].getFromAction());
- String fromAction = ncb[j].getFromAction();
- if (fromAction == null) {
- fromAction = "-";
- }
- cnc.setFromOutcome(ncb[j].getFromOutcome());
- String fromOutcome = ncb[j].getFromOutcome();
- if (fromOutcome == null) {
- fromOutcome = "-";
- }
- cnc.setToViewId(ncb[j].getToViewId());
-
- cnc.setKey(new StringBuilder(64).append(cnc.getFromViewId()).append(fromAction).append(fromOutcome).toString());
- if (ncb[j].isRedirect()) {
- cnc.setRedirect("true");
- } else {
- cnc.setRedirect(null);
- }
- associate.addNavigationCase(cnc);
- }
- }
-
- }
-
-
- /**
- * <p>Configure all registered renderers for this renderkit.</p>
- *
- * @param config Array of <code>RendererBean</code> that contains
- * our configuration information
- * @param rk RenderKit to be configured
- * @throws Exception if an error occurs configuring the the renderers
- * for the specified RenderKit
- */
- private void configure(RendererBean[] config, RenderKit rk)
- throws Exception {
-
- if (config == null) {
- return;
- }
-
- for (int i = 0, len = config.length; i < len; i++) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(
- MessageFormat.format("addRenderer(family={0},rendererType={2},rendererClass={3})",
- config[i].getComponentFamily(),
- config[i].getRendererType(),
- config[i].getRendererClass()));
- }
- try {
- Renderer r = (Renderer)
- Util.loadClass(
- config[i].getRendererClass(), this).newInstance();
- rk.addRenderer(config[i].getComponentFamily(),
- config[i].getRendererType(),
- r);
- }
- catch (Exception e) {
- Object[] args = { MessageFormat.format("family={0},rendererType={2},rendererClass={3}",
- config[i].getComponentFamily(),
- config[i].getRendererType(),
- config[i].getRendererClass()) };
- String message =
- MessageUtils.getExceptionMessageString(MessageUtils.CANT_INSTANTIATE_CLASS_ERROR_MESSAGE_ID, args);
- LOGGER.log(Level.SEVERE, message);
- throw e;
- }
- }
-
- }
-
-
- /**
- * <p>Configure all registered renderKits.</p>
- *
- * @param config Array of <code>RenderKitBean</code> that contains
- * our configuration information
- * @throws Exception if an error occurs configuring the application
- * RenderKit
- */
- private void configure(RenderKitBean[] config) throws Exception {
-
- if (config == null) {
- return;
- }
- RenderKitFactory rkFactory = (RenderKitFactory)
- FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
-
- for (int i = 0, len = config.length; i < len; i++) {
- RenderKit rk = rkFactory.getRenderKit
- (null, config[i].getRenderKitId());
- if (rk == null) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(MessageFormat.format("createRenderKit(renderKitId={0},renderKitClass={2})",
- config[i].getRenderKitId(),
- config[i].getRenderKitClass()));
- }
- if (config[i].getRenderKitClass() == null) {
- throw new IllegalArgumentException// PENDING - i18n
- ("No renderKitClass for renderKit " +
- config[i].getRenderKitId());
- }
- try {
- rk = (RenderKit)
- Util.loadClass(
- config[i].getRenderKitClass(), this).newInstance();
- rkFactory.addRenderKit(config[i].getRenderKitId(), rk);
- } catch (Exception e) {
- Object [] args = { MessageFormat.format("renderKitId={0},renderKitClass={2}",
- config[i].getRenderKitId(),
- config[i].getRenderKitClass()) };
- String message =
- MessageUtils.getExceptionMessageString(MessageUtils.CANT_INSTANTIATE_CLASS_ERROR_MESSAGE_ID, args);
- LOGGER.log(Level.SEVERE, message);
- throw e;
-
- }
- } else {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(MessageFormat.format("getRenderKit({0})", config[i].getRenderKitId()));
- }
- }
- configure(config[i].getRenderers(), rk);
- }
-
- }
-
- /**
- * <p>Configure all registered ResourceBundles.</p>
- *
- * @param config Array of <code>ResourceBundleBean</code> that contains
- * our configuration information
- * @throws Exception if an error occurs configuring the application
- * ResourceBundle
- */
- private void configure(ResourceBundleBean[] config) throws Exception {
-
- if (config == null || associate == null) {
- return;
- }
-
- String baseName;
- String var;
-
- for (int i = 0, len = config.length; i < len; i++) {
- if ((null == (baseName = config[i].getBasename())) ||
- (null == (var = config[i].getVar()))) {
- String message =
- MessageFormat.format("Application ResourceBundle: null base-name or var.base-name:{0}, var:{1}",
- baseName,
- config[i].getVar());
- // PENDING(edburns): I18N all levels above info
- if (LOGGER.isLoggable(Level.WARNING)) {
- LOGGER.finer(message);
- }
- throw new IllegalArgumentException(message);
- }
- associate.addResourceBundleBean(var, config[i]);
- }
-
- }
-
-
- /**
- * <p>Configure all registered validators.</p>
- *
- * @param config Array of <code>ValidatorBean</code> that contains
- * our configuration information
- * @throws Exception if an error occurs configuring the application
- * Validators
- */
- private void configure(ValidatorBean[] config) throws Exception {
-
- if (config == null) {
- return;
- }
- Application application = application();
-
- for (int i = 0, len = config.length; i < len; i++) {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer(MessageFormat.format("addValidator(validatorId={0},validatorClass={2})",
- config[i].getValidatorId(),
- config[i].getValidatorClass()));
- }
- application.addValidator(config[i].getValidatorId(),
- config[i].getValidatorClass());
- }
-
- }
-
-
- /**
- * <p>Configure and return a <code>Digester</code> instance suitable for
- * parsing the runtime configuration information we need.</p>
- *
- * @param validateXml if true, validation is turned on during parsing.
- * @return a <code>Digester<code> instance suitable for parsing
- * faces-config documents
- */
- protected Digester digester(boolean validateXml) {
-
- Digester digester;
- DigesterFactory.VersionListener listener = null;
- final JSFVersionTracker tracker = getJSFVersionTracker();
-
- if (null != tracker) {
- listener =
- new DigesterFactory.VersionListener() {
- public void takeActionOnGrammar(String grammar) {
- tracker.pushJSFVersionNumberFromGrammar(grammar);
- }
-
- public void takeActionOnArtifact(String artifactName) {
- tracker.putTrackedClassName(artifactName);
- }
- };
- }
-
- try {
- if (null != listener) {
- digester = DigesterFactory.newInstance(validateXml,
- listener).createDigester();
- }
- else {
- digester = DigesterFactory.newInstance(validateXml).createDigester();
- }
- }
- catch (RuntimeException e) {
- Object [] args = { "Digester" };
- String message =
- MessageUtils.getExceptionMessageString(MessageUtils.CANT_INSTANTIATE_CLASS_ERROR_MESSAGE_ID, args);
- LOGGER.log(Level.SEVERE, message);
- throw e;
- }
-
- // Configure parsing rules
- // PENDING - Read from file?
- digester.addRuleSet(new FacesConfigRuleSet(false, false, true));
-
- // Push an initial FacesConfigBean onto the stack
- digester.push(new FacesConfigBean());
-
- return (digester);
-
- }
-
- protected void releaseDigester(Digester toRelease) {
- DigesterFactory.releaseDigester(toRelease);
- }
-
- private JSFVersionTracker versionTracker = null;
-
- /**
- * <p>This is the single access point for accessing the
- * JSFVersionTracker instance during initialization. It returns
- * null if the feature has been disabled via user configuration.</p>
- * @return <code>JSFVersionTracker</code> that can be used to query
- * the version of application artifacts
- */
-
- private JSFVersionTracker getJSFVersionTracker() {
- // If the feature is disabled...
- if (isFeatureEnabled(BooleanWebContextInitParameter.DisableArtifactVersioning)) {
- // make sure the tracker is released.
- versionTracker = null;
- return null;
- }
-
- if (null == versionTracker) {
- versionTracker = new JSFVersionTracker();
- }
- return versionTracker;
- }
+
         
 
     /**
@@ -1237,217 +254,8 @@
     }
 
 
- /**
- * <p>Return <code>true</code> if this web application has already
- * been initialized. If it has not been initialized, also record
- * the initialization of this application until removed by a call to
- * <code>release()</code>.</p>
- * @return <code>true</code> if this application has been initialized,
- * otherwise <code>false</code>
- */
- private boolean initialized() {
-
- // Initialize at most once per web application class loader
- ClassLoader cl = Util.getCurrentLoader(this);
- synchronized (LOADERS) {
- if (!LOADERS.contains(cl)) {
- LOADERS.add(cl);
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer("Initializing this webapp");
- }
- return false;
- } else {
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer("Listener already completed for this webapp");
- }
- return true;
- }
- }
-
- }
-
-
- /**
- * <p>Verify that all of the application-defined objects that have been
- * configured can be successfully instantiated.</p>
- *
- * @param context <code>ServletContext</code> instance for this application
- * @param fcb <code>FacesConfigBean</code> containing the
- * configuration information
- * @throws FacesException if an application-defined object cannot
- * be instantiated
- */
- private void verifyObjects(ServletContext context, FacesConfigBean fcb)
- throws FacesException {
-
- if (LOGGER.isLoggable(Level.FINER)) {
- LOGGER.finer("Verifying application objects");
- }
-
- ApplicationFactory af = (ApplicationFactory)
- FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
- Application app = af.getApplication();
- RenderKitFactory rkf = (RenderKitFactory)
- FactoryFinder.getFactory(FactoryFinder.RENDER_KIT_FACTORY);
- boolean success = true;
-
- // Check components
- ComponentBean[] comp = fcb.getComponents();
- for (int i = 0, len = comp.length; i < len; i++) {
- try {
- app.createComponent(comp[i].getComponentType());
- } catch (Exception e) {
- context.log(comp[i].getComponentClass(), e);
- success = false;
- }
- }
-
- // Check converters
- ConverterBean[] conv1 = fcb.getConvertersByClass();
- for (int i = 0, len = conv1.length; i < len; i++) {
- try {
- app.createConverter(conv1[i].getConverterForClass());
- } catch (Exception e) {
- context.log(conv1[i].getConverterForClass().getName(), e);
- success = false;
- }
- }
- ConverterBean[] conv2 = fcb.getConvertersById();
- for (int i = 0, len = conv2.length; i < len; i++) {
- try {
- app.createConverter(conv2[i].getConverterId());
- } catch (Exception e) {
- context.log(conv2[i].getConverterClass());
- success = false;
- }
- }
-
- // Check renderers
- RenderKitBean[] rkb = fcb.getRenderKits();
- RenderKit rk;
- for (int i = 0, len = rkb.length; i < len; i++) {
- try {
- rk = rkf.getRenderKit(null, rkb[i].getRenderKitId());
- RendererBean[] rb = rkb[i].getRenderers();
- for (int j = 0, len2 = rb.length; j < len2; j++) {
- try {
- rk.getRenderer(rb[j].getComponentFamily(),
- rb[j].getRendererType());
- } catch (Exception e) {
- context.log(rb[j].getRendererClass(), e);
- success = false;
- }
- }
- } catch (Exception e) {
- context.log(rkb[i].getRenderKitId());
- success = false;
- }
- }
-
- // Check validators
- ValidatorBean[] val = fcb.getValidators();
- for (int i = 0, len = val.length; i < len; i++) {
- try {
- app.createValidator(val[i].getValidatorId());
- } catch (Exception e) {
- context.log(val[i].getValidatorClass(), e);
- success = false;
- }
- }
-
- // Throw an exception on any failures
- if (!success) {
- String message;
- try {
- message = MessageUtils.getExceptionMessageString
- (MessageUtils.OBJECT_CREATION_ERROR_ID);
- } catch (Exception ee) {
- message = "One or more configured application objects " +
- "cannot be created. See your web application logs " +
- "for details.";
- }
- if (LOGGER.isLoggable(Level.WARNING)) {
- LOGGER.warning(message);
- }
- throw new FacesException(message);
- } else {
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.fine(
- "Application object verification completed successfully");
- }
- }
-
- }
-
-
- /**
- * <p>Parse the configuration resource at the specified URL, using
- * the specified <code>Digester</code> instance.</p>
- *
- * @param digester Digester to use for parsing
- * @param url URL of the configuration resource to be parsed
- * @param fcb FacesConfigBean to accumulate results
- */
- protected void parse(Digester digester, URL url, FacesConfigBean fcb) {
-
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.fine(MessageFormat.format("parse({0})", url.toExternalForm()));
- }
 
- InputStream stream = null;
- URLConnection conn;
- InputSource source;
- JSFVersionTracker tracker = getJSFVersionTracker();
- try {
- conn = url.openConnection();
- conn.setUseCaches(false);
- stream = new BufferedInputStream(conn.getInputStream());
- source = new InputSource(url.toExternalForm());
- source.setSystemId(url.toExternalForm());
- source.setByteStream(stream);
- digester.clear();
- digester.push(fcb);
- if (null != tracker) {
- tracker.startParse();
- }
- digester.parse(source);
- }
- catch (Exception e) {
- int ln = -1;
- int cn = -1;
- if (e instanceof SAXParseException) {
- SAXParseException spe = (SAXParseException) e;
- ln = spe.getLineNumber();
- cn = spe.getColumnNumber();
- }
- String message;
- try {
- message = MessageUtils.getExceptionMessageString
- (MessageUtils.CANT_PARSE_FILE_ERROR_MESSAGE_ID,
- url.toExternalForm(),
- ln,
- cn,
- e.getMessage());
- } catch (Exception ee) {
- message = MessageFormat.format("Can''t parse configuration file: {0}: Error at line {1} column {2}: {3}", url.toExternalForm(), ln, cn, e.getMessage());
- }
- throw new FacesException(message);
- } finally {
- if (stream != null) {
- try {
- stream.close();
- } catch (Exception e) {
- // ignore
- }
- }
- if (null != tracker) {
- tracker.endParse();
- }
- }
-
-
 
- }
     
     /**
      * <p>Determines if a particular feature, configured via the web
@@ -1471,19 +279,7 @@
         }
     }
 
- /**
- * <p>Return the URL for the given path.</p>
- * @param context the <code>ServletContext</code> of the current application
- * @param path the resource path
- * @return the URL for the given resource or <code>null</code>
- */
- private URL getContextURLForPath(ServletContext context, String path) {
- try {
- return context.getResource(path);
- } catch (MalformedURLException mue) {
- throw new FacesException(mue);
- }
- }
+
     
     private static boolean isJspTwoOne() {
 
@@ -1503,10 +299,6 @@
             JspFactory.class.getMethod("getJspApplicationContext",
                                        ServletContext.class );
         } catch (NoSuchMethodException nsme) {
- if (LOGGER.isLoggable(Level.FINE)) {
- LOGGER.fine(MessageUtils.getExceptionMessageString(MessageUtils.INCORRECT_JSP_VERSION_ID,
- "getJspApplicationContext"));
- }
             return false;
         }
         return true;
@@ -1531,6 +323,8 @@
             try {
                 ExpressionFactory factory = (ExpressionFactory) Class.forName(
                         elFactType).newInstance();
+ ApplicationAssociate associate =
+ ApplicationAssociate.getInstance(context);
                 if (associate != null) {
                     associate.setExpressionFactory(factory);
                 }
@@ -1550,7 +344,9 @@
             // register an empty resolver for now. It will be populated after the
             // first request is serviced.
             CompositeELResolver compositeELResolverForJsp =
- new FacesCompositeELResolver(FacesCompositeELResolver.ELResolverChainType.JSP);
+ new FacesCompositeELResolver(FacesCompositeELResolver.ELResolverChainType.JSP);
+ ApplicationAssociate associate =
+ ApplicationAssociate.getInstance(context);
             if (associate != null) {
                 associate.setFacesELResolverForJsp(compositeELResolverForJsp);
             }
@@ -1580,19 +376,9 @@
          }
     }
 
- /**
- * <p>
- * Release the mark that this web application has been initialized.
- * </p>
- */
- private void release() {
 
- ClassLoader cl = Util.getCurrentLoader(this);
- synchronized (LOADERS) {
- LOADERS.remove(cl);
- }
+ // ----------------------------------------------------------- Inner classes
 
- }
 
     private static class InitFacesContext extends FacesContext {
 
@@ -2024,9 +810,10 @@
                 // processing the web.xml, set facesServletFound to true to
                 // default to our previous behavior of processing the faces
                 // configuration.
- if (LOGGER.isLoggable(Level.WARNING)) {
- LOGGER.warning(MessageFormat.format("Unable to process deployment descriptor for context ''{0}''", context.getServletContextName()));
- }
+ // PENDING i18n
+ LOGGER.logFormatted(Level.WARNING,
+ "Unable to process deployment descriptor for context ''{0}''",
+ context.getServletContextName());
                 facesServletPresent = true;
             }
 
Index: src/com/sun/faces/config/WebConfiguration.java
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/config/WebConfiguration.java,v
retrieving revision 1.19
diff -u -r1.19 WebConfiguration.java
--- src/com/sun/faces/config/WebConfiguration.java 13 Mar 2007 02:39:04 -0000 1.19
+++ src/com/sun/faces/config/WebConfiguration.java 17 Apr 2007 17:01:48 -0000
@@ -25,21 +25,20 @@
 
 package com.sun.faces.config;
 
+import com.sun.faces.RIConstants;
+import com.sun.faces.util.Util;
+
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
 import javax.servlet.ServletContext;
-import javax.faces.context.FacesContext;
-import javax.faces.context.ExternalContext;
-
-import java.util.Map;
 import java.util.EnumMap;
+import java.util.Map;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 import java.util.regex.Pattern;
 
-import com.sun.faces.util.Util;
-import com.sun.faces.RIConstants;
-
 
 /** Class Documentation */
 public class WebConfiguration {
@@ -691,6 +690,10 @@
         WriteStateAtFormEnd(
             "com.sun.faces.writeStateAtFormEnd",
             true
+ ),
+ EnableLazyBeanValidation(
+ "com.sun.faces.enableLazyBeanValidation",
+ true
         );
 
         private BooleanWebContextInitParameter alternate;
Index: src/com/sun/faces/el/ELUtils.java
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/el/ELUtils.java,v
retrieving revision 1.1
diff -u -r1.1 ELUtils.java
--- src/com/sun/faces/el/ELUtils.java 27 Feb 2007 23:10:23 -0000 1.1
+++ src/com/sun/faces/el/ELUtils.java 11 Apr 2007 22:13:15 -0000
@@ -29,8 +29,8 @@
 
 package com.sun.faces.el;
 
-import com.sun.faces.RIConstants;
 import com.sun.faces.application.ApplicationAssociate;
+import com.sun.faces.mgbean.BeanManager;
 import com.sun.faces.spi.ManagedBeanFactory;
 import com.sun.faces.util.MessageUtils;
 
@@ -45,19 +45,51 @@
 import javax.el.ValueExpression;
 import javax.faces.context.ExternalContext;
 import javax.faces.context.FacesContext;
+import javax.faces.el.EvaluationException;
 import javax.faces.el.PropertyResolver;
 import javax.faces.el.ReferenceSyntaxException;
 import javax.faces.el.VariableResolver;
-
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
+import java.util.Map;
 
 /**
  * <p>Utility class for EL related methods.</p>
  */
 public class ELUtils {
 
+ private static final String SESSION = "session";
+ private static final String APPLICATION = "application";
+ private static final String APPLICATION_SCOPE = "applicationScope";
+ private static final String SESSION_SCOPE = "sessionScope";
+ private static final String REQUEST = "request";
+ private static final String REQUEST_SCOPE = "requestScope";
+ private static final String NONE = "none";
+ private static final String COOKIE_IMPLICIT_OBJ = "cookie";
+ private static final String FACES_CONTEXT_IMPLICIT_OBJ = "facesContext";
+ private static final String HEADER_IMPLICIT_OBJ = "header";
+ private static final String HEADER_VALUES_IMPLICIT_OBJ = "headerValues";
+ private static final String INIT_PARAM_IMPLICIT_OBJ = "initParam";
+ private static final String PARAM_IMPLICIT_OBJ = "param";
+ private static final String PARAM_VALUES_IMPLICIT_OBJ = "paramValues";
+ private static final String VIEW_IMPLICIT_OBJ = "view";
+
+ public enum Scope {
+ NONE("none"),
+ REQUEST("request"),
+ SESSION("session"),
+ APPLICATION("application");
+
+ String scope;
+ Scope(String scope) {
+ this.scope = scope;
+ }
+
+ public String toString() {
+ return scope;
+ }
+ }
 
     public static final ArrayELResolver ARRAY_RESOLVER = new ArrayELResolver();
 
@@ -235,7 +267,7 @@
      * @return a List of expressions from the expressionString
      */
     @SuppressWarnings("deprecation")
- public static List getExpressionsFromString(String expressionString)
+ public static List<String> getExpressionsFromString(String expressionString)
     throws ReferenceSyntaxException {
 
         if (null == expressionString) {
@@ -284,9 +316,8 @@
      * _05
      */
     @SuppressWarnings("deprecation")
- public static ManagedBeanFactory.Scope getScope(String valueBinding,
- String[] outString)
- throws ReferenceSyntaxException {
+ public static ELUtils.Scope getScope(String valueBinding, String[] outString)
+ throws ReferenceSyntaxException {
 
         if (valueBinding == null || 0 == valueBinding.length()) {
             return null;
@@ -311,56 +342,56 @@
         if (null != outString) {
             outString[0] = identifier;
         }
- if (RIConstants.REQUEST_SCOPE.equalsIgnoreCase(identifier)) {
- return ManagedBeanFactory.Scope.REQUEST;
+ if (REQUEST_SCOPE.equalsIgnoreCase(identifier)) {
+ return Scope.REQUEST;
         }
- if (RIConstants.SESSION_SCOPE.equalsIgnoreCase(identifier)) {
- return ManagedBeanFactory.Scope.SESSION;
+ if (SESSION_SCOPE.equalsIgnoreCase(identifier)) {
+ return Scope.SESSION;
         }
- if (RIConstants.APPLICATION_SCOPE.equalsIgnoreCase(identifier)) {
- return ManagedBeanFactory.Scope.APPLICATION;
+ if (APPLICATION_SCOPE.equalsIgnoreCase(identifier)) {
+ return Scope.APPLICATION;
         }
 
         // handle implicit objects
- if (RIConstants.INIT_PARAM_IMPLICIT_OBJ.equalsIgnoreCase(identifier)) {
- return ManagedBeanFactory.Scope.APPLICATION;
- }
- if (RIConstants.COOKIE_IMPLICIT_OBJ.equalsIgnoreCase(identifier)) {
- return ManagedBeanFactory.Scope.REQUEST;
- }
- if (RIConstants.FACES_CONTEXT_IMPLICIT_OBJ.equalsIgnoreCase(identifier)) {
- return ManagedBeanFactory.Scope.REQUEST;
- }
- if (RIConstants.HEADER_IMPLICIT_OBJ.equalsIgnoreCase(identifier)) {
- return ManagedBeanFactory.Scope.REQUEST;
- }
- if (RIConstants.HEADER_VALUES_IMPLICIT_OBJ.equalsIgnoreCase(identifier)) {
- return ManagedBeanFactory.Scope.REQUEST;
+ if (INIT_PARAM_IMPLICIT_OBJ.equalsIgnoreCase(identifier)) {
+ return Scope.APPLICATION;
         }
- if (RIConstants.PARAM_IMPLICIT_OBJ.equalsIgnoreCase(identifier)) {
- return ManagedBeanFactory.Scope.REQUEST;
+ if (COOKIE_IMPLICIT_OBJ.equalsIgnoreCase(identifier)) {
+ return Scope.REQUEST;
         }
- if (RIConstants.PARAM_VALUES_IMPLICIT_OBJ.equalsIgnoreCase(identifier)) {
- return ManagedBeanFactory.Scope.REQUEST;
+ if (FACES_CONTEXT_IMPLICIT_OBJ.equalsIgnoreCase(identifier)) {
+ return Scope.REQUEST;
         }
- if (RIConstants.VIEW_IMPLICIT_OBJ.equalsIgnoreCase(identifier)) {
- return ManagedBeanFactory.Scope.REQUEST;
- }
-
- //No scope was provided in the expression so check for the
- //expression in all of the scopes. The expression is the first
- //segment.
-
- if (ec.getRequestMap().get(identifier) != null) {
- return ManagedBeanFactory.Scope.REQUEST;
- }
- if (ec.getSessionMap().get(identifier) != null) {
- return ManagedBeanFactory.Scope.SESSION;
- }
- if (ec.getApplicationMap().get(identifier) != null) {
- return ManagedBeanFactory.Scope.APPLICATION;
+ if (HEADER_IMPLICIT_OBJ.equalsIgnoreCase(identifier)) {
+ return Scope.REQUEST;
+ }
+ if (HEADER_VALUES_IMPLICIT_OBJ.equalsIgnoreCase(identifier)) {
+ return Scope.REQUEST;
+ }
+ if (PARAM_IMPLICIT_OBJ.equalsIgnoreCase(identifier)) {
+ return Scope.REQUEST;
+ }
+ if (PARAM_VALUES_IMPLICIT_OBJ.equalsIgnoreCase(identifier)) {
+ return Scope.REQUEST;
+ }
+ if (VIEW_IMPLICIT_OBJ.equalsIgnoreCase(identifier)) {
+ return Scope.REQUEST;
+ }
+
+ Map<String,Object> requestMap = ec.getRequestMap();
+ Map<String,Object> sessionMap = ec.getSessionMap();
+ Map<String,Object> appMap = ec.getApplicationMap();
+ if (requestMap != null
+ && sessionMap != null
+ && appMap != null) {
+ if (requestMap.containsKey(identifier)) {
+ return Scope.REQUEST;
+ } else if (sessionMap.containsKey(identifier)) {
+ return Scope.SESSION;
+ } else if (appMap.containsKey(identifier)) {
+ return Scope.APPLICATION;
+ }
         }
-
         //not present in any scope
         return null;
 
@@ -370,18 +401,24 @@
     /**
      * Create a <code>ValueExpression</code> with the expected type of
      * <code>Object.class</code>
- * @param valueRef a value expression
+ * @param expression an EL expression
      * @return a new <code>ValueExpression</code> instance based off the
      * provided <code>valueRef</code>
      */
- public static ValueExpression getValueExpression(String valueRef) {
+ public static ValueExpression createValueExpression(String expression) {
+
+ return createValueExpression(expression, Object.class);
+
+ }
 
+
+ public static ValueExpression createValueExpression(String expression,
+ Class<?> expectedType) {
         FacesContext context = FacesContext.getCurrentInstance();
         return context.getApplication().getExpressionFactory().
             createValueExpression(context.getELContext(),
- valueRef,
- Object.class);
-
+ expression,
+ expectedType);
     }
 
 
@@ -499,4 +536,155 @@
 
     }
 
+
+ public static Scope getScopeForExpression(String expression) {
+
+ if (isMixedExpression(expression)) {
+ return (getNarrowestScopeFromExpression(expression));
+ } else {
+ return (getScopeForSingleExpression(expression));
+ }
+
+ }
+
+
+ @SuppressWarnings("deprecation")
+ public static boolean hasValidLifespan(Scope expressionScope, Scope beanScope)
+ throws EvaluationException, ReferenceSyntaxException {
+
+ //if the managed bean's scope is "none" but the scope of the
+ //referenced object is not "none", scope is invalid
+ if (beanScope == Scope.NONE) {
+ return expressionScope == Scope.NONE;
+ }
+
+ //if the managed bean's scope is "request" it is able to refer
+ //to objects in any scope
+ if (beanScope == Scope.REQUEST) {
+ return true;
+ }
+
+ //if the managed bean's scope is "session" it is able to refer
+ //to objects in other "session", "application", or "none" scopes
+ if (beanScope == Scope.SESSION) {
+ return expressionScope != Scope.REQUEST;
+ }
+
+ //if the managed bean's scope is "application" it is able to refer
+ //to objects in other "application", or "none" scopes
+ if (beanScope == Scope.APPLICATION) {
+ return !(expressionScope == Scope.REQUEST
+ || expressionScope == Scope.SESSION);
+ }
+
+ //the managed bean is required to be in either "request", "session",
+ //"application", or "none" scopes. One of the previous decision
+ //statements must be true.
+ assert (false);
+ return false;
+ }
+
+
+ @SuppressWarnings("deprecation")
+ public static ELUtils.Scope getScopeForSingleExpression(String value)
+ throws ReferenceSyntaxException, EvaluationException {
+ String[] firstSegment = new String[1];
+ ELUtils.Scope valueScope = ELUtils.getScope(value, firstSegment);
+
+ if (null == valueScope) {
+ // Perhaps the bean hasn't been created yet. See what its
+ // scope would be when it is created.
+ if (firstSegment[0] != null) {
+ BeanManager manager =
+ ApplicationAssociate.getCurrentInstance().getBeanManager();
+
+ if (manager.isManaged(firstSegment[0])) {
+ valueScope = manager.getBuilder(firstSegment[0]).getScope();
+ }
+ } else {
+ // we are referring to a bean that doesn't exist in the
+ // configuration file. Give it a wide scope...
+ valueScope = Scope.APPLICATION;
+ }
+ }
+ return valueScope;
+ }
+
+
+ @SuppressWarnings("deprecation")
+ public static Scope getNarrowestScopeFromExpression(String expression)
+ throws ReferenceSyntaxException {
+ // break the argument expression up into its component
+ // expressions, ignoring literals.
+ List<String> expressions = ELUtils.getExpressionsFromString(expression);
+
+ int shortestScope = Scope.NONE.ordinal();
+ Scope result = Scope.NONE;
+ for (String expr : expressions) {
+ // loop over the expressions
+
+ Scope lScope = getScopeForSingleExpression(expr);
+ // don't consider none
+ if (null == lScope || lScope == Scope.NONE) {
+ continue;
+ }
+
+ int currentScope = lScope.ordinal();
+
+ // if we have no basis for comparison
+ if (ManagedBeanFactory.Scope.NONE.ordinal() == shortestScope) {
+ shortestScope = currentScope;
+ result = lScope;
+ } else {
+ // we have a basis for comparison
+ if (currentScope < shortestScope) {
+ shortestScope = currentScope;
+ result = lScope;
+ }
+ }
+ }
+ return result;
+ }
+
+
+ /*
+ * Determine whether String is a mixed value binding expression or not.
+ */
+ public static boolean isMixedExpression(String expression) {
+
+ if (null == expression) {
+ return false;
+ }
+
+ // if it doesn't start and end with delimiters
+ if (!(expression.startsWith("#{") && expression.endsWith("}"))) {
+ // see if it has some inside.
+ return isExpression(expression);
+ }
+ return false;
+
+ }
+
+
+ /*
+ * Determine whether String is a value binding expression or not.
+ */
+ public static boolean isExpression(String expression) {
+
+ if (null == expression) {
+ return false;
+ }
+ int start = expression.indexOf("#{");
+
+ //check to see if attribute has an expression
+ if ((expression.indexOf("#{") != -1) &&
+ (start < expression.indexOf('}'))) {
+ return true;
+ }
+ return false;
+
+
+ }
+
+
 }
Index: src/com/sun/faces/el/FacesResourceBundleELResolver.java
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/el/FacesResourceBundleELResolver.java,v
retrieving revision 1.10
diff -u -r1.10 FacesResourceBundleELResolver.java
--- src/com/sun/faces/el/FacesResourceBundleELResolver.java 21 Mar 2007 17:57:40 -0000 1.10
+++ src/com/sun/faces/el/FacesResourceBundleELResolver.java 21 Mar 2007 22:53:47 -0000
@@ -1,5 +1,5 @@
 /*
- * $Id: FacesResourceBundleELResolver.java,v 1.10 2007/03/21 17:57:40 rlubke Exp $
+ * $Id: FacesResourceBundleELResolver.java,v 1.9 2006/09/01 01:22:42 tony_robertson Exp $
  */
 
 /*
@@ -7,40 +7,31 @@
  * of the Common Development and Distribution License
  * (the License). You may not use this file except in
  * compliance with the License.
- *
+ *
  * You can obtain a copy of the License at
  * https://javaserverfaces.dev.java.net/CDDL.html or
- * legal/CDDLv1.0.txt.
+ * legal/CDDLv1.0.txt.
  * See the License for the specific language governing
  * permission and limitations under the License.
- *
+ *
  * When distributing Covered Code, include this CDDL
  * Header Notice in each file and include the License file
- * at legal/CDDLv1.0.txt.
+ * at legal/CDDLv1.0.txt.
  * If applicable, add the following below the CDDL Header,
  * with the fields enclosed by brackets [] replaced by
  * your own identifying information:
  * "Portions Copyrighted [year] [name of copyright owner]"
- *
+ *
  * [Name of File] [ver.__] [Date]
- *
+ *
  * Copyright 2005 Sun Microsystems Inc. All Rights Reserved
  */
 
 package com.sun.faces.el;
 import com.sun.faces.application.ApplicationAssociate;
-import com.sun.faces.config.beans.DescriptionBean;
-import com.sun.faces.config.beans.DisplayNameBean;
-import com.sun.faces.config.beans.ResourceBundleBean;
-import com.sun.faces.util.Util;
+import com.sun.faces.application.ApplicationResourceBundle;
 import com.sun.faces.util.MessageUtils;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.Locale;
-import java.util.Map;
-import java.util.ResourceBundle;
-import java.beans.FeatureDescriptor;
+import com.sun.faces.util.Util;
 
 import javax.el.ELContext;
 import javax.el.ELException;
@@ -49,16 +40,22 @@
 import javax.el.PropertyNotWritableException;
 import javax.faces.application.Application;
 import javax.faces.context.FacesContext;
+import java.beans.FeatureDescriptor;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.Map;
+import java.util.ResourceBundle;
 
 /**
  * @author edburns
  */
 public class FacesResourceBundleELResolver extends ELResolver {
-
+
     /** Creates a new instance of FacesResourceBundleELResolver */
     public FacesResourceBundleELResolver() {
     }
-
+
     public Object getValue(ELContext context, Object base, Object property) {
         if (null != base) {
             return null;
@@ -69,23 +66,23 @@
             throw new PropertyNotFoundException(message);
         }
         ResourceBundle result = null;
- FacesContext facesContext = (FacesContext)
+ FacesContext facesContext = (FacesContext)
            context.getContext(FacesContext.class);
         Application app = facesContext.getApplication();
-
+
         result = app.getResourceBundle(facesContext, property.toString());
         if (null != result) {
             context.setPropertyResolved(true);
         }
-
+
         return result;
     }
-
-
 
- public Class<?> getType(ELContext context, Object base, Object property)
+
+
+ public Class<?> getType(ELContext context, Object base, Object property)
         throws ELException {
-
+
         if (null != base) {
             return null;
         }
@@ -95,18 +92,18 @@
                 (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "base and property"); // ?????
             throw new PropertyNotFoundException(message);
         }
-
+
         ResourceBundle result = null;
- FacesContext facesContext = (FacesContext)
+ FacesContext facesContext = (FacesContext)
            context.getContext(FacesContext.class);
         Application app = facesContext.getApplication();
-
+
         result = app.getResourceBundle(facesContext, property.toString());
         if (null != result) {
             context.setPropertyResolved(true);
             return ResourceBundle.class;
- }
-
+ }
+
         return null;
 
     }
@@ -120,12 +117,12 @@
                 (MessageUtils.NULL_PARAMETERS_ERROR_MESSAGE_ID, "base and property"); // ?????
             throw new PropertyNotFoundException(message);
         }
-
+
         ResourceBundle result = null;
- FacesContext facesContext = (FacesContext)
+ FacesContext facesContext = (FacesContext)
            context.getContext(FacesContext.class);
         Application app = facesContext.getApplication();
-
+
         result = app.getResourceBundle(facesContext, property.toString());
         if (null != result) {
             context.setPropertyResolved(true);
@@ -133,12 +130,12 @@
                 (MessageUtils.OBJECT_IS_READONLY);
             message = message + " base " + base + " property " + property;
             throw new PropertyNotWritableException(message);
- }
-
+ }
+
 
     }
 
- public boolean isReadOnly(ELContext context, Object base, Object property)
+ public boolean isReadOnly(ELContext context, Object base, Object property)
         throws ELException {
         if (base != null) {
             return false;
@@ -149,7 +146,7 @@
             throw new PropertyNotFoundException(message);
         }
         ResourceBundle result = null;
- FacesContext facesContext = (FacesContext)
+ FacesContext facesContext = (FacesContext)
            context.getContext(FacesContext.class);
         Application app = facesContext.getApplication();
 
@@ -157,55 +154,40 @@
         if (null != result) {
             context.setPropertyResolved(true);
             return true;
- }
+ }
 
         return false;
     }
 
     public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
-
+
         if (base != null) {
             return null;
         }
 
         ArrayList<FeatureDescriptor> list = new ArrayList<FeatureDescriptor>();
-
- FacesContext facesContext =
+
+ FacesContext facesContext =
             (FacesContext) context.getContext(FacesContext.class);
- ApplicationAssociate associate =
+ ApplicationAssociate associate =
             ApplicationAssociate.getCurrentInstance();
- Map<String,ResourceBundleBean> rbMap = associate.getResourceBundleBeanMap();
+ Map<String, ApplicationResourceBundle> rbMap = associate.getResourceBundles();
         if (rbMap == null) {
             return list.iterator();
         }
         // iterate over the list of managed beans
- for (Iterator<Map.Entry<String,ResourceBundleBean>> i = rbMap.entrySet().iterator(); i.hasNext(); ) {
- Map.Entry<String,ResourceBundleBean> entry = i.next();
+ for (Iterator<Map.Entry<String,ApplicationResourceBundle>> i = rbMap.entrySet().iterator(); i.hasNext(); ) {
+ Map.Entry<String,ApplicationResourceBundle> entry = i.next();
             String var = entry.getKey();
- ResourceBundleBean resourceBundleBean = entry.getValue();
- if ( resourceBundleBean != null) {
+ ApplicationResourceBundle bundle = entry.getValue();
+ if ( bundle != null) {
                 Locale curLocale = Util.getLocaleFromContextOrSystem(facesContext);
- String locale = curLocale.toString();
- DescriptionBean descBean =
- resourceBundleBean.getDescription(locale);
- DisplayNameBean displayNameBean =
- resourceBundleBean.getDisplayName(locale);
- String desc = "",
- displayName = "";
- descBean = (null != descBean) ? descBean :
- resourceBundleBean.getDescription("");
- if (null != descBean) {
- // handle the case where the lang or xml:lang attributes
- // are not specified on the description
- desc = descBean.getDescription();
- }
- displayNameBean = (null != displayNameBean) ? displayNameBean :
- resourceBundleBean.getDisplayName("");
- if (null != displayNameBean) {
- displayName = displayNameBean.getDisplayName();
- }
- list.add(Util.getFeatureDescriptor(var,
- displayName, desc, false, false, true,
+
+ String description = bundle.getDescription(curLocale);
+ String displayName = bundle.getDisplayName(curLocale);
+
+ list.add(Util.getFeatureDescriptor(var,
+ displayName, description, false, false, true,
                     ResourceBundle.class, Boolean.TRUE));
             }
         }
Index: src/com/sun/faces/el/ManagedBeanELResolver.java
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/el/ManagedBeanELResolver.java,v
retrieving revision 1.16
diff -u -r1.16 ManagedBeanELResolver.java
--- src/com/sun/faces/el/ManagedBeanELResolver.java 21 Mar 2007 17:57:40 -0000 1.16
+++ src/com/sun/faces/el/ManagedBeanELResolver.java 19 Apr 2007 17:14:59 -0000
@@ -29,9 +29,8 @@
 package com.sun.faces.el;
 
 import com.sun.faces.application.ApplicationAssociate;
-import com.sun.faces.config.ManagedBeanFactoryImpl;
-import com.sun.faces.config.beans.DescriptionBean;
-import com.sun.faces.config.beans.ManagedBeanBean;
+import com.sun.faces.mgbean.BeanBuilder;
+import com.sun.faces.mgbean.BeanManager;
 import com.sun.faces.util.MessageUtils;
 import com.sun.faces.util.Util;
 
@@ -41,11 +40,11 @@
 import javax.el.PropertyNotFoundException;
 import javax.faces.context.ExternalContext;
 import javax.faces.context.FacesContext;
-
 import java.beans.FeatureDescriptor;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.Iterator;
-import java.util.Locale;
+import java.util.List;
 import java.util.Map;
 
 public class ManagedBeanELResolver extends ELResolver {
@@ -68,23 +67,32 @@
         FacesContext facesContext = (FacesContext)
             context.getContext(FacesContext.class);
         ExternalContext externalContext = facesContext.getExternalContext();
-
- if (externalContext.getRequestMap().containsKey(property)
- || externalContext.getSessionMap().containsKey(property)
- || externalContext.getApplicationMap().containsKey(property)) {
- return null;
- }
-
- // if it's a managed bean, try to create it
- ApplicationAssociate associate =
- ApplicationAssociate.getCurrentInstance();
- if (null != associate) {
- result = associate.createAndMaybeStoreManagedBeans(facesContext,
- ((String)property));
- if ( result != null) {
- context.setPropertyResolved(true);
+ BeanManager manager =
+ ApplicationAssociate.getCurrentInstance().getBeanManager();
+ String beanName = property.toString();
+ if (manager != null && manager.isManaged(beanName)) {
+ ELUtils.Scope scope = manager.getBuilder(beanName).getScope();
+ // check to see if the bean is already in scope
+ switch (scope) {
+ case REQUEST:
+ if (externalContext.getRequestMap().containsKey(beanName)) {
+ return null;
+ }
+ case SESSION:
+ if (externalContext.getSessionMap().containsKey(beanName)) {
+ return null;
+ }
+ case APPLICATION:
+ if (externalContext.getApplicationMap().containsKey(beanName)) {
+ return null;
+ }
             }
+
+ // no bean found in scope. create a new instance
+ result = manager.create(beanName, facesContext);
+ context.setPropertyResolved(result != null);
         }
+
         return result;
     }
 
@@ -133,41 +141,39 @@
             return null;
         }
 
- ArrayList<FeatureDescriptor> list = new ArrayList<FeatureDescriptor>();
-
         FacesContext facesContext =
             (FacesContext) context.getContext(FacesContext.class);
- ApplicationAssociate associate =
- ApplicationAssociate.getCurrentInstance();
- Map mbMap = associate.getManagedBeanFactoryMap();
- if (mbMap == null) {
- return list.iterator();
+ BeanManager beanManager =
+ ApplicationAssociate.getCurrentInstance().getBeanManager();
+ if (beanManager == null || beanManager.getRegisteredBeans().isEmpty()) {
+ List<FeatureDescriptor> l = Collections.emptyList();
+ return l.iterator();
         }
+
+ Map<String,BeanBuilder> beans = beanManager.getRegisteredBeans();
+ List<FeatureDescriptor> list =
+ new ArrayList<FeatureDescriptor>(beans.size());
         // iterate over the list of managed beans
- for (Iterator i = mbMap.entrySet().iterator(); i.hasNext(); ) {
- Map.Entry entry = (Map.Entry) i.next();
- String managedBeanName = (String) entry.getKey();
- ManagedBeanFactoryImpl managedBeanFactory = (ManagedBeanFactoryImpl)
- entry.getValue();
- ManagedBeanBean managedBean = managedBeanFactory.getManagedBeanBean();
-
- if ( managedBean != null) {
- Locale curLocale = Util.getLocaleFromContextOrSystem(facesContext);
- String locale = curLocale.toString();
- DescriptionBean descBean = managedBean.getDescription(locale);
- String desc = "";
- descBean = (null != descBean) ? descBean :
- managedBean.getDescription("");
- if (null != descBean) {
- // handle the case where the lang or xml:lang attributes
- // are not specified on the description
- desc = descBean.getDescription();
- }
- list.add(Util.getFeatureDescriptor(managedBeanName,
- managedBeanName, desc, false, false, true,
- managedBeanFactory.getManagedBeanClass(), Boolean.TRUE));
+ for (Map.Entry<String,BeanBuilder> bean : beans.entrySet()) {
+ String beanName = bean.getKey();
+ BeanBuilder builder = bean.getValue();
+ String loc = Util.getLocaleFromContextOrSystem(facesContext).toString();
+ Map<String,String> descriptions = builder.getDescriptions();
+
+ String description = descriptions.get(loc);
+ if (description == null) {
+ description = descriptions.get("DEFAULT");
             }
+ list.add(Util.getFeatureDescriptor(beanName,
+ beanName,
+ description,
+ false,
+ false,
+ true,
+ builder.getBeanClass(),
+ Boolean.TRUE));
         }
+
         return list.iterator();
     }
 
Index: src/com/sun/faces/lifecycle/LifecycleImpl.java
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/lifecycle/LifecycleImpl.java,v
retrieving revision 1.75
diff -u -r1.75 LifecycleImpl.java
--- src/com/sun/faces/lifecycle/LifecycleImpl.java 3 Apr 2007 18:25:17 -0000 1.75
+++ src/com/sun/faces/lifecycle/LifecycleImpl.java 16 Apr 2007 23:47:09 -0000
@@ -32,6 +32,7 @@
 import com.sun.faces.renderkit.RenderKitUtils;
 import com.sun.faces.util.MessageUtils;
 import com.sun.faces.util.Util;
+import com.sun.faces.util.Timer;
 
 import javax.faces.FacesException;
 import javax.faces.context.FacesContext;
@@ -245,15 +246,18 @@
         try {
             // Execute this phase itself (if still needed)
             if (!skipping(phaseId, context)) {
- long start = System.currentTimeMillis();
- phase.execute(context);
- long stop = System.currentTimeMillis();
- if (TIMING_LOGGER.isLoggable(Level.FINE)) {
- TIMING_LOGGER.fine("TIMING: Exectution time for phase '"
- + phaseId.toString()
- + "': "
- + (stop - start));
+ Timer timer = Timer.getInstance();
+ if (timer != null) {
+ timer.startTiming();
                 }
+
+ phase.execute(context);
+
+ if (timer != null) {
+ timer.stopTiming();
+ timer.logResult("Execution time for phase '"
+ + phaseId.toString());
+ }
             }
         } catch (Exception e) {
             // Log the problem, but continue
Index: src/com/sun/faces/spi/ManagedBeanFactory.java
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/spi/ManagedBeanFactory.java,v
retrieving revision 1.6
diff -u -r1.6 ManagedBeanFactory.java
--- src/com/sun/faces/spi/ManagedBeanFactory.java 1 Sep 2006 01:22:59 -0000 1.6
+++ src/com/sun/faces/spi/ManagedBeanFactory.java 11 Apr 2007 04:14:04 -0000
@@ -104,6 +104,8 @@
  * notification scheme.</p>
  *
  * @author edburns, rlubke
+ * @deprecated this class is no longer used by by the implementation
+ * as of 1.2_05
  */
 public abstract class ManagedBeanFactory {
     
Index: src/com/sun/faces/util/MessageUtils.java
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/util/MessageUtils.java,v
retrieving revision 1.13
diff -u -r1.13 MessageUtils.java
--- src/com/sun/faces/util/MessageUtils.java 1 Mar 2007 20:59:01 -0000 1.13
+++ src/com/sun/faces/util/MessageUtils.java 17 Apr 2007 21:32:16 -0000
@@ -101,6 +101,8 @@
           "com.sun.faces.ERROR_GETTING_VALUE_BINDING";
     public static final String ERROR_OPENING_FILE_ERROR_MESSAGE_ID =
           "com.sun.faces.ERROR_OPENING_FILE";
+ public static final String ERROR_PROCESSING_CONFIG_ID =
+ "com.sun.faces.ERROR_PROCESSING_CONFIG";
     public static final String ERROR_REGISTERING_DTD_ERROR_MESSAGE_ID =
           "com.sun.faces.ERROR_REGISTERING_DTD";
     public static final String ERROR_SETTING_BEAN_PROPERTY_ERROR_MESSAGE_ID =
@@ -144,13 +146,61 @@
     public static final String LIFECYCLE_ID_NOT_FOUND_ERROR_MESSAGE_ID =
           "com.sun.faces.LIFECYCLE_ID_NOT_FOUND";
     public static final String MANAGED_BEAN_CANNOT_SET_LIST_ARRAY_PROPERTY_ID =
- "com.sun.faces.MANAGED_BEAN_CANNOT_SET_LIST_ARRAY_PROPERTY";
- public static final String MANAGED_BEAN_CANNOT_SET_MAP_PROPERTY_ID =
- "com.sun.faces.MANAGED_BEAN_CANNOT_SET_MAP_PROPERTY";
+ "com.sun.faces.MANAGED_BEAN_CANNOT_SET_LIST_ARRAY_PROPERTY";
     public static final String MANAGED_BEAN_EXISTING_VALUE_NOT_LIST_ID =
           "com.sun.faces.MANAGED_BEAN_EXISTING_VALUE_NOT_LIST";
     public static final String MANAGED_BEAN_TYPE_CONVERSION_ERROR_ID =
           "com.sun.faces.MANAGED_BEAN_TYPE_CONVERSION_ERROR";
+ public static final String MANAGED_BEAN_CLASS_NOT_FOUND_ERROR_ID =
+ "com.sun.faces.MANAGED_BEAN_CLASS_NOT_FOUND_ERROR";
+ public static final String MANAGED_BEAN_CLASS_DEPENDENCY_NOT_FOUND_ERROR_ID =
+ "com.sun.faces.MANAGED_BEAN_CLASS_DEPENDENCY_NOT_FOUND_ERROR";
+ public static final String MANAGED_BEAN_CLASS_IS_NOT_PUBLIC_ERROR_ID =
+ "com.sun.faces.MANAGED_BEAN_CLASS_IS_NOT_PUBLIC_ERROR";
+ public static final String MANAGED_BEAN_CLASS_IS_ABSTRACT_ERROR_ID =
+ "com.sun.faces.MANAGED_BEAN_CLASS_IS_ABSTRACT_ERROR";
+ public static final String MANAGED_BEAN_CLASS_NO_PUBLIC_NOARG_CTOR_ERROR_ID =
+ "com.sun.faces.MANAGED_BEAN_CLASS_NO_PUBLIC_NOARG_CTOR_ERROR";
+ public static final String MANAGED_BEAN_INJECTION_ERROR_ID =
+ "com.sun.faces.MANAGED_BEAN_INJECTION_ERROR";
+ public static final String MANAGED_BEAN_LIST_PROPERTY_CONFIG_ERROR_ID =
+ "com.sun.faces.MANAGED_BEAN_LIST_PROPERTY_CONFIG_ERROR";
+ public static final String MANAGED_BEAN_AS_LIST_CONFIG_ERROR_ID =
+ "com.sun.faces.MANAGED_BEAN_AS_LIST_CONFIG_ERROR";
+ public static final String MANAGED_BEAN_AS_MAP_CONFIG_ERROR_ID =
+ "com.sun.faces.MANAGED_BEAN_AS_MAP_CONFIG_ERROR";
+ public static final String MANAGED_BEAN_MAP_PROPERTY_CONFIG_ERROR_ID =
+ "com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_CONFIG_ERROR";
+ public static final String MANAGED_BEAN_MAP_PROPERTY_INCORRECT_SETTER_ERROR_ID =
+ "com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_SETTER_ERROR";
+ public static final String MANAGED_BEAN_MAP_PROPERTY_INCORRECT_GETTER_ERROR_ID =
+ "com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_GETTER_ERROR";
+ public static final String MANAGED_BEAN_DEFINED_PROPERTY_CLASS_NOT_COMPATIBLE_ERROR_ID =
+ "com.sun.faces.MANAGED_BEAN_DEFINED_PROPERTY_CLASS_NOT_COMPATIBLE_ERROR";
+ public static final String MANAGED_BEAN_INTROSPECTION_ERROR_ID =
+ "com.sun.faces.MANAGED_BEAN_INTROSPECTION_ERROR";
+ public static final String MANAGED_BEAN_PROPERTY_DOES_NOT_EXIST_ERROR_ID =
+ "com.sun.faces.MANAGED_BEAN_PROPERTY_DOES_NOT_EXIST_ERROR";
+ public static final String MANAGED_BEAN_PROPERTY_HAS_NO_SETTER_ID =
+ "com.sun.faces.MANAGED_BEAN_PROPERTY_HAS_NO_SETTER_ERROR";
+ public static final String MANAGED_BEAN_PROPERTY_INCORRECT_ARGS_ERROR_ID =
+ "com.sun.faces.MANAGED_BEAN_PROPERTY_INCORRECT_ARGS_ERROR";
+ public static final String MANAGED_BEAN_LIST_SETTER_DOES_NOT_ACCEPT_LIST_OR_ARRAY_ERROR_ID =
+ "com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_ACCEPT_LIST_OR_ARRAY_ERROR";
+ public static final String MANAGED_BEAN_LIST_GETTER_DOES_NOT_RETURN_LIST_OR_ARRAY_ERROR_ID =
+ "com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_RETURN_LIST_OR_ARRAY_ERROR";
+ public static final String MANAGED_BEAN_LIST_GETTER_ARRAY_NO_SETTER_ERROR_ID =
+ "com.sun.faces.MANAGED_BEAN_LIST_GETTER_ARRAY_NO_SETTER_ERROR";
+ public static final String MANAGED_BEAN_UNABLE_TO_SET_PROPERTY_ERROR_ID =
+ "com.sun.faces.MANAGED_BEAN_UNABLE_TO_SET_PROPERTY_ERROR";
+ public static final String MANAGED_BEAN_PROBLEMS_ERROR_ID =
+ "com.sun.faces.MANAGED_BEAN_PROBLEMS_ERROR";
+ public static final String MANAGED_BEAN_PROBLEMS_STARTUP_ERROR_ID =
+ "com.sun.faces.MANAGED_BEAN_PROBLEMS_STARTUP_ERROR";
+ public static final String MANAGED_BEAN_UNKNOWN_PROCESSING_ERROR_ID =
+ "com.sun.faces.MANAGED_BEAN_UNKNOWN_PROCESSING_ERROR";
+ public static final String MANAGED_BEAN_PROPERTY_UNKNOWN_PROCESSING_ERROR_ID =
+ "com.sun.faces.MANAGED_BEAN_PROPERTY_UNKNOWN_PROCESSING_ERROR";
     public static final String MAXIMUM_EVENTS_REACHED_ERROR_MESSAGE_ID =
           "com.sun.faces.MAXIMUM_EVENTS_REACHED";
     public static final String MISSING_CLASS_ERROR_MESSAGE_ID =
Index: src/javax/faces/Messages.properties
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/javax/faces/Messages.properties,v
retrieving revision 1.49
diff -u -r1.49 Messages.properties
--- src/javax/faces/Messages.properties 1 Mar 2007 20:59:03 -0000 1.49
+++ src/javax/faces/Messages.properties 17 Apr 2007 22:04:46 -0000
@@ -127,6 +127,7 @@
 com.sun.faces.ERROR_GETTING_VALUE_BINDING=Can''t get ValueBinding for value: ''{0}''.
 com.sun.faces.ERROR_GETTING_VALUEREF_VALUE=Can''t get value from value binding expression: ''{0}''.
 com.sun.faces.ERROR_OPENING_FILE=Can''t open configuration file: ''{0}''.
+com.sun.faces.ERROR_PROCESSING_CONFIG=An unexpected error occurred during configuration processing.
 com.sun.faces.ERROR_REGISTERING_DTD=Can''t register DTD: ''{0}''.
 com.sun.faces.ERROR_SETTING_BEAN_PROPERTY=Can''t set managed bean property: ''{0}''.
 com.sun.faces.EVAL_ATTR_UNEXPECTED_TYPE=Evaluation of expression for attribute ''{0}'' resulted in unexpected type. Expected {1}, but received {2}.
@@ -144,17 +145,39 @@
 com.sun.faces.INVALID_EXPRESSION=Invalid expression: ''{0}''.
 com.sun.faces.INVALID_INIT_PARAM=Invalid value: ''{0}'', for initialization parameter: ''{1}''. Acceptable values are 'true' or 'false'. Defaulting to 'false'.
 com.sun.faces.INVALID_MESSAGE_SEVERITY_IN_CONFIG=Invalid Message severity ''{0}'' defined in configuration.
-com.sun.faces.INVALID_SCOPE_LIFESPAN=The scope of the referenced object: ''{0}'' is shorter than the referring object
+com.sun.faces.INVALID_SCOPE_LIFESPAN=The scope of the object referenced by expression ''{0}'', ''{1}'', is shorter than the referring managed bean''s (''{2}'') scope of ''{3}''
 com.sun.faces.LIFECYCLE_ID_ALREADY_ADDED=LifecycleId already added for id: ''{0}''.
 com.sun.faces.LIFECYCLE_ID_NOT_FOUND=LifecycleId not found for id ''{0}''.
 com.sun.faces.MAXIMUM_EVENTS_REACHED=Maximum number of events ''{0}'' reached.
 com.sun.faces.MANAGED_BEAN_CANNOT_SET_LIST_ARRAY_PROPERTY=Unable to set target property ''{0}'' in managed bean ''{1}''. The property must accept either List or Array instances.
-com.sun.faces.MANAGED_BEAN_CANNOT_SET_MAP_PROPERTY=Unable to set target property ''{0}'' in managed bean ''{1}''. The property must accept Map instances.
+com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_SETTER_ERROR=Property ''{0}'' in managed bean ''{1}'' is defined as a map property, however, the setter in the class does not accept Map instances.
+com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_GETTER_ERROR=Property ''{0}'' in managed bean ''{1}'' is defined as a map property, however, the getter in the class does not return Map instances.
+com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_ACCEPT_LIST_OR_ARRAY_ERROR=Property ''{0}'' in managed bean ''{1}'' is defined as a list property, however, the setter in the class does not accept List or Array instances.
+com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_RETURN_LIST_OR_ARRAY_ERROR=Property ''{0}'' in managed bean ''{1}'' is defined as a list property, however, the getter in the class does not return List or Array instances.
+com.sun.faces.MANAGED_BEAN_LIST_GETTER_ARRAY_NO_SETTER_ERROR=Property ''{0}'' in managed bean ''{1}'' is defined as a list property. The getter returns an array type, but there is no associated setter.
 com.sun.faces.MANAGED_BEAN_EXISTING_VALUE_NOT_LIST=Unable to set target property ''{0}'' in managed bean ''{1}''. The target property returned an existing value that was not an instance of List.
-com.sun.faces.MANAGED_BEAN_LIST_PROPERTY_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. Managed bean contains a managed property with list entries, but has illegally defined a value and/or map entries.
-com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. Managed bean contains a managed property with map entries, but has illegally defined a value as well.
-com.sun.faces.MANAGED_BEAN_PROPERTY_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. Managed bean contains a property containing no list or map entires, nor any value elements.
+com.sun.faces.MANAGED_BEAN_AS_LIST_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. The managed bean is configured as a List, but also attempts to define map entries or managed properties.
+com.sun.faces.MANAGED_BEAN_AS_MAP_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. The managed bean is configured as a Map, but also attempts to define managed properties.
+com.sun.faces.MANAGED_BEAN_LIST_PROPERTY_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. The managed bean contains a managed property named ''{1}'' with list entries, but has illegally defined a value and/or map entries.
+com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. The managed bean contains a managed property named ''{1}'' with map entries, but has illegally defined a value as well.
+com.sun.faces.MANAGED_BEAN_PROPERTY_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. The managed bean contains a managed property named ''{1}'' containing no list or map entires, nor any value elements.
 com.sun.faces.MANAGED_BEAN_TYPE_CONVERSION_ERROR=Error performing conversion of value ''{0}'' of type ''{1}'' to type ''{2}'' for managed bean ''{3}''.
+com.sun.faces.MANAGED_BEAN_CLASS_NOT_FOUND_ERROR=Bean or property class Class ''{0}'' for managed bean ''{1}'' cannot be found.
+com.sun.faces.MANAGED_BEAN_CLASS_DEPENDENCY_NOT_FOUND_ERROR=Bean or property class ''{0}'' for managed bean ''{1}'' cannot be loaded due to a missing dependency: {2}.
+com.sun.faces.MANAGED_BEAN_CLASS_IS_NOT_PUBLIC_ERROR=Managed bean class ''{0}'' for managed bean ''{1}'' is not declared public.
+com.sun.faces.MANAGED_BEAN_CLASS_IS_ABSTRACT_ERROR=Managed bean class ''{0}'' for managed bean ''{1}'' is declard abstract.
+com.sun.faces.MANAGED_BEAN_CLASS_NO_PUBLIC_NOARG_CTOR_ERROR=Managed bean class ''{0}'' for managed bean ''{1}'' doesn't declare a public no-argument constructor.
+com.sun.faces.MANAGED_BEAN_INJECTION_ERROR=An error occurred performing resource injection on managed bean ''{0}''
+com.sun.faces.MANAGED_BEAN_DEFINED_PROPERTY_CLASS_NOT_COMPATIBLE_ERROR=The property ''{0}'' for managed bean ''{1}'' is defined with a property class of ''{2}'', however, this class is not assignable to the property.
+com.sun.faces.MANAGED_BEAN_INTROSPECTION_ERROR=Unable to Introspect managed bean ''{0}''
+com.sun.faces.MANAGED_BEAN_PROPERTY_DOES_NOT_EXIST_ERROR=Property ''{0}'' for managed bean ''{1}'' does not exist.
+com.sun.faces.MANAGED_BEAN_PROPERTY_HAS_NO_SETTER_ERROR=Property ''{0}'' for managed bean ''{1}'' has no setter.
+com.sun.faces.MANAGED_BEAN_PROPERTY_INCORRECT_ARGS_ERROR=Property ''{0}'' for managed bean ''{1}'' accepts more than one argument
+com.sun.faces.MANAGED_BEAN_UNABLE_TO_SET_PROPERTY_ERROR=Unable to set property ''{0}'' for managed bean ''{1}''
+com.sun.faces.MANAGED_BEAN_PROBLEMS_ERROR=Unable to create managed bean ''{0}''. The following problems were found:
+com.sun.faces.MANAGED_BEAN_PROBLEMS_STARTUP_ERROR=JSF will be unable to create managed bean ''{0}'' when it is requested. The following problems where found:
+com.sun.faces.MANAGED_BEAN_UNKNOWN_PROCESSING_ERROR=Unexpected error processing managed bean ''{0}''
+com.sun.faces.MANAGED_BEAN_PROPERTY_UNKNOWN_PROCESSING_ERROR=Unexpcted error processing managed property ''{0}''
 com.sun.faces.MISSING_CLASS_ERROR=Missing Class: Can''t load class ''{0}''.
 com.sun.faces.MISSING_RESOURCE_ERROR=Missing Resource: Can''t get ResourceBundle.
 com.sun.faces.MODELUPDATE_ERROR=Model Update failure for value ''{0}'' in model''{1}''.
@@ -191,7 +214,7 @@
 com.sun.faces.CANNOT_VALIDATE=Unable to resolve a Validator instance using either validatorId ''{0}'' or binding ''{1}''.
 
 
-com.sun.faces.CYCLIC_REFERENCE_ERROR=Possible cyclic reference to managed bean "{0}"
+com.sun.faces.CYCLIC_REFERENCE_ERROR=Managed bean ''{0}'' contains cyclic references. Evaluation path: ''{1}''.
 com.sun.faces.OBJECT_IS_READONLY={0} object is read only
 com.sun.faces.APPLICATION_INIT_COMPLETE_ERROR_ID=ELResolvers cannot be added after the application initialization is complete.
 com.sun.faces.INCORRECT_JSP_VERSION=Incorrect JSP version found, method ''{0}'' does not exist.
Index: src/javax/faces/Messages_de.properties
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/javax/faces/Messages_de.properties,v
retrieving revision 1.45
diff -u -r1.45 Messages_de.properties
--- src/javax/faces/Messages_de.properties 1 Mar 2007 20:59:03 -0000 1.45
+++ src/javax/faces/Messages_de.properties 17 Apr 2007 22:04:47 -0000
@@ -125,10 +125,33 @@
 com.sun.faces.SAVING_STATE_ERROR=Error while saving state in ''{0}'': ''{1}''.
 com.sun.faces.RENDERER_NOT_FOUND=Renderer not found for Renderer type: ''{0}''.
 com.sun.faces.MAXIMUM_EVENTS_REACHED=Maximum number of events ''{0}'' reached.
-com.sun.faces.MANAGED_BEAN_CANNOT_SET_LIST_ARRAY_PROPERTY=Unable to set target property ''{0}'' in managed bean ''{1}''. The property must accept either List or Array instances.
-com.sun.faces.MANAGED_BEAN_CANNOT_SET_MAP_PROPERTY=Unable to set target property ''{0}'' in managed bean ''{1}''. The property must accept Map instances.
-com.sun.faces.MANAGED_BEAN_EXISTING_VALUE_NOT_LIST=Unable to set target property ''{0}'' in managed bean ''{1}''. The target property returned an existing value that was not an instance of List.
+com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_SETTER_ERROR=Property ''{0}'' in managed bean ''{1}'' is defined as a map property, however, the setter in the class does not accept Map instances.
+com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_GETTER_ERROR=Property ''{0}'' in managed bean ''{1}'' is defined as a map property, however, the getter in the class does not return Map instances.
+com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_ACCEPT_LIST_OR_ARRAY_ERROR=Property ''{0}'' in managed bean ''{1}'' is defined as a list property, however, the setter in the class does not accept List or Array instances.
+com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_RETURN_LIST_OR_ARRAY_ERROR=Property ''{0}'' in managed bean ''{1}'' is defined as a list property, however, the getter in the class does not return List or Array instances.
+com.sun.faces.MANAGED_BEAN_LIST_GETTER_ARRAY_NO_SETTER_ERROR=Property ''{0}'' in managed bean ''{1}'' is defined as a list property. The getter returns an array type, but there is no associated setter.
+com.sun.faces.MANAGED_BEAN_AS_LIST_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. The managed bean is configured as a List, but also attempts to define map entries or managed properties.
+com.sun.faces.MANAGED_BEAN_AS_MAP_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. The managed bean is configured as a Map, but also attempts to define managed properties.
+com.sun.faces.MANAGED_BEAN_LIST_PROPERTY_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. The managed bean contains a managed property named ''{1}'' with list entries, but has illegally defined a value and/or map entries.
+com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. The managed bean contains a managed property named ''{1}'' with map entries, but has illegally defined a value as well.
+com.sun.faces.MANAGED_BEAN_PROPERTY_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. The managed bean contains a managed property named ''{1}'' containing no list or map entires, nor any value elements.
 com.sun.faces.MANAGED_BEAN_TYPE_CONVERSION_ERROR=Error performing conversion of value ''{0}'' of type ''{1}'' to type ''{2}'' for managed bean ''{3}''.
+com.sun.faces.MANAGED_BEAN_CLASS_NOT_FOUND_ERROR=Bean or property class Class ''{0}'' for managed bean ''{1}'' cannot be found.
+com.sun.faces.MANAGED_BEAN_CLASS_DEPENDENCY_NOT_FOUND_ERROR=Bean or property class ''{0}'' for managed bean ''{1}'' cannot be loaded due to a missing dependency: {2}.
+com.sun.faces.MANAGED_BEAN_CLASS_IS_NOT_PUBLIC_ERROR=Managed bean class ''{0}'' for managed bean ''{1}'' is not declared public.
+com.sun.faces.MANAGED_BEAN_CLASS_IS_ABSTRACT_ERROR=Managed bean class ''{0}'' for managed bean ''{1}'' is declard abstract.
+com.sun.faces.MANAGED_BEAN_CLASS_NO_PUBLIC_NOARG_CTOR_ERROR=Managed bean class ''{0}'' for managed bean ''{1}'' doesn't declare a public no-argument constructor.
+com.sun.faces.MANAGED_BEAN_INJECTION_ERROR=An error occurred performing resource injection on managed bean ''{0}''
+com.sun.faces.MANAGED_BEAN_DEFINED_PROPERTY_CLASS_NOT_COMPATIBLE_ERROR=The property ''{0}'' for managed bean ''{1}'' is defined with a property class of ''{2}'', however, this class is not assignable to the property.
+com.sun.faces.MANAGED_BEAN_INTROSPECTION_ERROR=Unable to Introspect managed bean ''{0}''
+com.sun.faces.MANAGED_BEAN_PROPERTY_DOES_NOT_EXIST_ERROR=Property ''{0}'' for managed bean ''{1}'' does not exist.
+com.sun.faces.MANAGED_BEAN_PROPERTY_HAS_NO_SETTER_ERROR=Property ''{0}'' for managed bean ''{1}'' has no setter.
+com.sun.faces.MANAGED_BEAN_PROPERTY_INCORRECT_ARGS_ERROR=Property ''{0}'' for managed bean ''{1}'' accepts more than one argument
+com.sun.faces.MANAGED_BEAN_UNABLE_TO_SET_PROPERTY_ERROR=Unable to set property ''{0}'' for managed bean ''{1}''
+com.sun.faces.MANAGED_BEAN_PROBLEMS_ERROR=Unable to create managed bean ''{0}''. The following problems were found:
+com.sun.faces.MANAGED_BEAN_PROBLEMS_STARTUP_ERROR=JSF will be unable to create managed bean ''{0}'' when it is requested. The following problems where found:
+com.sun.faces.MANAGED_BEAN_UNKNOWN_PROCESSING_ERROR=Unexpected error processing managed bean ''{0}''
+com.sun.faces.MANAGED_BEAN_PROPERTY_UNKNOWN_PROCESSING_ERROR=Unexpcted error processing managed property ''{0}''
 com.sun.faces.NULL_CONFIGURATION=No Configuration loaded for the application.
 com.sun.faces.ERROR_OPENING_FILE=Can''t open configuration file: ''{0}''.
 com.sun.faces.ERROR_REGISTERING_DTD=Can''t register DTD: ''{0}''.
@@ -138,7 +161,7 @@
 com.sun.faces.ERROR_GETTING_VALUEREF_VALUE=Can''t get value from value reference expression: ''{0}''.
 com.sun.faces.CANT_INTROSPECT_CLASS=Can''t introspect class: ''{0}''
 com.sun.faces.CANT_CONVERT_VALUE=Can''t convert property: ''{0}'' to value type: ''{1}''.
-com.sun.faces.INVALID_SCOPE_LIFESPAN=The scope of the referenced object: ''{0}'' is shorter than the referring object
+com.sun.faces.INVALID_SCOPE_LIFESPAN=com.sun.faces.INVALID_SCOPE_LIFESPAN=The scope of the object referenced by expression ''{0}'', ''{1}'', is shorter than the referring managed bean''s (''{2}'') scope of ''{3}''
 com.sun.faces.ENCODING_ERROR=Unrecognized Character Encoding.
 com.sun.faces.ILLEGAL_IDENTIFIER_LVALUE_MODE=Ung??ltiger Gebrauch des impliziten Gegenstandbezeichners im lValue Modus: ''{0}''
 com.sun.faces.VALIDATION_ID_ERROR=Validation error. The following JSF tags are required to contain IDs:''{0}''
@@ -165,13 +188,14 @@
 com.sun.faces.FACES_CONTEXT_NOT_FOUND=No FacesContext is available to process this request. This is most likely due to the request being sent to the wrong path.
 com.sun.faces.CANNOT_CONVERT=Unable to resolve a Converter instance using either converterId ''{0}'' or binding ''{1}''.
 com.sun.faces.CANNOT_VALIDATE=Unable to resolve a Validator instance using either validatorId ''{0}'' or binding ''{1}''.
+com.sun.faces.ERROR_PROCESSING_CONFIG=An unexpected error occurred during configuration processing.
 
 com.sun.faces.NULL_FORVALUE=Bestandteil "{0}" nicht gefunden\
 com.sun.faces.EMPTY_PARAMETER=Parameter ist empty
 com.sun.faces.ASSERTION_FAILED=Assertion-Fehler
 com.sun.faces.OBJECT_CREATION_ERROR=One or more confgured application objects could not be created. Check your web application logs for details.
 
-com.sun.faces.CYCLIC_REFERENCE_ERROR=Possible cyclic reference to managed bean "{0}"
+com.sun.faces.CYCLIC_REFERENCE_ERROR=Managed bean ''{0}'' contains cyclic references. Evaluation path: ''{1}''.
 
 com.sun.faces.OBJECT_IS_READONLY={0} object is read only
 com.sun.faces.APPLICATION_INIT_COMPLETE_ERROR_ID=ELResolvers cannot be added after the application initialization is complete.
Index: src/javax/faces/Messages_en.properties
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/javax/faces/Messages_en.properties,v
retrieving revision 1.18
diff -u -r1.18 Messages_en.properties
--- src/javax/faces/Messages_en.properties 1 Mar 2007 20:59:03 -0000 1.18
+++ src/javax/faces/Messages_en.properties 17 Apr 2007 22:04:47 -0000
@@ -1,25 +1,26 @@
 #
+#
 # The contents of this file are subject to the terms
 # of the Common Development and Distribution License
 # (the License). You may not use this file except in
 # compliance with the License.
-#
+#
 # You can obtain a copy of the License at
 # https://javaserverfaces.dev.java.net/CDDL.html or
-# legal/CDDLv1.0.txt.
+# legal/CDDLv1.0.txt.
 # See the License for the specific language governing
 # permission and limitations under the License.
-#
+#
 # When distributing Covered Code, include this CDDL
 # Header Notice in each file and include the License file
-# at legal/CDDLv1.0.txt.
+# at legal/CDDLv1.0.txt.
 # If applicable, add the following below the CDDL Header,
 # with the fields enclosed by brackets [] replaced by
 # your own identifying information:
 # "Portions Copyrighted [year] [name of copyright owner]"
-#
+#
 # [Name of File] [ver.__] [Date]
-#
+#
 # Copyright 2005 Sun Microsystems Inc. All Rights Reserved
 #
 
@@ -35,7 +36,7 @@
 
 javax.faces.component.UIInput.CONVERSION={0}: Conversion error occurred.
 javax.faces.component.UIInput.REQUIRED={0}: Validation Error: Value is required.
-javax.faces.component.UIInput.UPDATE={0}: An error occurred when processing your submitted information.
+javax.faces.component.UIInput.UPDATE={0}: An error occurred when processing your submitted information.
 javax.faces.component.UISelectOne.INVALID={0}: Validation Error: Value is not valid
 javax.faces.component.UISelectMany.INVALID={0}: Validation Error: Value is not valid
 
@@ -43,24 +44,24 @@
 # Converter Errors
 # ==============================================================================
 javax.faces.converter.BigDecimalConverter.DECIMAL={2}: ''{0}'' must be a signed decimal number.
-javax.faces.converter.BigDecimalConverter.DECIMAL_detail={2}: ''{0}'' must be a signed decimal number consisting of zero or more digits, that may be followed by a decimal point and fraction. Example: {1}
+javax.faces.converter.BigDecimalConverter.DECIMAL_detail={2}: ''{0}'' must be a signed decimal number consisting of zero or more digits, that may be followed by a decimal point and fraction. Example: {1}
 javax.faces.converter.BigIntegerConverter.BIGINTEGER={2}: ''{0}'' must be a number consisting of one or more digits.
-javax.faces.converter.BigIntegerConverter.BIGINTEGER_detail={2}: ''{0}'' must be a number consisting of one or more digits. Example: {1}
+javax.faces.converter.BigIntegerConverter.BIGINTEGER_detail={2}: ''{0}'' must be a number consisting of one or more digits. Example: {1}
 javax.faces.converter.BooleanConverter.BOOLEAN={1}: ''{0}'' must be 'true' or 'false'.
 javax.faces.converter.BooleanConverter.BOOLEAN_detail={1}: ''{0}'' must be 'true' or 'false'. Any value other than 'true' will evaluate to 'false'.
 javax.faces.converter.ByteConverter.BYTE={2}: ''{0}'' must be a number between 0 and 255.
-javax.faces.converter.ByteConverter.BYTE_detail={2}: ''{0}'' must be a number between 0 and 255. Example: {1}
+javax.faces.converter.ByteConverter.BYTE_detail={2}: ''{0}'' must be a number between 0 and 255. Example: {1}
 javax.faces.converter.CharacterConverter.CHARACTER={1}: ''{0}'' must be a valid character.
 javax.faces.converter.CharacterConverter.CHARACTER_detail={1}: ''{0}'' must be a valid ASCII character.
 javax.faces.converter.DateTimeConverter.DATE={2}: ''{0}'' could not be understood as a date.
-javax.faces.converter.DateTimeConverter.DATE_detail={2}: ''{0}'' could not be understood as a date. Example: {1}
+javax.faces.converter.DateTimeConverter.DATE_detail={2}: ''{0}'' could not be understood as a date. Example: {1}
 javax.faces.converter.DateTimeConverter.TIME={2}: ''{0}'' could not be understood as a time.
-javax.faces.converter.DateTimeConverter.TIME_detail={2}: ''{0}'' could not be understood as a time. Example: {1}
+javax.faces.converter.DateTimeConverter.TIME_detail={2}: ''{0}'' could not be understood as a time. Example: {1}
 javax.faces.converter.DateTimeConverter.DATETIME={2}: ''{0}'' could not be understood as a date and time.
-javax.faces.converter.DateTimeConverter.DATETIME_detail={2}: ''{0}'' could not be understood as a date and time. Example: {1}
+javax.faces.converter.DateTimeConverter.DATETIME_detail={2}: ''{0}'' could not be understood as a date and time. Example: {1}
 javax.faces.converter.DateTimeConverter.PATTERN_TYPE={1}: A 'pattern' or 'type' attribute must be specified to convert the value ''{0}''.
 javax.faces.converter.DoubleConverter.DOUBLE={2}: ''{0}'' must be a number consisting of one or more digits.
-javax.faces.converter.DoubleConverter.DOUBLE_detail={2}: ''{0}'' must be a number between 4.9E-324 and 1.7976931348623157E308 Example: {1}
+javax.faces.converter.DoubleConverter.DOUBLE_detail={2}: ''{0}'' must be a number between 4.9E-324 and 1.7976931348623157E308 Example: {1}
 javax.faces.converter.EnumConverter.ENUM={2}: ''{0}'' must be convertible to an enum.
 javax.faces.converter.EnumConverter.ENUM_detail={2}: ''{0}'' must be convertible to an enum from the enum that contains the constant ''{1}''.
 javax.faces.converter.EnumConverter.ENUM_NO_CLASS={1}: ''{0}'' must be convertible to an enum from the enum, but no enum class provided.
@@ -126,6 +127,7 @@
 com.sun.faces.ERROR_GETTING_VALUE_BINDING=Can''t get ValueBinding for value: ''{0}''.
 com.sun.faces.ERROR_GETTING_VALUEREF_VALUE=Can''t get value from value binding expression: ''{0}''.
 com.sun.faces.ERROR_OPENING_FILE=Can''t open configuration file: ''{0}''.
+com.sun.faces.ERROR_PROCESSING_CONFIG=An unexpected error occurred during configuration processing.
 com.sun.faces.ERROR_REGISTERING_DTD=Can''t register DTD: ''{0}''.
 com.sun.faces.ERROR_SETTING_BEAN_PROPERTY=Can''t set managed bean property: ''{0}''.
 com.sun.faces.EVAL_ATTR_UNEXPECTED_TYPE=Evaluation of expression for attribute ''{0}'' resulted in unexpected type. Expected {1}, but received {2}.
@@ -143,17 +145,39 @@
 com.sun.faces.INVALID_EXPRESSION=Invalid expression: ''{0}''.
 com.sun.faces.INVALID_INIT_PARAM=Invalid value: ''{0}'', for initialization parameter: ''{1}''. Acceptable values are 'true' or 'false'. Defaulting to 'false'.
 com.sun.faces.INVALID_MESSAGE_SEVERITY_IN_CONFIG=Invalid Message severity ''{0}'' defined in configuration.
-com.sun.faces.INVALID_SCOPE_LIFESPAN=The scope of the referenced object: ''{0}'' is shorter than the referring object
+com.sun.faces.INVALID_SCOPE_LIFESPAN=The scope of the object referenced by expression ''{0}'', ''{1}'', is shorter than the referring managed bean''s (''{2}'') scope of ''{3}''
 com.sun.faces.LIFECYCLE_ID_ALREADY_ADDED=LifecycleId already added for id: ''{0}''.
 com.sun.faces.LIFECYCLE_ID_NOT_FOUND=LifecycleId not found for id ''{0}''.
 com.sun.faces.MAXIMUM_EVENTS_REACHED=Maximum number of events ''{0}'' reached.
 com.sun.faces.MANAGED_BEAN_CANNOT_SET_LIST_ARRAY_PROPERTY=Unable to set target property ''{0}'' in managed bean ''{1}''. The property must accept either List or Array instances.
-com.sun.faces.MANAGED_BEAN_CANNOT_SET_MAP_PROPERTY=Unable to set target property ''{0}'' in managed bean ''{1}''. The property must accept Map instances.
+com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_SETTER_ERROR=Property ''{0}'' in managed bean ''{1}'' is defined as a map property, however, the setter in the class does not accept Map instances.
+com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_GETTER_ERROR=Property ''{0}'' in managed bean ''{1}'' is defined as a map property, however, the getter in the class does not return Map instances.
+com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_ACCEPT_LIST_OR_ARRAY_ERROR=Property ''{0}'' in managed bean ''{1}'' is defined as a list property, however, the setter in the class does not accept List or Array instances.
+com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_RETURN_LIST_OR_ARRAY_ERROR=Property ''{0}'' in managed bean ''{1}'' is defined as a list property, however, the getter in the class does not return List or Array instances.
+com.sun.faces.MANAGED_BEAN_LIST_GETTER_ARRAY_NO_SETTER_ERROR=Property ''{0}'' in managed bean ''{1}'' is defined as a list property. The getter returns an array type, but there is no associated setter.
 com.sun.faces.MANAGED_BEAN_EXISTING_VALUE_NOT_LIST=Unable to set target property ''{0}'' in managed bean ''{1}''. The target property returned an existing value that was not an instance of List.
-com.sun.faces.MANAGED_BEAN_LIST_PROPERTY_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. Managed bean contains a managed property with list entries, but has illegally defined a value and/or map entries.
-com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. Managed bean contains a managed property with map entries, but has illegally defined a value as well.
-com.sun.faces.MANAGED_BEAN_PROPERTY_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. Managed bean contains a property containing no list or map entires, nor any value elements.
+com.sun.faces.MANAGED_BEAN_AS_LIST_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. The managed bean is configured as a List, but also attempts to define map entries or managed properties.
+com.sun.faces.MANAGED_BEAN_AS_MAP_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. The managed bean is configured as a Map, but also attempts to define managed properties.
+com.sun.faces.MANAGED_BEAN_LIST_PROPERTY_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. The managed bean contains a managed property named ''{1}'' with list entries, but has illegally defined a value and/or map entries.
+com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. The managed bean contains a managed property named ''{1}'' with map entries, but has illegally defined a value as well.
+com.sun.faces.MANAGED_BEAN_PROPERTY_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. The managed bean contains a managed property named ''{1}'' containing no list or map entires, nor any value elements.
 com.sun.faces.MANAGED_BEAN_TYPE_CONVERSION_ERROR=Error performing conversion of value ''{0}'' of type ''{1}'' to type ''{2}'' for managed bean ''{3}''.
+com.sun.faces.MANAGED_BEAN_CLASS_NOT_FOUND_ERROR=Bean or property class Class ''{0}'' for managed bean ''{1}'' cannot be found.
+com.sun.faces.MANAGED_BEAN_CLASS_DEPENDENCY_NOT_FOUND_ERROR=Bean or property class ''{0}'' for managed bean ''{1}'' cannot be loaded due to a missing dependency: {2}.
+com.sun.faces.MANAGED_BEAN_CLASS_IS_NOT_PUBLIC_ERROR=Managed bean class ''{0}'' for managed bean ''{1}'' is not declared public.
+com.sun.faces.MANAGED_BEAN_CLASS_IS_ABSTRACT_ERROR=Managed bean class ''{0}'' for managed bean ''{1}'' is declard abstract.
+com.sun.faces.MANAGED_BEAN_CLASS_NO_PUBLIC_NOARG_CTOR_ERROR=Managed bean class ''{0}'' for managed bean ''{1}'' doesn't declare a public no-argument constructor.
+com.sun.faces.MANAGED_BEAN_INJECTION_ERROR=An error occurred performing resource injection on managed bean ''{0}''
+com.sun.faces.MANAGED_BEAN_DEFINED_PROPERTY_CLASS_NOT_COMPATIBLE_ERROR=The property ''{0}'' for managed bean ''{1}'' is defined with a property class of ''{2}'', however, this class is not assignable to the property.
+com.sun.faces.MANAGED_BEAN_INTROSPECTION_ERROR=Unable to Introspect managed bean ''{0}''
+com.sun.faces.MANAGED_BEAN_PROPERTY_DOES_NOT_EXIST_ERROR=Property ''{0}'' for managed bean ''{1}'' does not exist.
+com.sun.faces.MANAGED_BEAN_PROPERTY_HAS_NO_SETTER_ERROR=Property ''{0}'' for managed bean ''{1}'' has no setter.
+com.sun.faces.MANAGED_BEAN_PROPERTY_INCORRECT_ARGS_ERROR=Property ''{0}'' for managed bean ''{1}'' accepts more than one argument
+com.sun.faces.MANAGED_BEAN_UNABLE_TO_SET_PROPERTY_ERROR=Unable to set property ''{0}'' for managed bean ''{1}''
+com.sun.faces.MANAGED_BEAN_PROBLEMS_ERROR=Unable to create managed bean ''{0}''. The following problems were found:
+com.sun.faces.MANAGED_BEAN_PROBLEMS_STARTUP_ERROR=JSF will be unable to create managed bean ''{0}'' when it is requested. The following problems where found:
+com.sun.faces.MANAGED_BEAN_UNKNOWN_PROCESSING_ERROR=Unexpected error processing managed bean ''{0}''
+com.sun.faces.MANAGED_BEAN_PROPERTY_UNKNOWN_PROCESSING_ERROR=Unexpcted error processing managed property ''{0}''
 com.sun.faces.MISSING_CLASS_ERROR=Missing Class: Can''t load class ''{0}''.
 com.sun.faces.MISSING_RESOURCE_ERROR=Missing Resource: Can''t get ResourceBundle.
 com.sun.faces.MODELUPDATE_ERROR=Model Update failure for value ''{0}'' in model''{1}''.
@@ -176,13 +200,13 @@
 com.sun.faces.NULL_RESPONSE_VIEW_ERROR=Argument Error: ResponseView argument is null.
 com.sun.faces.NULL_RESPONSE_WRITER_ERROR=Argument Error: ResponseWriter argument is null.
 com.sun.faces.OBJECT_CREATION_ERROR=One or more confgured application objects could not be created. Check your web application logs for details.
-com.sun.faces.OPTION_NOT_SELECT_ITEM="Argument Error: An option for component ''{0}'' was not an instance of javax.faces.model.SelectItem. Type found: ''{1}''.
+com.sun.faces.OPTION_NOT_SELECT_ITEM=Argument Error: An option for component ''{0}'' was not an instance of javax.faces.model.SelectItem. Type found: ''{1}''.
 com.sun.faces.PHASE_ID_OUT_OF_BOUNDS=PhaseId out of bounds for id: ''{0}''.
 com.sun.faces.RENDERER_NOT_FOUND=Renderer not found for Renderer type: ''{0}''.
 com.sun.faces.REQUEST_VIEW_ALREADY_SET_ERROR=State Error: RequestView has already been set for this request.
 com.sun.faces.SAVING_STATE_ERROR=Error while saving state.
 com.sun.faces.SUPPORTS_COMPONENT_ERROR=Argument Error: ''{0}'' is not supported for this renderer.
-com.sun.faces.TYPECONVERSION_ERROR=Conversion Error setting value ''{0}'' for ''{1}''.
+com.sun.faces.TYPECONVERSION_ERROR=Conversion Error setting value ''{0}'' for ''{1}''.
 com.sun.faces.VALIDATION_COMMAND_ERROR=Validation error. ''{0}'' must have value or image attribute.
 com.sun.faces.VALIDATION_EL_ERROR=Validation error. Expression invalid for:''{0}''
 com.sun.faces.VALIDATION_ID_ERROR=Validation error. The following JSF tags are required to contain IDs:''{0}''
@@ -190,8 +214,8 @@
 com.sun.faces.CANNOT_VALIDATE=Unable to resolve a Validator instance using either validatorId ''{0}'' or binding ''{1}''.
 
 
-com.sun.faces.CYCLIC_REFERENCE_ERROR=Possible cyclic reference to managed bean "{0}"
-com.sun.faces.OBJECT_IS_READONLY="{0} object is read only"
+com.sun.faces.CYCLIC_REFERENCE_ERROR=Managed bean ''{0}'' contains cyclic references. Evaluation path: ''{1}''.
+com.sun.faces.OBJECT_IS_READONLY={0} object is read only
 com.sun.faces.APPLICATION_INIT_COMPLETE_ERROR_ID=ELResolvers cannot be added after the application initialization is complete.
 com.sun.faces.INCORRECT_JSP_VERSION=Incorrect JSP version found, method ''{0}'' does not exist.
 
Index: src/javax/faces/Messages_es.properties
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/javax/faces/Messages_es.properties,v
retrieving revision 1.45
diff -u -r1.45 Messages_es.properties
--- src/javax/faces/Messages_es.properties 1 Mar 2007 20:59:02 -0000 1.45
+++ src/javax/faces/Messages_es.properties 17 Apr 2007 22:04:46 -0000
@@ -125,10 +125,34 @@
 com.sun.faces.SAVING_STATE_ERROR=Error while saving state in ''{0}'': ''{1}''.
 com.sun.faces.RENDERER_NOT_FOUND=Renderer not found for Renderer type: ''{0}''.
 com.sun.faces.MAXIMUM_EVENTS_REACHED=Maximum number of events ''{0}'' reached.
-com.sun.faces.MANAGED_BEAN_CANNOT_SET_LIST_ARRAY_PROPERTY=Unable to set target property ''{0}'' in managed bean ''{1}''. The property must accept either List or Array instances.
-com.sun.faces.MANAGED_BEAN_CANNOT_SET_MAP_PROPERTY=Unable to set target property ''{0}'' in managed bean ''{1}''. The property must accept Map instances.
+com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_SETTER_ERROR=Property ''{0}'' in managed bean ''{1}'' is defined as a map property, however, the setter in the class does not accept Map instances.
+com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_GETTER_ERROR=Property ''{0}'' in managed bean ''{1}'' is defined as a map property, however, the getter in the class does not return Map instances.
+com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_ACCEPT_LIST_OR_ARRAY_ERROR=Property ''{0}'' in managed bean ''{1}'' is defined as a list property, however, the setter in the class does not accept List or Array instances.
+com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_RETURN_LIST_OR_ARRAY_ERROR=Property ''{0}'' in managed bean ''{1}'' is defined as a list property, however, the getter in the class does not return List or Array instances.
+com.sun.faces.MANAGED_BEAN_LIST_GETTER_ARRAY_NO_SETTER_ERROR=Property ''{0}'' in managed bean ''{1}'' is defined as a list property. The getter returns an array type, but there is no associated setter.
 com.sun.faces.MANAGED_BEAN_EXISTING_VALUE_NOT_LIST=Unable to set target property ''{0}'' in managed bean ''{1}''. The target property returned an existing value that was not an instance of List.
+com.sun.faces.MANAGED_BEAN_AS_LIST_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. The managed bean is configured as a List, but also attempts to define map entries or managed properties.
+com.sun.faces.MANAGED_BEAN_AS_MAP_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. The managed bean is configured as a Map, but also attempts to define managed properties.
+com.sun.faces.MANAGED_BEAN_LIST_PROPERTY_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. The managed bean contains a managed property named ''{1}'' with list entries, but has illegally defined a value and/or map entries.
+com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. The managed bean contains a managed property named ''{1}'' with map entries, but has illegally defined a value as well.
+com.sun.faces.MANAGED_BEAN_PROPERTY_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. The managed bean contains a managed property named ''{1}'' containing no list or map entires, nor any value elements.
 com.sun.faces.MANAGED_BEAN_TYPE_CONVERSION_ERROR=Error performing conversion of value ''{0}'' of type ''{1}'' to type ''{2}'' for managed bean ''{3}''.
+com.sun.faces.MANAGED_BEAN_CLASS_NOT_FOUND_ERROR=Bean or property class Class ''{0}'' for managed bean ''{1}'' cannot be found.
+com.sun.faces.MANAGED_BEAN_CLASS_DEPENDENCY_NOT_FOUND_ERROR=Bean or property class ''{0}'' for managed bean ''{1}'' cannot be loaded due to a missing dependency: {2}.
+com.sun.faces.MANAGED_BEAN_CLASS_IS_NOT_PUBLIC_ERROR=Managed bean class ''{0}'' for managed bean ''{1}'' is not declared public.
+com.sun.faces.MANAGED_BEAN_CLASS_IS_ABSTRACT_ERROR=Managed bean class ''{0}'' for managed bean ''{1}'' is declard abstract.
+com.sun.faces.MANAGED_BEAN_CLASS_NO_PUBLIC_NOARG_CTOR_ERROR=Managed bean class ''{0}'' for managed bean ''{1}'' doesn't declare a public no-argument constructor.
+com.sun.faces.MANAGED_BEAN_INJECTION_ERROR=An error occurred performing resource injection on managed bean ''{0}''
+com.sun.faces.MANAGED_BEAN_DEFINED_PROPERTY_CLASS_NOT_COMPATIBLE_ERROR=The property ''{0}'' for managed bean ''{1}'' is defined with a property class of ''{2}'', however, this class is not assignable to the property.
+com.sun.faces.MANAGED_BEAN_INTROSPECTION_ERROR=Unable to Introspect managed bean ''{0}''
+com.sun.faces.MANAGED_BEAN_PROPERTY_DOES_NOT_EXIST_ERROR=Property ''{0}'' for managed bean ''{1}'' does not exist.
+com.sun.faces.MANAGED_BEAN_PROPERTY_HAS_NO_SETTER_ERROR=Property ''{0}'' for managed bean ''{1}'' has no setter.
+com.sun.faces.MANAGED_BEAN_PROPERTY_INCORRECT_ARGS_ERROR=Property ''{0}'' for managed bean ''{1}'' accepts more than one argument
+com.sun.faces.MANAGED_BEAN_UNABLE_TO_SET_PROPERTY_ERROR=Unable to set property ''{0}'' for managed bean ''{1}''
+com.sun.faces.MANAGED_BEAN_PROBLEMS_ERROR=Unable to create managed bean ''{0}''. The following problems were found:
+com.sun.faces.MANAGED_BEAN_PROBLEMS_STARTUP_ERROR=JSF will be unable to create managed bean ''{0}'' when it is requested. The following problems where found:
+com.sun.faces.MANAGED_BEAN_UNKNOWN_PROCESSING_ERROR=Unexpected error processing managed bean ''{0}''
+com.sun.faces.MANAGED_BEAN_PROPERTY_UNKNOWN_PROCESSING_ERROR=Unexpcted error processing managed property ''{0}''
 com.sun.faces.NULL_CONFIGURATION=No Configuration loaded for the application.
 com.sun.faces.ERROR_OPENING_FILE=Can''t open configuration file: ''{0}''.
 com.sun.faces.ERROR_REGISTERING_DTD=Can''t register DTD: ''{0}''.
@@ -138,7 +162,7 @@
 com.sun.faces.ERROR_GETTING_VALUEREF_VALUE=Can''t get value from value reference expression: ''{0}''.
 com.sun.faces.CANT_INTROSPECT_CLASS=Can''t introspect class: ''{0}''
 com.sun.faces.CANT_CONVERT_VALUE=Can''t convert property: ''{0}'' to value type: ''{1}''.
-com.sun.faces.INVALID_SCOPE_LIFESPAN=The scope of the referenced object: ''{0}'' is shorter than the referring object
+com.sun.faces.INVALID_SCOPE_LIFESPAN=com.sun.faces.INVALID_SCOPE_LIFESPAN=The scope of the object referenced by expression ''{0}'', ''{1}'', is shorter than the referring managed bean''s (''{2}'') scope of ''{3}''
 com.sun.faces.ENCODING_ERROR=Unrecognized Character Encoding.
 com.sun.faces.ILLEGAL_IDENTIFIER_LVALUE_MODE=Uso ilegal del identificador impl??cito del objeto en modo del lValue: ''{0}''
 com.sun.faces.VALIDATION_ID_ERROR=Validation error. The following JSF tags are required to contain IDs:''{0}''
@@ -165,13 +189,14 @@
 com.sun.faces.FACES_CONTEXT_NOT_FOUND=No FacesContext is available to process this request. This is most likely due to the request being sent to the wrong path.
 com.sun.faces.CANNOT_CONVERT=Unable to resolve a Converter instance using either converterId ''{0}'' or binding ''{1}''.
 com.sun.faces.CANNOT_VALIDATE=Unable to resolve a Validator instance using either validatorId ''{0}'' or binding ''{1}''.
+com.sun.faces.ERROR_PROCESSING_CONFIG=An unexpected error occurred during configuration processing.
 
 com.sun.faces.NULL_FORVALUE=Componente "{0}" no encontrado
 com.sun.faces.EMPTY_PARAMETER=Parameter no encondrado
 com.sun.faces.ASSERTION_FAILED=Assertion Error
 com.sun.faces.OBJECT_CREATION_ERROR=One or more confgured application objects could not be created. Check your web application logs for details.
 
-com.sun.faces.CYCLIC_REFERENCE_ERROR=Possible cyclic reference to managed bean "{0}"
+com.sun.faces.CYCLIC_REFERENCE_ERROR=Managed bean ''{0}'' contains cyclic references. Evaluation path: ''{1}''.
 
 com.sun.faces.OBJECT_IS_READONLY={0} object is read only
 com.sun.faces.APPLICATION_INIT_COMPLETE_ERROR_ID=ELResolvers cannot be added after the application initialization is complete.
Index: src/javax/faces/Messages_fr.properties
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/javax/faces/Messages_fr.properties,v
retrieving revision 1.44
diff -u -r1.44 Messages_fr.properties
--- src/javax/faces/Messages_fr.properties 1 Mar 2007 20:59:03 -0000 1.44
+++ src/javax/faces/Messages_fr.properties 17 Apr 2007 22:04:47 -0000
@@ -124,10 +124,34 @@
 com.sun.faces.SAVING_STATE_ERROR=Error while saving state in ''{0}'': ''{1}''.
 com.sun.faces.RENDERER_NOT_FOUND=Renderer not found for Renderer type: ''{0}''.
 com.sun.faces.MAXIMUM_EVENTS_REACHED=Maximum number of events ''{0}'' reached.
-com.sun.faces.MANAGED_BEAN_CANNOT_SET_LIST_ARRAY_PROPERTY=Unable to set target property ''{0}'' in managed bean ''{1}''. The property must accept either List or Array instances.
-com.sun.faces.MANAGED_BEAN_CANNOT_SET_MAP_PROPERTY=Unable to set target property ''{0}'' in managed bean ''{1}''. The property must accept Map instances.
+com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_SETTER_ERROR=Property ''{0}'' in managed bean ''{1}'' is defined as a map property, however, the setter in the class does not accept Map instances.
+com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_GETTER_ERROR=Property ''{0}'' in managed bean ''{1}'' is defined as a map property, however, the getter in the class does not return Map instances.
+com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_ACCEPT_LIST_OR_ARRAY_ERROR=Property ''{0}'' in managed bean ''{1}'' is defined as a list property, however, the setter in the class does not accept List or Array instances.
+com.sun.faces.MANAGED_BEAN_LIST_SETTER_DOES_NOT_RETURN_LIST_OR_ARRAY_ERROR=Property ''{0}'' in managed bean ''{1}'' is defined as a list property, however, the getter in the class does not return List or Array instances.
+com.sun.faces.MANAGED_BEAN_LIST_GETTER_ARRAY_NO_SETTER_ERROR=Property ''{0}'' in managed bean ''{1}'' is defined as a list property. The getter returns an array type, but there is no associated setter.
 com.sun.faces.MANAGED_BEAN_EXISTING_VALUE_NOT_LIST=Unable to set target property ''{0}'' in managed bean ''{1}''. The target property returned an existing value that was not an instance of List.
+com.sun.faces.MANAGED_BEAN_AS_LIST_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. The managed bean is configured as a List, but also attempts to define map entries or managed properties.
+com.sun.faces.MANAGED_BEAN_AS_MAP_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. The managed bean is configured as a Map, but also attempts to define managed properties.
+com.sun.faces.MANAGED_BEAN_LIST_PROPERTY_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. The managed bean contains a managed property named ''{1}'' with list entries, but has illegally defined a value and/or map entries.
+com.sun.faces.MANAGED_BEAN_MAP_PROPERTY_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. The managed bean contains a managed property named ''{1}'' with map entries, but has illegally defined a value as well.
+com.sun.faces.MANAGED_BEAN_PROPERTY_CONFIG_ERROR=Incorrect configuration for managed bean ''{0}''. The managed bean contains a managed property named ''{1}'' containing no list or map entires, nor any value elements.
 com.sun.faces.MANAGED_BEAN_TYPE_CONVERSION_ERROR=Error performing conversion of value ''{0}'' of type ''{1}'' to type ''{2}'' for managed bean ''{3}''.
+com.sun.faces.MANAGED_BEAN_CLASS_NOT_FOUND_ERROR=Bean or property class Class ''{0}'' for managed bean ''{1}'' cannot be found.
+com.sun.faces.MANAGED_BEAN_CLASS_DEPENDENCY_NOT_FOUND_ERROR=Bean or property class ''{0}'' for managed bean ''{1}'' cannot be loaded due to a missing dependency: {2}.
+com.sun.faces.MANAGED_BEAN_CLASS_IS_NOT_PUBLIC_ERROR=Managed bean class ''{0}'' for managed bean ''{1}'' is not declared public.
+com.sun.faces.MANAGED_BEAN_CLASS_IS_ABSTRACT_ERROR=Managed bean class ''{0}'' for managed bean ''{1}'' is declard abstract.
+com.sun.faces.MANAGED_BEAN_CLASS_NO_PUBLIC_NOARG_CTOR_ERROR=Managed bean class ''{0}'' for managed bean ''{1}'' doesn't declare a public no-argument constructor.
+com.sun.faces.MANAGED_BEAN_INJECTION_ERROR=An error occurred performing resource injection on managed bean ''{0}''
+com.sun.faces.MANAGED_BEAN_DEFINED_PROPERTY_CLASS_NOT_COMPATIBLE_ERROR=The property ''{0}'' for managed bean ''{1}'' is defined with a property class of ''{2}'', however, this class is not assignable to the property.
+com.sun.faces.MANAGED_BEAN_INTROSPECTION_ERROR=Unable to Introspect managed bean ''{0}''
+com.sun.faces.MANAGED_BEAN_PROPERTY_DOES_NOT_EXIST_ERROR=Property ''{0}'' for managed bean ''{1}'' does not exist.
+com.sun.faces.MANAGED_BEAN_PROPERTY_HAS_NO_SETTER_ERROR=Property ''{0}'' for managed bean ''{1}'' has no setter.
+com.sun.faces.MANAGED_BEAN_PROPERTY_INCORRECT_ARGS_ERROR=Property ''{0}'' for managed bean ''{1}'' accepts more than one argument
+com.sun.faces.MANAGED_BEAN_UNABLE_TO_SET_PROPERTY_ERROR=Unable to set property ''{0}'' for managed bean ''{1}''
+com.sun.faces.MANAGED_BEAN_PROBLEMS_ERROR=Unable to create managed bean ''{0}''. The following problems were found:
+com.sun.faces.MANAGED_BEAN_PROBLEMS_STARTUP_ERROR=JSF will be unable to create managed bean ''{0}'' when it is requested. The following problems where found:
+com.sun.faces.MANAGED_BEAN_UNKNOWN_PROCESSING_ERROR=Unexpected error processing managed bean ''{0}''
+com.sun.faces.MANAGED_BEAN_PROPERTY_UNKNOWN_PROCESSING_ERROR=Unexpcted error processing managed property ''{0}''
 com.sun.faces.NULL_CONFIGURATION=No Configuration loaded for the application.
 com.sun.faces.ERROR_OPENING_FILE=Can''t open configuration file: ''{0}''.
 com.sun.faces.ERROR_REGISTERING_DTD=Can''t register DTD: ''{0}''.
@@ -137,7 +161,7 @@
 com.sun.faces.ERROR_GETTING_VALUEREF_VALUE=Can''t get value from value reference expression: ''{0}''.
 com.sun.faces.CANT_INTROSPECT_CLASS=Can''t introspect class: ''{0}''
 com.sun.faces.CANT_CONVERT_VALUE=Can''t convert property: ''{0}'' to value type: ''{1}''.
-com.sun.faces.INVALID_SCOPE_LIFESPAN=The scope of the referenced object: ''{0}'' is shorter than the referring object
+com.sun.faces.INVALID_SCOPE_LIFESPAN=com.sun.faces.INVALID_SCOPE_LIFESPAN=The scope of the object referenced by expression ''{0}'', ''{1}'', is shorter than the referring managed bean''s (''{2}'') scope of ''{3}''
 com.sun.faces.ENCODING_ERROR=Unrecognized Character Encoding.
 com.sun.faces.ILLEGAL_IDENTIFIER_LVALUE_MODE=Utilisation ill??gale de marque implicite d''objet en mode de lValue: ''{0}''
 com.sun.faces.VALIDATION_ID_ERROR=Validation error. The following JSF tags are required to contain IDs:''{0}''
@@ -164,13 +188,14 @@
 com.sun.faces.FACES_CONTEXT_NOT_FOUND=No FacesContext is available to process this request. This is most likely due to the request being sent to the wrong path.
 com.sun.faces.CANNOT_CONVERT=Unable to resolve a Converter instance using either converterId ''{0}'' or binding ''{1}''.
 com.sun.faces.CANNOT_VALIDATE=Unable to resolve a Validator instance using either validatorId ''{0}'' or binding ''{1}''.
+com.sun.faces.ERROR_PROCESSING_CONFIG=An unexpected error occurred during configuration processing.
 
 com.sun.faces.NULL_FORVALUE=Composant "{0}" non trouv\u00E9
 com.sun.faces.EMPTY_PARAMETER=Parameter non trouv\u00E9
 com.sun.faces.ASSERTION_FAILED=Assertion Failed
 com.sun.faces.OBJECT_CREATION_ERROR=One or more confgured application objects could not be created. Check your web application logs for details.
 
-com.sun.faces.CYCLIC_REFERENCE_ERROR=Possible cyclic reference to managed bean "{0}"
+com.sun.faces.CYCLIC_REFERENCE_ERROR=Managed bean ''{0}'' contains cyclic references. Evaluation path: ''{1}''.
 com.sun.faces.OBJECT_IS_READONLY={0} object is read only
 com.sun.faces.APPLICATION_INIT_COMPLETE_ERROR_ID=ELResolvers cannot be added after the application initialization is complete.
 com.sun.faces.INCORRECT_JSP_VERSION=Incorrect JSP version found, method ''{0}'' does not exist.
Index: systest-per-webapp/replace-application/src/java/com/sun/faces/systest/ReplaceApplicationTestCase.java
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/systest-per-webapp/replace-application/src/java/com/sun/faces/systest/ReplaceApplicationTestCase.java,v
retrieving revision 1.7
diff -u -r1.7 ReplaceApplicationTestCase.java
--- systest-per-webapp/replace-application/src/java/com/sun/faces/systest/ReplaceApplicationTestCase.java 29 Mar 2006 23:04:31 -0000 1.7
+++ systest-per-webapp/replace-application/src/java/com/sun/faces/systest/ReplaceApplicationTestCase.java 10 Apr 2007 22:49:28 -0000
@@ -120,7 +120,7 @@
         assertTrue(-1 != page.asText().indexOf("com.sun.faces.systest.NewStateManager"));
         assertTrue(-1 != page.asText().indexOf("com.sun.faces.systest.NewViewHandler"));
         assertTrue(-1 != page.asText().indexOf("com.sun.faces.systest.NewApplication"));
- assertTrue(-1 != page.asText().indexOf("com.sun.faces.systest.NewManagedBeanFactory"));
+ //assertTrue(-1 != page.asText().indexOf("com.sun.faces.systest.NewManagedBeanFactory"));
         
     }
 
Index: systest-per-webapp/replace-application/web/test.jsp
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/systest-per-webapp/replace-application/web/test.jsp,v
retrieving revision 1.7
diff -u -r1.7 test.jsp
--- systest-per-webapp/replace-application/web/test.jsp 29 Mar 2006 23:04:32 -0000 1.7
+++ systest-per-webapp/replace-application/web/test.jsp 10 Apr 2007 22:51:42 -0000
@@ -47,8 +47,9 @@
     <h:outputText value="#{replaceApplication.viewHandlerClass}" /> <br />
 
     <h:outputText value="#{replaceApplication.applicationClass}" /> <br />
-
+ <%--
     <h:outputText value="#{replaceApplication.managedBeanFactoryClass}" /> <br />
+ --%>
 
   </h:form>
 
Index: systest-per-webapp/replace-application/web/WEB-INF/web.xml
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/systest-per-webapp/replace-application/web/WEB-INF/web.xml,v
retrieving revision 1.6
diff -u -r1.6 web.xml
--- systest-per-webapp/replace-application/web/WEB-INF/web.xml 29 Mar 2006 23:04:32 -0000 1.6
+++ systest-per-webapp/replace-application/web/WEB-INF/web.xml 10 Apr 2007 22:49:15 -0000
@@ -45,11 +45,13 @@
         <param-name>com.sun.faces.enableHtmlTagLibValidator</param-name>
         <param-value>true</param-value>
     </context-param>
-
+
+ <!--
     <context-param>
         <param-name>com.sun.faces.managedBeanFactoryDecoratorClass</param-name>
         <param-value>com.sun.faces.systest.NewManagedBeanFactory</param-value>
     </context-param>
+ -->
     
     <context-param>
         <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
Index: test/com/sun/faces/config/TestManagedBeanFactory.java
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/test/com/sun/faces/config/TestManagedBeanFactory.java,v
retrieving revision 1.33
diff -u -r1.33 TestManagedBeanFactory.java
--- test/com/sun/faces/config/TestManagedBeanFactory.java 27 Feb 2007 23:10:18 -0000 1.33
+++ test/com/sun/faces/config/TestManagedBeanFactory.java 19 Apr 2007 17:18:51 -0000
@@ -30,14 +30,13 @@
 package com.sun.faces.config;
 
 import com.sun.faces.cactus.ServletFacesTestCase;
+import com.sun.faces.cactus.TestingUtil;
 import com.sun.faces.TestBean;
+import com.sun.faces.application.ApplicationAssociate;
+import com.sun.faces.mgbean.ManagedBeanInfo;
+import com.sun.faces.mgbean.BeanManager;
+import com.sun.faces.mgbean.BeanBuilder;
 import com.sun.faces.el.ELUtils;
-import com.sun.faces.config.beans.ListEntriesBean;
-import com.sun.faces.config.beans.ManagedBeanBean;
-import com.sun.faces.config.beans.ManagedPropertyBean;
-import com.sun.faces.config.beans.MapEntriesBean;
-import com.sun.faces.config.beans.MapEntryBean;
-import com.sun.faces.spi.ManagedBeanFactory.Scope;
 
 import javax.el.ValueExpression;
 
@@ -47,6 +46,8 @@
 
 import java.util.ArrayList;
 import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 
 /**
@@ -60,12 +61,6 @@
 
     // ----------------------------------------------------- Instance Variables
 
- ManagedBeanBean bean;
- ManagedPropertyBean property;
- ListEntriesBean listEntries;
- MapEntriesBean mapEntries;
- MapEntryBean mapEntry;
- ManagedBeanFactoryImpl mbf;
     TestBean testBean;
 
     // ----------------------------------------------------------- Constructors
@@ -101,103 +96,140 @@
     // Test managed bean
     public void testNoProperty() throws Exception {
         //Testing with no properties set
- bean = new ManagedBeanBean();
- bean.setManagedBeanClass(beanName);
- bean.setManagedBeanScope("session");
-
- mbf = new ManagedBeanFactoryImpl(bean);
-
- assertNotNull(mbf.newInstance(getFacesContext()));
-
- bean.setManagedBeanScope("request");
- mbf.setManagedBeanBean(bean);
- assertTrue(mbf.getScope() == Scope.REQUEST);
+ ManagedBeanInfo bean = new ManagedBeanInfo(beanName,
+ beanName,
+ "session",
+ null,
+ null,
+ null,
+ null);
+ BeanManager beanManager =
+ ApplicationAssociate.getCurrentInstance().getBeanManager();
+ beanManager.register(bean);
+ assertNotNull(beanManager.create(beanName, getFacesContext()));
+ BeanBuilder builder = beanManager.getBuilder(beanName);
+ assertTrue(builder.getScope() == ELUtils.Scope.SESSION);
     }
 
 
     public void testSimpleProperty() throws Exception {
- //Testing simple property
- bean = new ManagedBeanBean();
- bean.setManagedBeanClass(beanName);
- bean.setManagedBeanScope("session");
-
- property = new ManagedPropertyBean();
- property.setPropertyName("one");
- property.setValue("one");
-
- bean.addManagedProperty(property);
-
- mbf = new ManagedBeanFactoryImpl(bean);
+ ManagedBeanInfo.ManagedProperty property =
+ new ManagedBeanInfo.ManagedProperty("one",
+ null,
+ "one",
+ null,
+ null);
+ List<ManagedBeanInfo.ManagedProperty> list =
+ new ArrayList<ManagedBeanInfo.ManagedProperty>(1);
+ list.add(property);
+ ManagedBeanInfo bean = new ManagedBeanInfo(beanName,
+ beanName,
+ "session",
+ null,
+ null,
+ list,
+ null);
+ BeanManager beanManager =
+ ApplicationAssociate.getCurrentInstance().getBeanManager();
+ beanManager.register(bean);
 
         //testing with a property set
- assertNotNull(testBean = (TestBean) mbf.newInstance(getFacesContext()));
+ assertNotNull(testBean = (TestBean) beanManager.create(beanName,
+ getFacesContext()));
 
         //make sure bean instantiated properly. Get property back from bean.
         assertTrue(testBean.getOne().equals("one"));
 
         //make sure scope is stored properly
- assertTrue(mbf.getScope() == Scope.SESSION);
+ BeanBuilder builder = beanManager.getBuilder(beanName);
+ assertTrue(builder.getScope() == ELUtils.Scope.SESSION);
     }
 
 
     public void testPrimitiveProperty() throws Exception {
- //Testing primitive properties
- bean = new ManagedBeanBean();
- bean.setManagedBeanClass(beanName);
- bean.setManagedBeanScope("session");
+
+ List<ManagedBeanInfo.ManagedProperty> list =
+ new ArrayList<ManagedBeanInfo.ManagedProperty>(1);
 
         boolean testBoolean = true;
- property = new ManagedPropertyBean();
- property.setPropertyName("boolProp");
- property.setValue((new Boolean(testBoolean)).toString());
- bean.addManagedProperty(property);
+ ManagedBeanInfo.ManagedProperty property =
+ new ManagedBeanInfo.ManagedProperty("boolProp",
+ null,
+ Boolean.toString(testBoolean),
+ null,
+ null);
+ list.add(property);
 
         byte testByte = 100;
- property = new ManagedPropertyBean();
- property.setPropertyName("byteProp");
- property.setValue(Byte.toString(testByte));
- bean.addManagedProperty(property);
+ property = new ManagedBeanInfo.ManagedProperty("byteProp",
+ null,
+ Byte.valueOf(testByte).toString(),
+ null,
+ null);
+ list.add(property);
 
         char testChar = 'z';
- property = new ManagedPropertyBean();
- property.setPropertyName("charProp");
- property.setValue((new Character(testChar)).toString());
- bean.addManagedProperty(property);
+ property = new ManagedBeanInfo.ManagedProperty("charProp",
+ null,
+ Character.valueOf(testChar).toString(),
+ null,
+ null);
+ list.add(property);
 
         double testDouble = 11.278D;
- property = new ManagedPropertyBean();
- property.setPropertyName("doubleProp");
- property.setValue(Double.toString(testDouble));
- bean.addManagedProperty(property);
+ property = new ManagedBeanInfo.ManagedProperty("doubleProp",
+ null,
+ Double.valueOf(testDouble).toString(),
+ null,
+ null);
+ list.add(property);
 
         float testFloat = 45.789F;
- property = new ManagedPropertyBean();
- property.setPropertyName("floatProp");
- property.setValue(Float.toString(testFloat));
- bean.addManagedProperty(property);
+ property = new ManagedBeanInfo.ManagedProperty("floatProp",
+ null,
+ Float.valueOf(testFloat).toString(),
+ null,
+ null);
+ list.add(property);
 
         int testInt = 42;
- property = new ManagedPropertyBean();
- property.setPropertyName("intProp");
- property.setValue(Integer.toString(testInt));
- bean.addManagedProperty(property);
+ property = new ManagedBeanInfo.ManagedProperty("intProp",
+ null,
+ Integer.valueOf(testInt).toString(),
+ null,
+ null);
+ list.add(property);
 
         long testLong = 3147893289L;
- property = new ManagedPropertyBean();
- property.setPropertyName("longProp");
- property.setValue(Long.toString(testLong));
- bean.addManagedProperty(property);
+ property = new ManagedBeanInfo.ManagedProperty("longProp",
+ null,
+ Long.valueOf(testLong).toString(),
+ null,
+ null);
+ list.add(property);
 
         short testShort = 25432;
- property = new ManagedPropertyBean();
- property.setPropertyName("shortProp");
- property.setValue(Short.toString(testShort));
- bean.addManagedProperty(property);
-
- mbf = new ManagedBeanFactoryImpl(bean);
+ property = new ManagedBeanInfo.ManagedProperty("shortProp",
+ null,
+ Short.valueOf(testShort).toString(),
+ null,
+ null);
+ list.add(property);
+
+ ManagedBeanInfo bean = new ManagedBeanInfo(beanName,
+ beanName,
+ "session",
+ null,
+ null,
+ list,
+ null);
+ BeanManager beanManager =
+ ApplicationAssociate.getCurrentInstance().getBeanManager();
+ beanManager.register(bean);
 
         //testing with a property set
- assertNotNull(testBean = (TestBean) mbf.newInstance(getFacesContext()));
+ assertNotNull(testBean = (TestBean) beanManager.create(beanName,
+ getFacesContext()));
 
         //make sure bean instantiated properly. Get property back from bean.
         assertTrue(testBean.getBoolProp() == testBoolean);
@@ -210,56 +242,89 @@
         assertTrue(testBean.getShortProp() == testShort);
 
         //make sure scope is stored properly
- assertTrue(mbf.getScope() == Scope.SESSION);
+ BeanBuilder builder = beanManager.getBuilder(beanName);
+ assertTrue(builder.getScope() == ELUtils.Scope.SESSION);
     }
     
     public void testSimpleNumericProperty() throws Exception {
         // If a property value is "" ensure numeric properties
         // are set to 0.
- bean = new ManagedBeanBean();
- bean.setManagedBeanClass(beanName);
- bean.setManagedBeanScope("session");
-
- property = new ManagedPropertyBean();
- property.setPropertyName("byteProp");
- property.setValue("");
- bean.addManagedProperty(property);
-
- property = new ManagedPropertyBean();
- property.setPropertyName("charProp");
- property.setValue("");
- bean.addManagedProperty(property);
-
- property = new ManagedPropertyBean();
- property.setPropertyName("doubleProp");
- property.setValue("");
- bean.addManagedProperty(property);
-
- property = new ManagedPropertyBean();
- property.setPropertyName("floatProp");
- property.setValue("");
- bean.addManagedProperty(property);
-
- property = new ManagedPropertyBean();
- property.setPropertyName("intProp");
- property.setValue("");
- bean.addManagedProperty(property);
-
- property = new ManagedPropertyBean();
- property.setPropertyName("longProp");
- property.setValue("");
- bean.addManagedProperty(property);
-
- property = new ManagedPropertyBean();
- property.setPropertyName("shortProp");
- property.setValue("");
- bean.addManagedProperty(property);
-
- mbf = new ManagedBeanFactoryImpl(bean);
-
- assertNotNull(testBean = (TestBean) mbf.newInstance(getFacesContext()));
-
- mbf = new ManagedBeanFactoryImpl(bean);
+ List<ManagedBeanInfo.ManagedProperty> list =
+ new ArrayList<ManagedBeanInfo.ManagedProperty>(1);
+
+ boolean testBoolean = true;
+ ManagedBeanInfo.ManagedProperty property =
+ new ManagedBeanInfo.ManagedProperty("boolProp",
+ null,
+ Boolean.toString(testBoolean),
+ null,
+ null);
+ list.add(property);
+
+ property = new ManagedBeanInfo.ManagedProperty("byteProp",
+ null,
+ "",
+ null,
+ null);
+ list.add(property);
+
+ property = new ManagedBeanInfo.ManagedProperty("charProp",
+ null,
+ "",
+ null,
+ null);
+ list.add(property);
+
+ property = new ManagedBeanInfo.ManagedProperty("doubleProp",
+ null,
+ "",
+ null,
+ null);
+ list.add(property);
+
+ property = new ManagedBeanInfo.ManagedProperty("floatProp",
+ null,
+ "",
+ null,
+ null);
+ list.add(property);
+
+ property = new ManagedBeanInfo.ManagedProperty("intProp",
+ null,
+ "",
+ null,
+ null);
+ list.add(property);
+
+ property = new ManagedBeanInfo.ManagedProperty("longProp",
+ null,
+ "",
+ null,
+ null);
+ list.add(property);
+
+ property = new ManagedBeanInfo.ManagedProperty("shortProp",
+ null,
+ "",
+ null,
+ null);
+ list.add(property);
+
+ ManagedBeanInfo bean = new ManagedBeanInfo(beanName,
+ beanName,
+ "session",
+ null,
+ null,
+ list,
+ null);
+ BeanManager beanManager =
+ ApplicationAssociate.getCurrentInstance().getBeanManager();
+ beanManager.register(bean);
+
+ //testing with a property set
+ assertNotNull(testBean = (TestBean) beanManager.create(beanName,
+ getFacesContext()));
+
         assertTrue(testBean.getByteProp() == 0);
         assertTrue(testBean.getCharProp() == 0);
         assertTrue(testBean.getDoubleProp() == 0);
@@ -271,34 +336,49 @@
 
 
     public void testIndexProperty() throws Exception {
- //Testing indexed properties
- bean = new ManagedBeanBean();
- bean.setManagedBeanClass(beanName);
- bean.setManagedBeanScope("session");
-
- property = new ManagedPropertyBean();
- property.setPropertyName("indexProperties");
- listEntries = new ListEntriesBean();
- listEntries.addValue("foo");
- listEntries.addValue("bar");
- property.setListEntries(listEntries);
-
- ManagedPropertyBean property2 = new ManagedPropertyBean();
- property2.setPropertyName("indexPropertiesNull");
- property2.setListEntries(listEntries);
-
- bean.addManagedProperty(property);
- bean.addManagedProperty(property2);
-
- mbf = new ManagedBeanFactoryImpl(bean);
+ List<String> values = new ArrayList<String>(2);
+ values.add("foo");
+ values.add("bar");
+ ManagedBeanInfo.ListEntry listEntry =
+ new ManagedBeanInfo.ListEntry(null, values);
+
+ List<ManagedBeanInfo.ManagedProperty> properties =
+ new ArrayList<ManagedBeanInfo.ManagedProperty>(2);
+ ManagedBeanInfo.ManagedProperty property =
+ new ManagedBeanInfo.ManagedProperty("indexProperties",
+ null,
+ null,
+ null,
+ listEntry);
+ properties.add(property);
+
+ property = new ManagedBeanInfo.ManagedProperty("indexPropertiesNull",
+ null,
+ null,
+ null,
+ listEntry);
+ properties.add(property);
+
+
+ ManagedBeanInfo bean = new ManagedBeanInfo(beanName,
+ beanName,
+ "request",
+ null,
+ null,
+ properties,
+ null);
+ BeanManager beanManager =
+ ApplicationAssociate.getCurrentInstance().getBeanManager();
+ beanManager.register(bean);
 
         //testing with a property set
- assertNotNull(testBean = (TestBean) mbf.newInstance(getFacesContext()));
+ assertNotNull(testBean = (TestBean) beanManager.create(beanName,
+ getFacesContext()));
 
         //make sure bean instantiated properly. Get property back from bean.
- ArrayList properties = (ArrayList) testBean.getIndexProperties();
- assertTrue(properties.get(5).equals("foo"));
- assertTrue(properties.get(6).equals("bar"));
+ ArrayList props = (ArrayList) testBean.getIndexProperties();
+ assertTrue(props.get(5).equals("foo"));
+ assertTrue(props.get(6).equals("bar"));
 
         // setter shouldn't be called if bean getter returns List
         assertTrue(!testBean.getListSetterCalled());
@@ -307,36 +387,54 @@
         assertTrue(testBean.getListNullSetterCalled());
 
         //make sure scope is stored properly
- assertTrue(mbf.getScope() == Scope.SESSION);
+ BeanBuilder builder = beanManager.getBuilder(beanName);
+ assertTrue(builder.getScope() == ELUtils.Scope.REQUEST);
     }
 
 
     public void testMapProperty() throws Exception {
- //Testing mapped properties
- bean = new ManagedBeanBean();
- bean.setManagedBeanClass(beanName);
- bean.setManagedBeanScope("session");
-
- mapEntries = new MapEntriesBean();
- mapEntry = new MapEntryBean();
- mapEntry.setKey("name");
- mapEntry.setValue("Justyna");
- mapEntries.addMapEntry(mapEntry);
-
- property = new ManagedPropertyBean();
- property.setPropertyName("mapProperty");
- property.setMapEntries(mapEntries);
-
- ManagedPropertyBean property2 = new ManagedPropertyBean();
- property2.setPropertyName("mapPropertyNull");
- property2.setMapEntries(mapEntries);
-
- bean.addManagedProperty(property);
- bean.addManagedProperty(property2);
- mbf = new ManagedBeanFactoryImpl(bean);
+
+ Map<String,String> entry = new HashMap(1, 1.0f);
+ entry.put("name", "Justyna");
+ ManagedBeanInfo.MapEntry mapEntry =
+ new ManagedBeanInfo.MapEntry(null,
+ null,
+ entry);
+
+ List<ManagedBeanInfo.ManagedProperty> properties =
+ new ArrayList<ManagedBeanInfo.ManagedProperty>(2);
+ ManagedBeanInfo.ManagedProperty property =
+ new ManagedBeanInfo.ManagedProperty("mapProperty",
+ null,
+ null,
+ mapEntry,
+ null);
+ properties.add(property);
+
+ property = new ManagedBeanInfo.ManagedProperty("mapPropertyNull",
+ null,
+ null,
+ mapEntry,
+ null);
+ properties.add(property);
+
+
+ ManagedBeanInfo bean = new ManagedBeanInfo(beanName,
+ beanName,
+ "request",
+ null,
+ null,
+ properties,
+ null);
+
+
+ BeanManager beanManager =
+ ApplicationAssociate.getCurrentInstance().getBeanManager();
+ beanManager.register(bean);
 
         //testing with a property set
- assertNotNull(testBean = (TestBean) mbf.newInstance(getFacesContext()));
+ assertNotNull(testBean = (TestBean) beanManager.create(beanName,
+ getFacesContext()));
 
         //make sure bean instantiated properly. Get property back from bean.
         HashMap mapProperty = (HashMap)
@@ -350,28 +448,39 @@
         assertTrue(testBean.getMapPropertyNullSetterCalled());
 
         //make sure scope is stored properly
- assertTrue(mbf.getScope() == Scope.SESSION);
+ BeanBuilder builder = beanManager.getBuilder(beanName);
+ assertTrue(builder.getScope() == ELUtils.Scope.REQUEST);
     }
 
 
     public void testIndexTypeProperty() throws Exception {
- //Testing indexed type properties
- bean = new ManagedBeanBean();
- property = new ManagedPropertyBean();
- bean.setManagedBeanClass(beanName);
- bean.setManagedBeanScope("session");
- property.setPropertyName("indexIntegerProperties");
- listEntries = new ListEntriesBean();
- listEntries.setValueClass("java.lang.Integer");
- listEntries.addValue("23");
- property.setListEntries(listEntries);
-
- bean.addManagedProperty(property);
-
- mbf = new ManagedBeanFactoryImpl(bean);
+ List<String> val = new ArrayList<String>(1);
+ val.add("23");
+ ManagedBeanInfo.ListEntry listEntry =
+ new ManagedBeanInfo.ListEntry("java.lang.Integer", val);
+ ManagedBeanInfo.ManagedProperty property =
+ new ManagedBeanInfo.ManagedProperty("indexIntegerProperties",
+ "java.lang.Integer",
+ null,
+ null,
+ listEntry);
+ List<ManagedBeanInfo.ManagedProperty> list =
+ new ArrayList<ManagedBeanInfo.ManagedProperty>(1);
+ list.add(property);
+ ManagedBeanInfo bean = new ManagedBeanInfo(beanName,
+ beanName,
+ "session",
+ null,
+ null,
+ list,
+ null);
+ BeanManager beanManager =
+ ApplicationAssociate.getCurrentInstance().getBeanManager();
+ beanManager.register(bean);
 
         //testing with a property set
- assertNotNull(testBean = (TestBean) mbf.newInstance(getFacesContext()));
+ assertNotNull(testBean = (TestBean) beanManager.create(beanName,
+ getFacesContext()));
 
         //make sure bean instantiated properly. Get property back from bean.
         ArrayList properties = (ArrayList) testBean.getIndexIntegerProperties();
@@ -383,29 +492,40 @@
 
 
     public void testMapTypeProperty() throws Exception {
- //Testing mapped properties type
- bean = new ManagedBeanBean();
- bean.setManagedBeanClass(beanName);
- bean.setManagedBeanScope("session");
-
- mapEntries = new MapEntriesBean();
- mapEntries.setKeyClass("java.lang.String");
- mapEntries.setValueClass("java.lang.Integer");
-
- mapEntry = new MapEntryBean();
- mapEntry.setKey("name");
- mapEntry.setValue("23");
- mapEntries.addMapEntry(mapEntry);
-
- property = new ManagedPropertyBean();
- property.setPropertyName("mapProperty");
- property.setMapEntries(mapEntries);
 
- bean.addManagedProperty(property);
- mbf = new ManagedBeanFactoryImpl(bean);
+ Map<String,String> entry = new HashMap(1, 1.0f);
+ entry.put("name", "23");
+ ManagedBeanInfo.MapEntry mapEntry =
+ new ManagedBeanInfo.MapEntry("java.lang.String",
+ "java.lang.Integer",
+ entry);
+
+ List<ManagedBeanInfo.ManagedProperty> properties =
+ new ArrayList<ManagedBeanInfo.ManagedProperty>(1);
+ ManagedBeanInfo.ManagedProperty property =
+ new ManagedBeanInfo.ManagedProperty("mapProperty",
+ null,
+ null,
+ mapEntry,
+ null);
+ properties.add(property);
+
+ ManagedBeanInfo bean = new ManagedBeanInfo(beanName,
+ beanName,
+ "request",
+ null,
+ null,
+ properties,
+ null);
+
+
+ BeanManager beanManager =
+ ApplicationAssociate.getCurrentInstance().getBeanManager();
+ beanManager.register(bean);
 
         //testing with a property set
- assertNotNull(testBean = (TestBean) mbf.newInstance(getFacesContext()));
+ assertNotNull(testBean = (TestBean) beanManager.create(beanName,
+ getFacesContext()));
 
         //make sure bean instantiated properly. Get property back from bean.
         HashMap mapProperty = (HashMap)
@@ -416,41 +536,43 @@
         Integer integer = new Integer("23");
         assertTrue(mapProperty.get("name").equals(integer));
 
- //make sure scope is stored properly
- assertTrue(mbf.getScope() == Scope.SESSION);
     }
 
 
     public void testValueRefProperty() throws Exception {
- //Testing simple value ref property
 
         TestBean testBean = new TestBean();
+ testBean.setOne("one");
         getFacesContext().getExternalContext().getSessionMap().put(
             "TestRefBean", testBean);
 
- ValueExpression valueExpression = ELUtils.getValueExpression("#{TestRefBean.one}");
- valueExpression.setValue(getFacesContext().getELContext(), "one");
-
- bean = new ManagedBeanBean();
- bean.setManagedBeanClass(beanName);
- bean.setManagedBeanScope("session");
-
- property = new ManagedPropertyBean();
- property.setPropertyName("one");
- property.setValue("#{TestRefBean.one}");
- bean.addManagedProperty(property);
-
- mbf = new ManagedBeanFactoryImpl(bean);
+ ManagedBeanInfo.ManagedProperty property =
+ new ManagedBeanInfo.ManagedProperty("one",
+ null,
+ "#{TestRefBean.one}",
+ null,
+ null);
+ List<ManagedBeanInfo.ManagedProperty> list =
+ new ArrayList<ManagedBeanInfo.ManagedProperty>(1);
+ list.add(property);
+ ManagedBeanInfo bean = new ManagedBeanInfo(beanName,
+ beanName,
+ "session",
+ null,
+ null,
+ list,
+ null);
+ BeanManager beanManager =
+ ApplicationAssociate.getCurrentInstance().getBeanManager();
+ beanManager.register(bean);
 
         //testing with a property set
- assertNotNull(testBean = (TestBean) mbf.newInstance(getFacesContext()));
+ assertNotNull(testBean = (TestBean) beanManager.create(beanName,
+ getFacesContext()));
 
         //make sure bean instantiated properly. Get property back from bean.
         assertTrue(testBean.getOne().equals("one"));
 
- //make sure scope is stored properly
- assertTrue(mbf.getScope() == Scope.SESSION);
-
     }
 
 
@@ -458,6 +580,7 @@
         //Testing value ref scope
 
         TestBean testBean = new TestBean();
+ testBean.setOne("one");
         boolean exceptionThrown = false;
 
         //testing with:
@@ -466,64 +589,62 @@
         getFacesContext().getExternalContext().getApplicationMap().put(
             "TestRefBean", testBean);
 
- ValueExpression valueExpression =
- ELUtils.getValueExpression("#{TestRefBean.one}");
- valueExpression.setValue(getFacesContext().getELContext(), "one");
-
- bean = new ManagedBeanBean();
- bean.setManagedBeanClass(beanName);
- bean.setManagedBeanScope("session");
-
- property = new ManagedPropertyBean();
- property.setPropertyName("one");
- property.setValue("#{TestRefBean.one}");
- bean.addManagedProperty(property);
 
- mbf = new ManagedBeanFactoryImpl(bean);
+ ManagedBeanInfo.ManagedProperty property =
+ new ManagedBeanInfo.ManagedProperty("one",
+ null,
+ "#{TestRefBean.one}",
+ null,
+ null);
+ List<ManagedBeanInfo.ManagedProperty> list =
+ new ArrayList<ManagedBeanInfo.ManagedProperty>(1);
+ list.add(property);
+ ManagedBeanInfo bean = new ManagedBeanInfo(beanName,
+ beanName,
+ "session",
+ null,
+ null,
+ list,
+ null);
+ BeanManager beanManager =
+ ApplicationAssociate.getCurrentInstance().getBeanManager();
+ beanManager.register(bean);
 
- //testing with an application scope property set in a session scope bean
- assertNotNull(testBean = (TestBean) mbf.newInstance(getFacesContext()));
+ //testing with a property set
+ assertNotNull(testBean = (TestBean) beanManager.create(beanName,
+ getFacesContext()));
 
         //make sure bean instantiated properly. Get property back from bean.
         assertTrue(testBean.getOne().equals("one"));
 
- //make sure scope is stored properly
- assertTrue(mbf.getScope() == Scope.SESSION);
-
 
         //testing with:
         // valueref in request scope
         // managed bean in application scope
+ getFacesContext().getExternalContext().getApplicationMap()
+ .remove("TestRefBean");
         getFacesContext().getExternalContext().getRequestMap().put(
             "TestRefBean", testBean);
 
- valueExpression = ELUtils.getValueExpression("#{TestRefBean.one}");
- valueExpression.setValue(getFacesContext().getELContext(), "one");
-
- bean = new ManagedBeanBean();
- bean.setManagedBeanClass(beanName);
- bean.setManagedBeanScope("application");
-
- property = new ManagedPropertyBean();
- property.setPropertyName("one");
- property.setValue("#{TestRefBean.one}");
-
- bean.addManagedProperty(property);
-
- mbf = new ManagedBeanFactoryImpl(bean);
+ bean = new ManagedBeanInfo(beanName,
+ beanName,
+ "application",
+ null,
+ null,
+ list,
+ null);
+ beanManager.register(bean);
 
         exceptionThrown = false;
         try {
- mbf.newInstance(getFacesContext());
+ //testing with a property set
+ beanManager.create(beanName, getFacesContext());
             fail("Should have thrown FacesException");
         } catch (FacesException ex) {
             exceptionThrown = true;
         }
         assertTrue(exceptionThrown);
 
- //make sure scope is stored properly
- assertTrue(mbf.getScope() == Scope.APPLICATION);
-
         //cleanup
         getFacesContext().getExternalContext().getRequestMap().remove(
             "TestRefBean");
@@ -534,36 +655,30 @@
         getFacesContext().getExternalContext().getSessionMap().put(
             "TestRefBean", testBean);
 
- valueExpression = ELUtils.getValueExpression("#{sessionScope.TestRefBean.one}");
- valueExpression.setValue(getFacesContext().getELContext(), "one");
-
- bean = new ManagedBeanBean();
- bean.setManagedBeanClass(beanName);
- bean.setManagedBeanScope(null);
-
- property = new ManagedPropertyBean();
- property.setPropertyName("one");
- property.setValue("#{sessionScope.TestRefBean.one}");
- bean.addManagedProperty(property);
-
- mbf = new ManagedBeanFactoryImpl(bean);
+ bean = new ManagedBeanInfo(beanName,
+ beanName,
+ "none",
+ null,
+ null,
+ list,
+ null);
+ beanManager.register(bean);
 
         exceptionThrown = false;
         try {
- mbf.newInstance(getFacesContext());
+ beanManager.create(beanName, getFacesContext());
             fail("Should have thrown FacesException");
         } catch (FacesException ex) {
             exceptionThrown = true;
         }
         assertTrue(exceptionThrown);
 
- //make sure scope is stored properly
- assertTrue(mbf.getScope() == Scope.NONE);
     }
     
     public void testNoneScope() throws Exception {
         //Testing value ref scope
         TestBean testBean = new TestBean();
+ testBean.setOne("one");
         boolean exceptionThrown = false;
 
         // valueref in request scope
@@ -572,33 +687,36 @@
         getFacesContext().getExternalContext().getRequestMap().put(
             "TestRefBean", testBean);
 
- ValueExpression valueExpression = ELUtils.getValueExpression("#{TestRefBean.one}");
- valueExpression.setValue(getFacesContext().getELContext(), "one");
-
- bean = new ManagedBeanBean();
- bean.setManagedBeanClass(beanName);
- bean.setManagedBeanScope("none");
-
- property = new ManagedPropertyBean();
- property.setPropertyName("one");
- property.setValue("#{TestRefBean.one}");
+ ManagedBeanInfo.ManagedProperty property =
+ new ManagedBeanInfo.ManagedProperty("one",
+ null,
+ "#{TestRefBean.one}",
+ null,
+ null);
+ List<ManagedBeanInfo.ManagedProperty> list =
+ new ArrayList<ManagedBeanInfo.ManagedProperty>(1);
+ list.add(property);
+ ManagedBeanInfo bean = new ManagedBeanInfo(beanName,
+ beanName,
+ "none",
+ null,
+ null,
+ list,
+ null);
+ BeanManager beanManager =
+ ApplicationAssociate.getCurrentInstance().getBeanManager();
+ beanManager.register(bean);
 
- bean.addManagedProperty(property);
-
- mbf = new ManagedBeanFactoryImpl(bean);
 
         exceptionThrown = false;
         try {
- mbf.newInstance(getFacesContext());
+ beanManager.create(beanName, getFacesContext());
             fail("Should have thrown FacesException");
         } catch (FacesException ex) {
             exceptionThrown = true;
         }
         assertTrue(exceptionThrown);
 
- //make sure scope is stored properly
- assertTrue(mbf.getScope() == Scope.NONE);
-
         //cleanup
         getFacesContext().getExternalContext().getRequestMap().remove(
             "TestRefBean");
@@ -607,7 +725,7 @@
         // managed bean in none scope
         // this should pass
         ValueExpression valueExpression1 =
- ELUtils.getValueExpression("#{testBean.customerBean.name}");
+ ELUtils.createValueExpression("#{testBean.customerBean.name}");
         exceptionThrown = false;
         try {
             valueExpression1.getValue(getFacesContext().getELContext());
@@ -620,20 +738,20 @@
 
     public void testMixedBean() throws Exception {
         ValueExpression vb =
- ELUtils.getValueExpression(
+ ELUtils.createValueExpression(
                 "#{mixedBean}");
         TestBean bean = (TestBean) vb.getValue(getFacesContext().getELContext());
         assertEquals("mixed value Bobby Orr", bean.getProp());
 
         vb =
- ELUtils.getValueExpression(
+ ELUtils.createValueExpression(
                 "#{mixedBean.prop}");
         assertEquals(bean.getProp(), (String) vb.getValue(getFacesContext().getELContext()));
     }
 
     public void testMixedBeanNegative() throws Exception {
         ValueExpression vb =
- ELUtils.getValueExpression(
+ ELUtils.createValueExpression(
                 "#{threeBeanSaladNegative}");
         boolean exceptionThrown = false;
         try {
@@ -649,14 +767,14 @@
 
     public void testMixedBeanPositive() throws Exception {
         ValueExpression vb =
- ELUtils.getValueExpression(
+ ELUtils.createValueExpression(
                 "#{threeBeanSaladPositive}");
         TestBean bean = (TestBean) vb.getValue(getFacesContext().getELContext());
         assertEquals("request request session session none none",
                      bean.getProp());
 
         vb =
- ELUtils.getValueExpression(
+ ELUtils.createValueExpression(
                 "#{threeBeanSaladPositive.prop}");
         assertEquals(bean.getProp(), (String) vb.getValue(getFacesContext().getELContext()));
     }
@@ -666,13 +784,14 @@
         // constructor of this bean throws ann exception. Make sure the
         // exception is not swallowed.
         ValueExpression valueExpression1 =
- ELUtils.getValueExpression("#{exceptionBean.one}");
+ ELUtils.createValueExpression("#{exceptionBean.one}");
         boolean exceptionThrown = false;
         try {
             valueExpression1.getValue(getFacesContext().getELContext());
         } catch (FacesException ex) {
+ Throwable t = ex.getCause();
             exceptionThrown = true;
- assertTrue((ex.getMessage().
+ assertTrue((t.getMessage().
                 indexOf("TestConstructorException Passed")) != -1);
         }
         assertTrue(exceptionThrown);
@@ -680,18 +799,41 @@
     }
     
     public void testIsInjectable() throws Exception {
- bean = new ManagedBeanBean();
- bean.setManagedBeanClass(beanName);
- bean.setManagedBeanScope("session");
 
- mbf = new ManagedBeanFactoryImpl(bean);
- assertTrue(!mbf.isInjectable());
-
- bean = new ManagedBeanBean();
- bean.setManagedBeanClass("com.sun.faces.config.TestManagedBeanFactory$InjectionBean");
- bean.setManagedBeanScope("request");
- mbf = new ManagedBeanFactoryImpl(bean);
- assertTrue(mbf.isInjectable());
+ ManagedBeanInfo bean = new ManagedBeanInfo(beanName,
+ beanName,
+ "session",
+ null,
+ null,
+ null,
+ null);
+ BeanManager beanManager =
+ ApplicationAssociate.getCurrentInstance().getBeanManager();
+ beanManager.register(bean);
+ BeanBuilder builder = beanManager.getBuilder(beanName);
+ Boolean isInjectable = (Boolean) TestingUtil.invokePrivateMethod("scanForAnnotations",
+ new Class[] { Class.class },
+ new Object[] { TestBean.class },
+ BeanBuilder.class,
+ builder);
+ assertTrue(!isInjectable);
+
+ bean = new ManagedBeanInfo(beanName,
+ "com.sun.faces.config.TestManagedBeanFactory$InjectionBean",
+ "request",
+ null,
+ null,
+ null,
+ null);
+ beanManager.register(bean);
+
+ isInjectable = (Boolean) TestingUtil.invokePrivateMethod("scanForAnnotations",
+ new Class[] { Class.class },
+ new Object[] { InjectionBean.class },
+ BeanBuilder.class,
+ builder);
+
+ assertTrue(isInjectable);
     }
         
     /************* PENDING(edburns): rewrite to exercise new edge case
Index: test/com/sun/faces/el/TestValueBindingImpl.java
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/test/com/sun/faces/el/TestValueBindingImpl.java,v
retrieving revision 1.44
diff -u -r1.44 TestValueBindingImpl.java
--- test/com/sun/faces/el/TestValueBindingImpl.java 27 Feb 2007 23:10:21 -0000 1.44
+++ test/com/sun/faces/el/TestValueBindingImpl.java 11 Apr 2007 22:44:12 -0000
@@ -618,62 +618,62 @@
                 "TestApplicationBean", testBean);
 
         valueBinding = this.create("TestApplicationBean");
- assertEquals(Scope.APPLICATION, ELUtils.getScope("TestApplicationBean", null));
+ assertEquals(ELUtils.Scope.APPLICATION, ELUtils.getScope("TestApplicationBean", null));
 
         valueBinding = this.create("TestApplicationBean.one");
- assertEquals(Scope.APPLICATION, ELUtils.getScope("TestApplicationBean.one",
+ assertEquals(ELUtils.Scope.APPLICATION, ELUtils.getScope("TestApplicationBean.one",
                 null));
 
         valueBinding = this.create("TestApplicationBean.inner.two");
- assertEquals(Scope.APPLICATION, ELUtils.getScope(
+ assertEquals(ELUtils.Scope.APPLICATION, ELUtils.getScope(
                 "TestApplicationBean.inner.two", null));
 
         valueBinding = this.create("applicationScope.TestApplicationBean");
- assertEquals(Scope.APPLICATION, ELUtils.getScope(
+ assertEquals(ELUtils.Scope.APPLICATION, ELUtils.getScope(
                 "applicationScope.TestApplicationBean", null));
         valueBinding = this
                 .create("applicationScope.TestApplicationBean.inner.two");
- assertEquals(Scope.APPLICATION, ELUtils.getScope(
+ assertEquals(ELUtils.Scope.APPLICATION, ELUtils.getScope(
                 "applicationScope.TestApplicationBean.inner.two", null));
 
         getFacesContext().getExternalContext().getSessionMap().put(
                 "TestSessionBean", testBean);
         valueBinding = this.create("TestSessionBean");
- assertEquals(Scope.SESSION, ELUtils.getScope("TestSessionBean", null));
+ assertEquals(ELUtils.Scope.SESSION, ELUtils.getScope("TestSessionBean", null));
 
         valueBinding = this.create("TestSessionBean.one");
- assertEquals(Scope.SESSION, ELUtils.getScope("TestSessionBean.one", null));
+ assertEquals(ELUtils.Scope.SESSION, ELUtils.getScope("TestSessionBean.one", null));
 
         valueBinding = this.create("TestSessionBean.inner.two");
- assertEquals(Scope.SESSION, ELUtils
+ assertEquals(ELUtils.Scope.SESSION, ELUtils
              .getScope("TestSessionBean.inner.two", null));
 
         valueBinding = this.create("sessionScope.TestSessionBean");
- assertEquals(Scope.SESSION, ELUtils.getScope("sessionScope.TestSessionBean",
+ assertEquals(ELUtils.Scope.SESSION, ELUtils.getScope("sessionScope.TestSessionBean",
                 null));
 
         valueBinding = this.create("sessionScope.TestSessionBean.inner.two");
- assertEquals(Scope.SESSION, ELUtils.getScope(
+ assertEquals(ELUtils.Scope.SESSION, ELUtils.getScope(
                 "sessionScope.TestSessionBean.inner.two", null));
 
         getFacesContext().getExternalContext().getRequestMap().put(
                 "TestRequestBean", testBean);
         valueBinding = this.create("TestRequestBean");
- assertEquals(Scope.REQUEST, ELUtils.getScope("TestRequestBean", null));
+ assertEquals(ELUtils.Scope.REQUEST, ELUtils.getScope("TestRequestBean", null));
 
         valueBinding = this.create("TestRequestBean.one");
- assertEquals(Scope.REQUEST, ELUtils.getScope("TestRequestBean.one", null));
+ assertEquals(ELUtils.Scope.REQUEST, ELUtils.getScope("TestRequestBean.one", null));
 
         valueBinding = this.create("TestRequestBean.inner.two");
- assertEquals(Scope.REQUEST, ELUtils
+ assertEquals(ELUtils.Scope.REQUEST, ELUtils
              .getScope("TestRequestBean.inner.two", null));
 
         valueBinding = this.create("requestScope.TestRequestBean");
- assertEquals(Scope.REQUEST, ELUtils.getScope("requestScope.TestRequestBean",
+ assertEquals(ELUtils.Scope.REQUEST, ELUtils.getScope("requestScope.TestRequestBean",
                 null));
 
         valueBinding = this.create("requestScope.TestRequestBean.inner.two");
- assertEquals(Scope.REQUEST, ELUtils.getScope(
+ assertEquals(ELUtils.Scope.REQUEST, ELUtils.getScope(
                 "requestScope.TestRequestBean.inner.two", null));
 
         valueBinding = this.create("TestNoneBean");
Index: test/com/sun/faces/el/TestValueExpressionImpl.java
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/test/com/sun/faces/el/TestValueExpressionImpl.java,v
retrieving revision 1.10
diff -u -r1.10 TestValueExpressionImpl.java
--- test/com/sun/faces/el/TestValueExpressionImpl.java 27 Feb 2007 23:10:21 -0000 1.10
+++ test/com/sun/faces/el/TestValueExpressionImpl.java 11 Apr 2007 22:48:07 -0000
@@ -620,62 +620,62 @@
                 "TestApplicationBean", testBean);
 
         valueExpression = this.create("TestApplicationBean");
- assertEquals(Scope.APPLICATION, ELUtils.getScope("TestApplicationBean", null));
+ assertEquals(ELUtils.Scope.APPLICATION, ELUtils.getScope("TestApplicationBean", null));
 
         valueExpression = this.create("TestApplicationBean.one");
- assertEquals(Scope.APPLICATION, ELUtils.getScope("TestApplicationBean.one",
+ assertEquals(ELUtils.Scope.APPLICATION, ELUtils.getScope("TestApplicationBean.one",
                 null));
 
         valueExpression = this.create("TestApplicationBean.inner.two");
- assertEquals(Scope.APPLICATION, ELUtils.getScope(
+ assertEquals(ELUtils.Scope.APPLICATION, ELUtils.getScope(
                 "TestApplicationBean.inner.two", null));
 
         valueExpression = this.create("applicationScope.TestApplicationBean");
- assertEquals(Scope.APPLICATION, ELUtils.getScope(
+ assertEquals(ELUtils.Scope.APPLICATION, ELUtils.getScope(
                 "applicationScope.TestApplicationBean", null));
         valueExpression = this
                 .create("applicationScope.TestApplicationBean.inner.two");
- assertEquals(Scope.APPLICATION, ELUtils.getScope(
+ assertEquals(ELUtils.Scope.APPLICATION, ELUtils.getScope(
                 "applicationScope.TestApplicationBean.inner.two", null));
 
         getFacesContext().getExternalContext().getSessionMap().put(
                 "TestSessionBean", testBean);
         valueExpression = this.create("TestSessionBean");
- assertEquals(Scope.SESSION, ELUtils.getScope("TestSessionBean", null));
+ assertEquals(ELUtils.Scope.SESSION, ELUtils.getScope("TestSessionBean", null));
 
         valueExpression = this.create("TestSessionBean.one");
- assertEquals(Scope.SESSION, ELUtils.getScope("TestSessionBean.one", null));
+ assertEquals(ELUtils.Scope.SESSION, ELUtils.getScope("TestSessionBean.one", null));
 
         valueExpression = this.create("TestSessionBean.inner.two");
- assertEquals(Scope.SESSION, ELUtils
+ assertEquals(ELUtils.Scope.SESSION, ELUtils
              .getScope("TestSessionBean.inner.two", null));
 
         valueExpression = this.create("sessionScope.TestSessionBean");
- assertEquals(Scope.SESSION, ELUtils.getScope("sessionScope.TestSessionBean",
+ assertEquals(ELUtils.Scope.SESSION, ELUtils.getScope("sessionScope.TestSessionBean",
                 null));
 
         valueExpression = this.create("sessionScope.TestSessionBean.inner.two");
- assertEquals(Scope.SESSION, ELUtils.getScope(
+ assertEquals(ELUtils.Scope.SESSION, ELUtils.getScope(
                 "sessionScope.TestSessionBean.inner.two", null));
 
         getFacesContext().getExternalContext().getRequestMap().put(
                 "TestRequestBean", testBean);
         valueExpression = this.create("TestRequestBean");
- assertEquals(Scope.REQUEST, ELUtils.getScope("TestRequestBean", null));
+ assertEquals(ELUtils.Scope.REQUEST, ELUtils.getScope("TestRequestBean", null));
 
         valueExpression = this.create("TestRequestBean.one");
- assertEquals(Scope.REQUEST, ELUtils.getScope("TestRequestBean.one", null));
+ assertEquals(ELUtils.Scope.REQUEST, ELUtils.getScope("TestRequestBean.one", null));
 
         valueExpression = this.create("TestRequestBean.inner.two");
- assertEquals(Scope.REQUEST, ELUtils
+ assertEquals(ELUtils.Scope.REQUEST, ELUtils
              .getScope("TestRequestBean.inner.two", null));
 
         valueExpression = this.create("requestScope.TestRequestBean");
- assertEquals(Scope.REQUEST, ELUtils.getScope("requestScope.TestRequestBean",
+ assertEquals(ELUtils.Scope.REQUEST, ELUtils.getScope("requestScope.TestRequestBean",
                 null));
 
         valueExpression = this.create("requestScope.TestRequestBean.inner.two");
- assertEquals(Scope.REQUEST, ELUtils.getScope(
+ assertEquals(ELUtils.Scope.REQUEST, ELUtils.getScope(
                 "requestScope.TestRequestBean.inner.two", null));
 
         valueExpression = this.create("TestNoneBean");
@@ -1025,7 +1025,7 @@
         root.processRestoreState(getFacesContext(), state);
 
         assertEquals("ValueExpression not expected value", "Justyna",
- (String) input.getValueExpression("buckaroo").getValue(
+ (String) input.createValueExpression("buckaroo").getValue(
                         getFacesContext().getELContext()));
 
     } */
Index: test/com/sun/faces/el/TestVariableResolverImpl.java
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/test/com/sun/faces/el/TestVariableResolverImpl.java,v
retrieving revision 1.27
diff -u -r1.27 TestVariableResolverImpl.java
--- test/com/sun/faces/el/TestVariableResolverImpl.java 21 Mar 2007 17:57:41 -0000 1.27
+++ test/com/sun/faces/el/TestVariableResolverImpl.java 19 Apr 2007 17:19:36 -0000
@@ -33,11 +33,11 @@
 
 import com.sun.faces.cactus.ServletFacesTestCase;
 import com.sun.faces.TestBean;
+import com.sun.faces.mgbean.ManagedBeanInfo;
+import com.sun.faces.mgbean.BeanManager;
 import com.sun.faces.cactus.TestBean.InnerBean;
 import com.sun.faces.application.ApplicationImpl;
 import com.sun.faces.application.ApplicationAssociate;
-import com.sun.faces.config.ManagedBeanFactoryImpl;
-import com.sun.faces.config.beans.ManagedBeanBean;
 import com.sun.faces.util.Util;
 
 import javax.faces.FactoryFinder;
@@ -271,19 +271,20 @@
     public void testManagedBean() throws Exception {
         String beanName = "com.sun.faces.TestBean";
 
- ManagedBeanBean cmb = new ManagedBeanBean();
-
- cmb.setManagedBeanClass(beanName);
- cmb.setManagedBeanScope("session");
-
- ManagedBeanFactoryImpl mbf = new ManagedBeanFactoryImpl(cmb);
+ ManagedBeanInfo beanInfo = new ManagedBeanInfo(beanName,
+ beanName,
+ "session",
+ null,
+ null,
+ null,
+ null);
 
         ApplicationFactory aFactory = (ApplicationFactory) FactoryFinder.getFactory(
             FactoryFinder.APPLICATION_FACTORY);
         ApplicationImpl application = (ApplicationImpl) aFactory.getApplication();
- ApplicationAssociate associate = ApplicationAssociate.getCurrentInstance();
-
- associate.addManagedBeanFactory(beanName, mbf);
+ ApplicationAssociate associate = ApplicationAssociate.getCurrentInstance();
+ BeanManager manager = associate.getBeanManager();
+ manager.register(beanInfo);
 
         VariableResolver variableResolver = application.getVariableResolver();
 
Index: test/com/sun/faces/lifecycle/TestUpdateModelValuesPhase.java
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/test/com/sun/faces/lifecycle/TestUpdateModelValuesPhase.java,v
retrieving revision 1.44
diff -u -r1.44 TestUpdateModelValuesPhase.java
--- test/com/sun/faces/lifecycle/TestUpdateModelValuesPhase.java 27 Feb 2007 23:10:18 -0000 1.44
+++ test/com/sun/faces/lifecycle/TestUpdateModelValuesPhase.java 22 Mar 2007 20:13:59 -0000
@@ -105,21 +105,21 @@
         userName.setId("userName");
         userName.setValue("one");
         userName.setValueExpression("value",
- ELUtils.getValueExpression("#{TestBean.one}"));
+ ELUtils.createValueExpression("#{TestBean.one}"));
         userName.testSetValid(true);
         form.getChildren().add(userName);
         userName1 = new TestUIInput();
         userName1.setId("userName1");
         userName1.setValue("one");
         userName1.setValueExpression("value",
- ELUtils.getValueExpression("#{TestBean.one}"));
+ ELUtils.createValueExpression("#{TestBean.one}"));
         userName1.testSetValid(true);
         form.getChildren().add(userName1);
         userName2 = new TestUIInput();
         userName2.setId("userName2");
         userName2.setValue("one");
         userName2.setValueExpression("value",
- ELUtils.getValueExpression("#{TestBean.one}"));
+ ELUtils.createValueExpression("#{TestBean.one}"));
         userName2.testSetValid(true);
         form.getChildren().add(userName2);
 
@@ -161,27 +161,27 @@
         userName.setValue("one");
         userName.testSetValid(true);
         userName.setValueExpression("value",
- ELUtils.getValueExpression("#{TestBean.two}"));
+ ELUtils.createValueExpression("#{TestBean.two}"));
         form.getChildren().add(userName);
         userName1 = new TestUIInput();
         userName1.setId("userName1");
         userName1.setValue("one");
         userName1.testSetValid(true);
         userName1.setValueExpression("value",
- ELUtils.getValueExpression("#{TestBean.one}"));
+ ELUtils.createValueExpression("#{TestBean.one}"));
         form.getChildren().add(userName1);
         userName2 = new TestUIInput();
         userName2.setId("userName2");
         userName2.setValue("one");
         userName2.setValueExpression("value",
- ELUtils.getValueExpression("#{TestBean.one}"));
+ ELUtils.createValueExpression("#{TestBean.one}"));
         userName2.testSetValid(true);
         form.getChildren().add(userName2);
         userName3 = new TestUIInput();
         userName3.setId("userName3");
         userName3.setValue("four");
         userName3.setValueExpression("value",
- ELUtils.getValueExpression("#{TestBean.four}"));
+ ELUtils.createValueExpression("#{TestBean.four}"));
         userName3.testSetValid(true);
         form.getChildren().add(userName3);
 
Index: test/com/sun/faces/renderkit/html_basic/TestRenderers_1.java
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/test/com/sun/faces/renderkit/html_basic/TestRenderers_1.java,v
retrieving revision 1.73
diff -u -r1.73 TestRenderers_1.java
--- test/com/sun/faces/renderkit/html_basic/TestRenderers_1.java 27 Feb 2007 23:10:25 -0000 1.73
+++ test/com/sun/faces/renderkit/html_basic/TestRenderers_1.java 22 Mar 2007 20:13:59 -0000
@@ -213,7 +213,7 @@
         uiOutput.setValue("hrefValue");
         output.setValue("PASSED");
         output.setValueExpression("value",
- ELUtils.getValueExpression("#{TestBean.modelLabel}"));
+ ELUtils.createValueExpression("#{TestBean.modelLabel}"));
         uiOutput.getChildren().add(output);
         root.getChildren().add(uiOutput);
         System.out.println("Testing label lookup from local value...");
@@ -229,7 +229,7 @@
         uiOutput.setValue("hrefValue");
         output = new UIOutput();
         output.setValueExpression("value",
- ELUtils.getValueExpression("#{TestBean.modelLabel}"));
+ ELUtils.createValueExpression("#{TestBean.modelLabel}"));
         uiOutput.getChildren().add(output);
         root.getChildren().add(uiOutput);
         System.out.println("Testing label lookup from model...");
@@ -244,7 +244,7 @@
         output = new UIOutput();
         uiOutput.setId("labelLink3");
         uiOutput.setValue("hrefValue");
- ValueExpression vb = ELUtils.getValueExpression("#{Messages.passedkey}");
+ ValueExpression vb = ELUtils.createValueExpression("#{Messages.passedkey}");
         output.setValueExpression("value", vb);
         uiOutput.getChildren().add(output);
         root.getChildren().add(uiOutput);
@@ -266,7 +266,7 @@
         uiOutput.getAttributes().put("coords", "coords");
         uiOutput.getAttributes().put("hreflang", "hreflang");
         output.setValueExpression("value",
- ELUtils.getValueExpression("#{NonBean.label}"));
+ ELUtils.createValueExpression("#{NonBean.label}"));
         uiOutput.getChildren().add(output);
         root.getChildren().add(uiOutput);
         System.out.println("Testing empty label...");
@@ -294,7 +294,7 @@
         graphic = new UIGraphic();
         uiOutput.setId("linkImage2");
         uiOutput.setValue("hrefValue");
- vb = ELUtils.getValueExpression("#{Messages.imagekey}");
+ vb = ELUtils.createValueExpression("#{Messages.imagekey}");
         graphic.setValueExpression("value", vb);
         uiOutput.getChildren().add(graphic);
         root.getChildren().add(uiOutput);
@@ -339,7 +339,7 @@
         uiCommand.setId("labelLink1");
         output.setValue("PASSED");
         output.setValueExpression("value",
- ELUtils.getValueExpression("#{TestBean.modelLabel}"));
+ ELUtils.createValueExpression("#{TestBean.modelLabel}"));
         uiCommand.getChildren().add(output);
         form.getChildren().add(uiCommand);
         root.getChildren().add(form);
@@ -355,7 +355,7 @@
         uiCommand.setId("labelLink2");
         output = new UIOutput();
         output.setValueExpression("value",
- ELUtils.getValueExpression("#{TestBean.modelLabel}"));
+ ELUtils.createValueExpression("#{TestBean.modelLabel}"));
         uiCommand.getChildren().add(output);
         form.getChildren().add(uiCommand);
         System.out.println("Testing label lookup from model...");
@@ -369,7 +369,7 @@
         uiCommand = new UICommand();
         output = new UIOutput();
         uiCommand.setId("labelLink3");
- ValueExpression vb = ELUtils.getValueExpression("#{Messages.passedkey}");
+ ValueExpression vb = ELUtils.createValueExpression("#{Messages.passedkey}");
         output.setValueExpression("value", vb);
         uiCommand.getChildren().add(output);
         form.getChildren().add(uiCommand);
@@ -390,7 +390,7 @@
         uiCommand.getAttributes().put("coords", "coords");
         uiCommand.getAttributes().put("hreflang", "hreflang");
         output.setValueExpression("value",
- ELUtils.getValueExpression("#{NonBean.label}"));
+ ELUtils.createValueExpression("#{NonBean.label}"));
         uiCommand.getChildren().add(output);
         form.getChildren().add(uiCommand);
         System.out.println("Testing empty label...");
@@ -416,7 +416,7 @@
         uiCommand = new UICommand();
         graphic = new UIGraphic();
         uiCommand.setId("linkImage2");
- vb = ELUtils.getValueExpression("#{Messages.imagekey}");
+ vb = ELUtils.createValueExpression("#{Messages.imagekey}");
         graphic.setValueExpression("value", vb);
         uiCommand.getChildren().add(graphic);
         form.getChildren().add(uiCommand);
@@ -505,7 +505,7 @@
         // Test button as image with image specified in resource bundle
         uiCommand = new UICommand();
         uiCommand.setId("imageButton2");
- ValueExpression vb = ELUtils.getValueExpression("#{Messages.imagekey}");
+ ValueExpression vb = ELUtils.createValueExpression("#{Messages.imagekey}");
         uiCommand.setValueExpression("image", vb);
         root.getChildren().add(uiCommand);
         System.out.println("Testing link image via resource lookup");
@@ -521,7 +521,7 @@
         uiCommand.getAttributes().put("type", "submit");
         uiCommand.setValue("PASSED");
         uiCommand.setValueExpression("value",
- ELUtils.getValueExpression(
+ ELUtils.createValueExpression(
                                       "#{TestBean.modelLabel}"));
         root.getChildren().add(uiCommand);
         System.out.println("Testing label lookup from local value...");
@@ -535,7 +535,7 @@
         uiCommand.setId("labelButton2");
         uiCommand.getAttributes().put("type", "reset");
         uiCommand.setValueExpression("value",
- ELUtils.getValueExpression(
+ ELUtils.createValueExpression(
                                       "#{TestBean.modelLabel}"));
         root.getChildren().add(uiCommand);
         System.out.println("Testing label lookup from model...");
@@ -548,7 +548,7 @@
         uiCommand = new UICommand();
         uiCommand.setId("labelButton3");
         uiCommand.getAttributes().put("type", "submit");
- vb = ELUtils.getValueExpression("#{Messages.passedkey}");
+ vb = ELUtils.createValueExpression("#{Messages.passedkey}");
         uiCommand.setValueExpression("value", vb);
         root.getChildren().add(uiCommand);
         System.out.println("Testing label lookup from ResourceBundle...");
@@ -561,7 +561,7 @@
         uiCommand.setId("labelButton4");
         uiCommand.getAttributes().put("type", "reset");
         uiCommand.setValueExpression("value",
- ELUtils.getValueExpression("#{NonBean.label}"));
+ ELUtils.createValueExpression("#{NonBean.label}"));
         root.getChildren().add(uiCommand);
         System.out.println("Testing empty label...");
         buttonRenderer.encodeBegin(getFacesContext(), uiCommand);
Index: test/com/sun/faces/renderkit/html_basic/TestRenderers_2.java
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/test/com/sun/faces/renderkit/html_basic/TestRenderers_2.java,v
retrieving revision 1.97
diff -u -r1.97 TestRenderers_2.java
--- test/com/sun/faces/renderkit/html_basic/TestRenderers_2.java 27 Feb 2007 23:10:24 -0000 1.97
+++ test/com/sun/faces/renderkit/html_basic/TestRenderers_2.java 22 Mar 2007 20:13:59 -0000
@@ -495,11 +495,11 @@
         img.getAttributes().put("usemap", "usemap");
         root.getChildren().add(img);
         com.sun.faces.cactus.TestBean testBean = (com.sun.faces.cactus.TestBean)
- (ELUtils.getValueExpression("#{TestBean}")).getValue(getFacesContext().getELContext());
+ (ELUtils.createValueExpression("#{TestBean}")).getValue(getFacesContext().getELContext());
         assertTrue(null != testBean); // set in FacesTestCaseService
         testBean.setImagePath("/foo/modelReferenceImage.gif");
         img.setValueExpression("value",
- ELUtils.getValueExpression("#{TestBean.imagePath}"));
+ ELUtils.createValueExpression("#{TestBean.imagePath}"));
 
         imageRenderer.encodeBegin(getFacesContext(), img);
         imageRenderer.encodeEnd(getFacesContext(), img);
Index: test/com/sun/faces/util/TestUtil_messages.java
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/test/com/sun/faces/util/TestUtil_messages.java,v
retrieving revision 1.61
diff -u -r1.61 TestUtil_messages.java
--- test/com/sun/faces/util/TestUtil_messages.java 1 Mar 2007 20:59:02 -0000 1.61
+++ test/com/sun/faces/util/TestUtil_messages.java 17 Apr 2007 21:58:19 -0000
@@ -108,7 +108,7 @@
         {MessageUtils.ERROR_GETTING_VALUEREF_VALUE_ERROR_MESSAGE_ID, "1"},
         {MessageUtils.CANT_INTROSPECT_CLASS_ERROR_MESSAGE_ID, "1"},
         {MessageUtils.CANT_CONVERT_VALUE_ERROR_MESSAGE_ID, "2"},
- {MessageUtils.INVALID_SCOPE_LIFESPAN_ERROR_MESSAGE_ID, "1"},
+ {MessageUtils.INVALID_SCOPE_LIFESPAN_ERROR_MESSAGE_ID, "4"},
         {MessageUtils.ENCODING_ERROR_MESSAGE_ID, "0"},
         {MessageUtils.ILLEGAL_IDENTIFIER_LVALUE_MODE_ID, "1"},
         {MessageUtils.VALIDATION_ID_ERROR_ID, "1"},
@@ -128,11 +128,10 @@
         {MessageUtils.EMPTY_PARAMETER_ID, "0"},
         {MessageUtils.ASSERTION_FAILED_ID, "0"},
         {MessageUtils.OBJECT_CREATION_ERROR_ID, "0"},
- {MessageUtils.CYCLIC_REFERENCE_ERROR_ID, "1"},
+ {MessageUtils.CYCLIC_REFERENCE_ERROR_ID, "2"},
         {MessageUtils.NO_DTD_FOUND_ERROR_ID, "2"},
         {MessageUtils.MANAGED_BEAN_CANNOT_SET_LIST_ARRAY_PROPERTY_ID, "2"},
- {MessageUtils.MANAGED_BEAN_EXISTING_VALUE_NOT_LIST_ID, "2"},
- {MessageUtils.MANAGED_BEAN_CANNOT_SET_MAP_PROPERTY_ID, "2"},
+ {MessageUtils.MANAGED_BEAN_EXISTING_VALUE_NOT_LIST_ID, "2"},
         {MessageUtils.MANAGED_BEAN_TYPE_CONVERSION_ERROR_ID, "4"},
         {MessageUtils.APPLICATION_ASSOCIATE_CTOR_WRONG_CALLSTACK_ID, "0"},
         {MessageUtils.APPLICATION_ASSOCIATE_EXISTS_ID, "0"},
@@ -154,19 +153,33 @@
         {MessageUtils.FACES_SERVLET_MAPPING_INCORRECT_ID, "0"},
         {MessageUtils.JS_RESOURCE_WRITING_ERROR_ID, "0"},
         {MessageUtils.CANNOT_CONVERT_ID, "2"},
- {MessageUtils.CANNOT_VALIDATE_ID, "2"}
- };
-
- private String[][] toolsMessageInfo = {
- {ToolsUtil.MANAGED_BEAN_AS_LIST_CONFIG_ERROR_ID, "1"},
- {ToolsUtil.MANAGED_BEAN_AS_MAP_CONFIG_ERROR_ID, "1"},
- {ToolsUtil.MANAGED_BEAN_NO_MANAGED_BEAN_CLASS_ID, "1"},
- {ToolsUtil.MANAGED_BEAN_NO_MANAGED_BEAN_NAME_ID, "2"},
- {ToolsUtil.MANAGED_BEAN_NO_MANAGED_BEAN_SCOPE_ID, "1"},
- {ToolsUtil.MANAGED_BEAN_INVALID_SCOPE_ID, "2"},
- {ToolsUtil.MANAGED_BEAN_LIST_PROPERTY_CONFIG_ERROR_ID, "2"},
- {ToolsUtil.MANAGED_BEAN_MAP_PROPERTY_CONFIG_ERROR_ID, "2"},
- {ToolsUtil.MANAGED_BEAN_PROPERTY_CONFIG_ERROR_ID, "2"},
+ {MessageUtils.CANNOT_VALIDATE_ID, "2"},
+ {MessageUtils.ERROR_PROCESSING_CONFIG_ID, "0"},
+ {MessageUtils.MANAGED_BEAN_CLASS_NOT_FOUND_ERROR_ID, "2"},
+ {MessageUtils.MANAGED_BEAN_CLASS_DEPENDENCY_NOT_FOUND_ERROR_ID, "3"},
+ {MessageUtils.MANAGED_BEAN_CLASS_IS_NOT_PUBLIC_ERROR_ID, "2"},
+ {MessageUtils.MANAGED_BEAN_CLASS_IS_ABSTRACT_ERROR_ID, "2"},
+ {MessageUtils.MANAGED_BEAN_CLASS_NO_PUBLIC_NOARG_CTOR_ERROR_ID, "2"},
+ {MessageUtils.MANAGED_BEAN_INJECTION_ERROR_ID, "1"},
+ {MessageUtils.MANAGED_BEAN_LIST_PROPERTY_CONFIG_ERROR_ID, "2"},
+ {MessageUtils.MANAGED_BEAN_AS_LIST_CONFIG_ERROR_ID, "1"},
+ {MessageUtils.MANAGED_BEAN_AS_MAP_CONFIG_ERROR_ID, "1"},
+ {MessageUtils.MANAGED_BEAN_MAP_PROPERTY_CONFIG_ERROR_ID, "2"},
+ {MessageUtils.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_SETTER_ERROR_ID, "2"},
+ {MessageUtils.MANAGED_BEAN_MAP_PROPERTY_INCORRECT_GETTER_ERROR_ID, "2"},
+ {MessageUtils.MANAGED_BEAN_DEFINED_PROPERTY_CLASS_NOT_COMPATIBLE_ERROR_ID, "3"},
+ {MessageUtils.MANAGED_BEAN_INTROSPECTION_ERROR_ID, "1"},
+ {MessageUtils.MANAGED_BEAN_PROPERTY_DOES_NOT_EXIST_ERROR_ID, "2"},
+ {MessageUtils.MANAGED_BEAN_PROPERTY_HAS_NO_SETTER_ID, "2"},
+ {MessageUtils.MANAGED_BEAN_PROPERTY_INCORRECT_ARGS_ERROR_ID, "2"},
+ {MessageUtils.MANAGED_BEAN_LIST_SETTER_DOES_NOT_ACCEPT_LIST_OR_ARRAY_ERROR_ID, "2"},
+ {MessageUtils.MANAGED_BEAN_LIST_GETTER_DOES_NOT_RETURN_LIST_OR_ARRAY_ERROR_ID, "2"},
+ {MessageUtils.MANAGED_BEAN_LIST_GETTER_ARRAY_NO_SETTER_ERROR_ID, "2"},
+ {MessageUtils.MANAGED_BEAN_UNABLE_TO_SET_PROPERTY_ERROR_ID, "2"},
+ {MessageUtils.MANAGED_BEAN_PROBLEMS_ERROR_ID, "1"},
+ {MessageUtils.MANAGED_BEAN_PROBLEMS_STARTUP_ERROR_ID, "1"},
+ {MessageUtils.MANAGED_BEAN_UNKNOWN_PROCESSING_ERROR_ID, "1"},
+ {MessageUtils.MANAGED_BEAN_PROPERTY_UNKNOWN_PROCESSING_ERROR_ID, "1"}
     };
 
 // Attribute Instance Variables
@@ -232,40 +245,7 @@
         locale = new Locale("es", "");
         getFacesContext().getViewRoot().setLocale(locale);
         verifyParamsInMessages(messageInfo);
- }
-
-
- public void testVerifyToolsMessages() {
- System.out.println("Verifying ToolsUtil messages");
- verifyParamsInToolsMessages(toolsMessageInfo);
- }
-
- private void verifyParamsInToolsMessages(String[][] messageInfo) {
- int numParams = 0;
-
- for (int i = 0; i < messageInfo.length; i++) {
- System.out.println("Testing message: " + messageInfo[i][0]);
- try {
- numParams = Integer.parseInt(messageInfo[i][1]);
- } catch (NumberFormatException e) {
- System.out.println("Invalid param number specifier!");
- assertTrue(false);
- }
- if (numParams == 0) {
- String message = ToolsUtil.getMessage(messageInfo[i][0]);
- assertTrue(message != null);
- } else if (numParams > 0) {
- Object[] params = generateParams(numParams);
- String message = ToolsUtil.getMessage(messageInfo[i][0],
- params);
- assertTrue(message != null);
- for (int j = 0; j < params.length; j++) {
- assertTrue(message.indexOf((String) params[j]) != -1);
- }
- }
- }
- }
-
+ }
 
     private void verifyParamsInMessages(String[][] messageInfo) {
         int numParams = 0;
@@ -280,14 +260,14 @@
             }
             if (numParams == 0) {
                 String message = MessageUtils.getExceptionMessageString(messageInfo[i][0]);
- assertTrue(message != null);
+ assertTrue(messageInfo[i][0] + " was null", message != null);
             } else if (numParams > 0) {
                 Object[] params = generateParams(numParams);
                 String message = MessageUtils.getExceptionMessageString(messageInfo[i][0],
                                                           params);
                 assertTrue(message != null);
                 for (int j = 0; j < params.length; j++) {
- assertTrue(message.indexOf((String) params[j]) != -1);
+ assertTrue(messageInfo[i][0] + " unable to finder marker for param " + j,message.indexOf((String) params[j]) != -1);
                 }
             }
         }


SECTION: New Files
----------------------------
SEE ATTACHMENTS