dev@javaserverfaces.java.net

Review: Move to JDK 1.4 logging (Phase 1: com.sun.faces.application package)

From: Jayashri Visvanathan <Jayashri.Visvanathan_at_Sun.COM>
Date: Mon, 04 Apr 2005 17:36:15 -0700

M src/com/sun/faces/application/ActionListenerImpl.java
M src/com/sun/faces/application/ApplicationAssociate.java
M src/com/sun/faces/application/ApplicationFactoryImpl.java
M src/com/sun/faces/application/ApplicationImpl.java
M src/com/sun/faces/application/NavigationHandlerImpl.java
M src/com/sun/faces/application/StateManagerImpl.java
M src/com/sun/faces/application/ViewHandlerImpl.java
M src/com/sun/faces/util/Util.java

Move to JDK 1.4 logging


Index: src/com/sun/faces/application/ActionListenerImpl.java
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/application/ActionListenerImpl.java,v
retrieving revision 1.10
diff -u -r1.10 ActionListenerImpl.java
--- src/com/sun/faces/application/ActionListenerImpl.java 26 Feb 2004 20:32:28 -0000 1.10
+++ src/com/sun/faces/application/ActionListenerImpl.java 5 Apr 2005 00:33:07 -0000
@@ -9,9 +9,6 @@
 
 package com.sun.faces.application;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import javax.faces.FacesException;
 import javax.faces.application.Application;
 import javax.faces.application.NavigationHandler;
@@ -24,6 +21,12 @@
 import javax.faces.event.ActionEvent;
 import javax.faces.event.ActionListener;
 
+import java.util.logging.Logger;
+import java.util.logging.Level;
+
+import com.sun.faces.RIConstants;
+import com.sun.faces.util.Util;
+
 /**
  * This action listener implementation processes action events during the
  * <em>Apply Request Values</em> or <em>Invoke Application</em>
@@ -36,8 +39,10 @@
 public class ActionListenerImpl implements ActionListener {
 
     // Log instance for this class
- protected static Log log = LogFactory.getLog(ActionListenerImpl.class);
-
+ private static Logger logger;
+ static {
+ logger = Util.getLogger(Util.FACES_LOGGER);
+ }
 
     //
     // Constructors and Initializers
@@ -54,8 +59,8 @@
     //
 
     public void processAction(ActionEvent event) {
- if (log.isDebugEnabled()) {
- log.debug("processAction(" + event.getComponent().getId() + ")");
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("processAction(" + event.getComponent().getId() + ")");
         }
         UIComponent source = event.getComponent();
         ActionSource actionSource = (ActionSource) source;
@@ -71,12 +76,18 @@
             try {
                 outcome = (String) binding.invoke(context, null);
             } catch (MethodNotFoundException e) {
+ if (logger.isLoggable(Level.SEVERE)) {
+ logger.log(Level.SEVERE, e.getMessage(), e);
+ }
                 throw new FacesException
- (binding.getExpressionString() + ": " + e, e);
+ (binding.getExpressionString() + ": " + e.getMessage(), e);
             }
             catch (EvaluationException e) {
+ if (logger.isLoggable(Level.SEVERE)) {
+ logger.log(Level.SEVERE, e.getMessage(), e);
+ }
                 throw new FacesException
- (binding.getExpressionString() + ": " + e, e);
+ (binding.getExpressionString() + ": " + e.getMessage(), e);
             }
         }
 
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.8
diff -u -r1.8 ApplicationAssociate.java
--- src/com/sun/faces/application/ApplicationAssociate.java 3 Feb 2005 22:51:57 -0000 1.8
+++ src/com/sun/faces/application/ApplicationAssociate.java 5 Apr 2005 00:33:07 -0000
@@ -16,6 +16,8 @@
 import java.util.List;
 import java.util.Map;
 import java.util.TreeSet;
+import java.util.logging.Logger;
+import java.util.logging.Level;
 
 import javax.faces.FacesException;
 import javax.faces.context.ExternalContext;
@@ -26,8 +28,6 @@
 import com.sun.faces.config.ManagedBeanFactory;
 import com.sun.faces.util.Util;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 
 /**
  * <p>Break out the things that are associated with the Application, but
@@ -42,8 +42,12 @@
 
 public class ApplicationAssociate extends Object {
 
- protected static Log log = LogFactory.getLog(ApplicationImpl.class);
-
+ // Log instance for this class
+ private static Logger logger;
+ static {
+ logger = Util.getLogger(Util.FACES_LOGGER);
+ }
+
     //
     // This map stores "managed bean name" | "managed bean factory"
     // mappings.
@@ -209,9 +213,9 @@
                                                    ManagedBeanFactory factory) {
         managedBeanFactoriesMap.put(managedBeanName, factory);
         factory.setManagedBeanFactoryMap(managedBeanFactoriesMap);
- if (log.isTraceEnabled()) {
- log.trace("Added managedBeanFactory " + factory + " for" +
- managedBeanName);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.log(Level.FINE, "Added managedBeanFactory " + factory +
+ " for" + managedBeanName);
         }
     }
 
@@ -236,8 +240,8 @@
         ManagedBeanFactory managedBean = (ManagedBeanFactory)
             managedBeanFactoriesMap.get(managedBeanName);
         if (managedBean == null) {
- if (log.isDebugEnabled()) {
- log.debug("Couldn't find a factory for " + managedBeanName);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("Couldn't find a factory for " + managedBeanName);
             }
             return null;
         }
@@ -256,14 +260,15 @@
             synchronized (this) {
                 try {
                     bean = managedBean.newInstance(context);
- if (log.isDebugEnabled()) {
- log.debug("Created bean " + managedBeanName + " successfully ");
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("Created bean " + managedBeanName
+ + " successfully ");
                     }
                 } catch (Exception ex) {
- Object[] params = {ex.getMessage()};
- if (log.isErrorEnabled()) {
- log.error("Managedbean " + managedBeanName +
- " could not be created " + ex.getMessage(), ex);
+ Object[] params = {managedBeanName};
+ if (logger.isLoggable(Level.SEVERE)) {
+ logger.log(Level.SEVERE,
+ "jsf.managed_bean_creation_error", params);
                     }
                     throw new FacesException(ex);
                 }
@@ -280,14 +285,15 @@
             scopeIsRequest = scope.equalsIgnoreCase(RIConstants.REQUEST);
             try {
                 bean = managedBean.newInstance(context);
- if (log.isDebugEnabled()) {
- log.debug("Created bean " + managedBeanName + " successfully ");
+ if (logger.isLoggable(Level.FINE)) {
+ logger.log(Level.FINE, "Created bean " + managedBeanName +
+ " successfully ");
                 }
             } catch (Exception ex) {
- Object[] params = {ex.getMessage()};
- if (log.isErrorEnabled()) {
- log.error("Managedbean " + managedBeanName +
- " could not be created " + ex.getMessage(), ex);
+ Object[] params = {managedBeanName};
+ if (logger.isLoggable(Level.SEVERE)) {
+ logger.log(Level.SEVERE,
+ "jsf.managed_bean_creation_error", params);
                 }
                 throw new FacesException(ex);
             }
Index: src/com/sun/faces/application/ApplicationFactoryImpl.java
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/application/ApplicationFactoryImpl.java,v
retrieving revision 1.7
diff -u -r1.7 ApplicationFactoryImpl.java
--- src/com/sun/faces/application/ApplicationFactoryImpl.java 10 May 2004 19:55:59 -0000 1.7
+++ src/com/sun/faces/application/ApplicationFactoryImpl.java 5 Apr 2005 00:33:07 -0000
@@ -10,8 +10,8 @@
 package com.sun.faces.application;
 
 import com.sun.faces.util.Util;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Logger;
+import java.util.logging.Level;
 
 import javax.faces.application.Application;
 import javax.faces.application.ApplicationFactory;
@@ -30,26 +30,28 @@
  */
 public class ApplicationFactoryImpl extends ApplicationFactory {
 
-// Log instance for this class
- protected static Log log = LogFactory.getLog(ApplicationFactoryImpl.class);
-
-//
-// Protected Constants
-//
-
-//
-// Class Variables
-//
+ // Log instance for this class
+ private static Logger logger;
+ static {
+ logger = Util.getLogger(Util.FACES_LOGGER);
+ }
+ //
+ // Protected Constants
+ //
+
+ //
+ // Class Variables
+ //
 
-// Attribute Instance Variables
+ // Attribute Instance Variables
 
     private Application application;
 
-// Relationship Instance Variables
+ // Relationship Instance Variables
 
-//
-// Constructors and Initializers
-//
+ //
+ // Constructors and Initializers
+ //
 
 
     /*
@@ -58,8 +60,8 @@
     public ApplicationFactoryImpl() {
         super();
         application = null;
- if (log.isDebugEnabled()) {
- log.debug("Created ApplicationFactory ");
+ if (logger.isLoggable(Level.FINE)) {
+ logger.log(Level.FINE, "Created ApplicationFactory ");
         }
     }
 
@@ -72,8 +74,8 @@
 
         if (application == null) {
             application = new ApplicationImpl();
- if (log.isDebugEnabled()) {
- log.debug("Created Application instance " + application);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("Created Application instance " + application);
             }
         }
         return application;
@@ -95,8 +97,8 @@
         }
 
         this.application = application;
- if (log.isDebugEnabled()) {
- log.debug("set Application Instance to " + application);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("set Application Instance to " + application);
         }
     }
 }
Index: src/com/sun/faces/application/ApplicationImpl.java
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/application/ApplicationImpl.java,v
retrieving revision 1.58
diff -u -r1.58 ApplicationImpl.java
--- src/com/sun/faces/application/ApplicationImpl.java 9 Mar 2005 00:35:44 -0000 1.58
+++ src/com/sun/faces/application/ApplicationImpl.java 5 Apr 2005 00:33:07 -0000
@@ -39,8 +39,8 @@
 import com.sun.faces.el.VariableResolverImpl;
 import com.sun.faces.util.Util;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.logging.Logger;
+import java.util.logging.Level;
 
 
 /**
@@ -53,7 +53,10 @@
 public class ApplicationImpl extends Application {
 
     // Log instance for this class
- protected static Log log = LogFactory.getLog(ApplicationImpl.class);
+ private static Logger logger;
+ static {
+ logger = Util.getLogger(Util.FACES_LOGGER);
+ }
 
     // Relationship Instance Variables
 
@@ -101,8 +104,8 @@
         valueBindingFactory = new ValueBindingFactory();
         methodBindingFactory = new MethodBindingFactory();
 
- if (log.isDebugEnabled()) {
- log.debug("Created Application instance ");
+ if (logger.isLoggable(Level.FINE)) {
+ logger.log(Level.FINE, "Created Application instance ");
         }
     }
 
@@ -127,16 +130,17 @@
         synchronized (this) {
             if (associate.isResponseRendered()) {
                 // at least one response has been rendered.
- if (log.isErrorEnabled()) {
- log.error(
- "Response for this request has been rendered already ");
+ if (logger.isLoggable(Level.SEVERE)) {
+ logger.log(Level.SEVERE,
+ "jsf.illegal_attempt_setting_viewhandler_error");
                 }
                 throw new IllegalStateException(Util.getExceptionMessageString(
                     Util.ILLEGAL_ATTEMPT_SETTING_VIEWHANDLER_ID));
             }
             viewHandler = handler;
- if (log.isDebugEnabled()) {
- log.debug("set ViewHandler Instance to " + viewHandler);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.log(Level.FINE,"set ViewHandler Instance to "
+ + viewHandler);
             }
         }
     }
@@ -157,16 +161,17 @@
         synchronized (this) {
             if (associate.isResponseRendered()) {
                 // at least one response has been rendered.
- if (log.isErrorEnabled()) {
- log.error(
- "Response for this request has been rendered already ");
+ if (logger.isLoggable(Level.SEVERE)) {
+ logger.log(Level.SEVERE,
+ "jsf.illegal_attempt_setting_statemanager_error");
                 }
                 throw new IllegalStateException(Util.getExceptionMessageString(
                     Util.ILLEGAL_ATTEMPT_SETTING_STATEMANAGER_ID));
             }
             stateManager = manager;
- if (log.isDebugEnabled()) {
- log.debug("set StateManager Instance to " + stateManager);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.log(Level.FINE, "set StateManager Instance to "
+ + stateManager);
             }
         }
     }
@@ -182,8 +187,8 @@
         synchronized (this) {
             this.actionListener = listener;
         }
- if (log.isDebugEnabled()) {
- log.debug("set ActionListener Instance to " + actionListener);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("set ActionListener Instance to " + actionListener);
         }
     }
 
@@ -219,8 +224,8 @@
         synchronized (this) {
             this.navigationHandler = handler;
         }
- if (log.isDebugEnabled()) {
- log.debug("set NavigationHandler Instance to " + navigationHandler);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("set NavigationHandler Instance to "+ navigationHandler);
         }
     }
 
@@ -245,8 +250,8 @@
         synchronized (this) {
             this.propertyResolver = resolver;
         }
- if (log.isDebugEnabled()) {
- log.debug("set PropertyResolver Instance to " + propertyResolver);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("set PropertyResolver Instance to " + propertyResolver);
         }
     }
 
@@ -284,8 +289,8 @@
         synchronized (this) {
             this.variableResolver = resolver;
         }
- if (log.isDebugEnabled()) {
- log.debug("set VariableResolver Instance to " + variableResolver);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("set VariableResolver Instance to " + variableResolver);
         }
     }
 
@@ -301,8 +306,8 @@
         synchronized (this) {
             componentMap.put(componentType, componentClass);
         }
- if (log.isTraceEnabled()) {
- log.trace("added component of type " + componentType +
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("added component of type " + componentType +
                       " class " + componentClass);
         }
     }
@@ -319,16 +324,16 @@
         UIComponent returnVal = (UIComponent) newThing(componentType,
                                                        componentMap);
         if (returnVal == null) {
- if (log.isErrorEnabled()) {
- log.error(
- "Could not instantiate component of type " + componentType);
- }
             Object[] params = {componentType};
+ if (logger.isLoggable(Level.SEVERE)) {
+ logger.log(Level.SEVERE,
+ "jsf.cannot_instantiate_component_error", params);
+ }
             throw new FacesException(Util.getExceptionMessageString(
                 Util.NAMED_OBJECT_NOT_FOUND_ERROR_MESSAGE_ID, params));
         }
- if (log.isTraceEnabled()) {
- log.trace("Created component " + componentType);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.log(Level.FINE, "Created component " + componentType);
         }
         return returnVal;
     }
@@ -385,8 +390,8 @@
         synchronized (this) {
             converterIdMap.put(converterId, converterClass);
         }
- if (log.isTraceEnabled()) {
- log.trace("added converter of type " + converterId +
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("added converter of type " + converterId +
                       " and class " + converterClass);
         }
     }
@@ -403,8 +408,8 @@
         synchronized (this) {
             converterTypeMap.put(targetClass, converterClass);
         }
- if (log.isTraceEnabled()) {
- log.trace("added converter of class type " + converterClass);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("added converter of class type " + converterClass);
         }
     }
 
@@ -418,16 +423,16 @@
         }
         Converter returnVal = (Converter) newThing(converterId, converterIdMap);
         if (returnVal == null) {
- if (log.isErrorEnabled()) {
- log.error("Couldn't instantiate converter of the type " +
- converterId);
- }
             Object[] params = {converterId};
+ if (logger.isLoggable(Level.SEVERE)) {
+ logger.log(Level.SEVERE,
+ "jsf.cannot_instantiate_converter_error", params);
+ }
             throw new FacesException(Util.getExceptionMessageString(
                 Util.NAMED_OBJECT_NOT_FOUND_ERROR_MESSAGE_ID, params));
         }
- if (log.isTraceEnabled()) {
- log.trace("created converter of type " + converterId);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("created converter of type " + converterId);
         }
         return returnVal;
     }
@@ -442,11 +447,11 @@
         }
         Converter result = createConverterBasedOnClass(targetClass);
         if (result == null) {
- if (log.isErrorEnabled()) {
- log.error("Couldn't instantiate converter of the type " +
- targetClass.getName());
- }
             Object[] params = {targetClass.getName()};
+ if (logger.isLoggable(Level.SEVERE)) {
+ logger.log(Level.SEVERE,
+ "jsf.cannot_instantiate_converter_error", params);
+ }
             throw new FacesException(Util.getExceptionMessageString(
                 Util.NAMED_OBJECT_NOT_FOUND_ERROR_MESSAGE_ID, params));
         }
@@ -458,9 +463,9 @@
         Converter returnVal = (Converter) newThing(targetClass,
                                                    converterTypeMap);
         if (returnVal != null) {
- if (log.isTraceEnabled()) {
- log.trace("Created converter of type " +
- returnVal.getClass().getName());
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("Created converter of type " +
+ returnVal.getClass().getName());
             }
             return returnVal;
         }
@@ -472,8 +477,8 @@
             for (int i = 0; i < interfaces.length; i++) {
                 returnVal = createConverterBasedOnClass(interfaces[i]);
                 if (returnVal != null) {
- if (log.isTraceEnabled()) {
- log.trace("Created converter of type " +
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("Created converter of type " +
                                   returnVal.getClass().getName());
                     }
                     return returnVal;
@@ -486,8 +491,8 @@
         if (superclass != null) {
             returnVal = (Converter) createConverterBasedOnClass(superclass);
             if (returnVal != null) {
- if (log.isTraceEnabled()) {
- log.trace("Created converter of type " +
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("Created converter of type " +
                               returnVal.getClass().getName());
                 }
                 return returnVal;
@@ -541,8 +546,8 @@
         synchronized (this) {
             supportedLocales = new ArrayList(newLocales);
         }
- if (log.isTraceEnabled()) {
- log.trace("set Supported Locales");
+ if (logger.isLoggable(Level.FINE)) {
+ logger.log(Level.FINE, "set Supported Locales");
         }
     }
 
@@ -567,8 +572,8 @@
         synchronized (this) {
             defaultLocale = locale;
         }
- if (log.isTraceEnabled()) {
- log.trace("set defaultLocale " + defaultLocale);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.log(Level.FINE, ("set defaultLocale " + defaultLocale));
         }
 
     }
@@ -598,8 +603,8 @@
         synchronized (this) {
             validatorMap.put(validatorId, validatorClass);
         }
- if (log.isTraceEnabled()) {
- log.trace("added validator of type " + validatorId +
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("added validator of type " + validatorId +
                       " class " + validatorClass);
         }
     }
@@ -614,16 +619,16 @@
         }
         Validator returnVal = (Validator) newThing(validatorId, validatorMap);
         if (returnVal == null) {
- if (log.isErrorEnabled()) {
- log.error("Couldn't instantiate Validator of the type " +
- validatorId);
- }
             Object[] params = {validatorId};
+ if (logger.isLoggable(Level.SEVERE)) {
+ logger.log(Level.SEVERE,
+ "jsf.cannot_instantiate_validator_error", params);
+ }
             throw new FacesException(Util.getExceptionMessageString(
                 Util.NAMED_OBJECT_NOT_FOUND_ERROR_MESSAGE_ID, params));
         }
- if (log.isTraceEnabled()) {
- log.trace("created validator of type " + validatorId);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("created validator of type " + validatorId);
         }
         return returnVal;
     }
@@ -642,8 +647,8 @@
         synchronized (this) {
             this.messageBundle = messageBundle;
         }
- if (log.isTraceEnabled()) {
- log.trace("set messageBundle " + messageBundle);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.log(Level.FINE, "set messageBundle " + messageBundle);
         }
     }
 
@@ -702,6 +707,9 @@
             result = clazz.newInstance();
         } catch (Throwable t) {
             Object[] params = {clazz.getName()};
+ if (logger.isLoggable(Level.SEVERE)) {
+ logger.log(Level.SEVERE, t.getMessage(), t);
+ }
             throw new FacesException(Util.getExceptionMessageString(
                 Util.CANT_INSTANTIATE_CLASS_ERROR_MESSAGE_ID, params));
         }
Index: src/com/sun/faces/application/NavigationHandlerImpl.java
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/application/NavigationHandlerImpl.java,v
retrieving revision 1.35
diff -u -r1.35 NavigationHandlerImpl.java
--- src/com/sun/faces/application/NavigationHandlerImpl.java 12 Oct 2004 14:39:49 -0000 1.35
+++ src/com/sun/faces/application/NavigationHandlerImpl.java 5 Apr 2005 00:33:07 -0000
@@ -11,8 +11,6 @@
 
 import com.sun.faces.util.Util;
 import com.sun.faces.config.ConfigureListener;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 
 import javax.faces.FacesException;
 import javax.faces.FactoryFinder;
@@ -27,6 +25,8 @@
 import java.util.List;
 import java.util.Map;
 import java.util.TreeSet;
+import java.util.logging.Logger;
+import java.util.logging.Level;
 
 /**
  * <p><strong>NavigationHandlerImpl</strong> is the class that implements
@@ -40,8 +40,11 @@
     // Protected Constants
     //
 
- private static final Log log = LogFactory.getLog(
- NavigationHandlerImpl.class);
+ // Log instance for this class
+ private static Logger logger;
+ static {
+ logger = Util.getLogger(Util.FACES_LOGGER);
+ }
 
     //
     // Class Variables
@@ -63,17 +66,17 @@
      */
     public NavigationHandlerImpl() {
         super();
- if (log.isDebugEnabled()) {
- log.debug("Created NavigationHandler instance ");
+ if (logger.isLoggable(Level.FINE)) {
+ logger.log(Level.FINE, "Created NavigationHandler instance ");
         }
         // if the user is using the decorator pattern, this would cause
         // our ApplicationAssociate to be created, if it isn't already
         // created.
- ApplicationFactory aFactory = (ApplicationFactory) FactoryFinder.getFactory(
- FactoryFinder.APPLICATION_FACTORY);
+ ApplicationFactory aFactory = (ApplicationFactory)
+ FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
         aFactory.getApplication();
- associate =
- ApplicationAssociate.getInstance(ConfigureListener.getExternalContextDuringInitialize());
+ associate = ApplicationAssociate.getInstance(
+ ConfigureListener.getExternalContextDuringInitialize());
 
     }
 
@@ -96,10 +99,11 @@
             throw new NullPointerException(message);
         }
         if (outcome == null) {
- if (log.isDebugEnabled()) {
- log.debug("No navigation rule found for outcome " + outcome +
- "and viewId " + context.getViewRoot().getViewId() +
- " Explicitly remain on the current view ");
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("No navigation rule found for outcome "
+ + outcome + "and viewId " +
+ context.getViewRoot().getViewId() +
+ " Explicitly remain on the current view ");
             }
             return; // Explicitly remain on the current view
         }
@@ -114,31 +118,30 @@
                 String newPath =
                     viewHandler.getActionURL(context, caseStruct.viewId);
                 try {
- if (log.isDebugEnabled()) {
- log.debug("Redirecting to path " + newPath
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("Redirecting to path " + newPath
                                   + " for outcome " + outcome +
                                   "and viewId " + caseStruct.viewId);
                     }
                     extContext.redirect(newPath);
                 } catch (java.io.IOException ioe) {
- String message = "Redirect to " + newPath + " failed.";
- if (log.isErrorEnabled()) {
- log.error(message);
+ if (logger.isLoggable(Level.SEVERE)) {
+ logger.log(Level.SEVERE,"jsf.redirect_failed_error",
+ newPath);
                     }
- throw new FacesException(message, ioe);
+ throw new FacesException(ioe.getMessage(), ioe);
                 }
                 context.responseComplete();
- if (log.isDebugEnabled()) {
- log.debug("Response complete for " + caseStruct.viewId);
- }
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("Response complete for " + caseStruct.viewId);
+ }
             } else {
                 UIViewRoot newRoot = viewHandler.createView(context,
                                                             caseStruct.viewId);
                 context.setViewRoot(newRoot);
- if (log.isDebugEnabled()) {
- log.debug(
- "Set new view in FacesContext for " +
- caseStruct.viewId);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("Set new view in FacesContext for " +
+ caseStruct.viewId);
                 }
             }
         }
@@ -251,16 +254,17 @@
         while (iter.hasNext()) {
             String fromViewId = (String) iter.next();
 
-// See if the entire wildcard string (without the trailing "*" is
-// contained in the incoming viewId. Ex: /foobar is contained with /foobarbaz
-// If so, then we have found our largest pattern match..
-// If not, then continue on to the next case;
+ // See if the entire wildcard string (without the trailing "*" is
+ // contained in the incoming viewId.
+ // Ex: /foobar is contained with /foobarbaz
+ // If so, then we have found our largest pattern match..
+ // If not, then continue on to the next case;
 
             if (viewId.indexOf(fromViewId, 0) == -1) {
                 continue;
             }
 
-// Append the trailing "*" so we can do our map lookup;
+ // Append the trailing "*" so we can do our map lookup;
 
             String wcFromViewId = fromViewId + "*";
             List caseList = (List) caseListMap.get(wcFromViewId);
@@ -269,12 +273,12 @@
                 return null;
             }
 
-// If we've found a match, then we need to evaluate
-// from-action/outcome in the following order:
-// 1) elements specifying both from-action and from-outcome
-// 2) elements specifying only from-outcome
-// 3) elements specifying only from-action
-// 4) elements where both from-action and from-outcome are null
+ // If we've found a match, then we need to evaluate
+ // from-action/outcome in the following order:
+ // 1) elements specifying both from-action and from-outcome
+ // 2) elements specifying only from-outcome
+ // 3) elements specifying only from-action
+ // 4) elements where both from-action and from-outcome are null
 
             result = determineViewFromActionOutcome(caseList, fromAction,
                                                     outcome);
Index: src/com/sun/faces/application/StateManagerImpl.java
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/application/StateManagerImpl.java,v
retrieving revision 1.27
diff -u -r1.27 StateManagerImpl.java
--- src/com/sun/faces/application/StateManagerImpl.java 18 Mar 2005 20:10:15 -0000 1.27
+++ src/com/sun/faces/application/StateManagerImpl.java 5 Apr 2005 00:33:07 -0000
@@ -16,8 +16,6 @@
 import com.sun.faces.RIConstants;
 import com.sun.faces.util.TreeStructure;
 import com.sun.faces.util.Util;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.commons.collections.LRUMap;
 
 import javax.faces.application.StateManager;
@@ -31,6 +29,8 @@
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Set;
+import java.util.logging.Logger;
+import java.util.logging.Level;
 
 /**
  * <B>StateManagerImpl</B> is the default implementation class for
@@ -41,7 +41,12 @@
  */
 public class StateManagerImpl extends StateManager {
 
- private static final Log log = LogFactory.getLog(StateManagerImpl.class);
+ // Log instance for this class
+ private static Logger logger;
+ static {
+ logger = Util.getLogger(Util.FACES_LOGGER);
+ }
+
     private static final String NUMBER_OF_VIEWS_IN_SESSION =
         RIConstants.FACES_PREFIX + "NUMBER_OF_VIEWS_IN_SESSION";
     private static final int DEFAULT_NUMBER_OF_VIEWS_IN_SESSION = 15;
@@ -69,17 +74,16 @@
         // that are marked transient.
         removeTransientChildrenAndFacets(context, viewRoot, new HashSet());
         
- if (log.isDebugEnabled()) {
- log.debug("Begin creating serialized view for " +
- viewRoot.getViewId());
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("Begin creating serialized view for "
+ + viewRoot.getViewId());
          }
         result = new SerializedView(treeStructure =
                                     getTreeStructureToSave(context),
                                     componentState =
                                     getComponentStateToSave(context));
- if (log.isDebugEnabled()) {
- log.debug("End creating serialized view " +
- viewRoot.getViewId());
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("End creating serialized view " + viewRoot.getViewId());
          }
          if (!isSavingStateInClient(context)) {
              String id = null;
@@ -125,6 +129,9 @@
             // check for id uniqueness
             id = kid.getClientId(context);
             if (id != null && !componentIds.add(id)) {
+ if (logger.isLoggable(Level.SEVERE)) {
+ logger.log(Level.SEVERE,"jsf.duplicate_component_id_error",id);
+ }
                 throw new IllegalStateException(Util.getExceptionMessageString(
                         Util.DUPLICATE_COMPONENT_ID_ERROR_ID,
                         new Object[]{id}));
@@ -143,6 +150,9 @@
             // check for id uniqueness
             id = kid.getClientId(context);
             if (id != null && !componentIds.add(id)) {
+ if (logger.isLoggable(Level.SEVERE)) {
+ logger.log(Level.SEVERE,"jsf.duplicate_component_id_error",id);
+ }
                 throw new IllegalStateException(Util.getExceptionMessageString(
                         Util.DUPLICATE_COMPONENT_ID_ERROR_ID,
                         new Object[]{id}));
@@ -187,20 +197,21 @@
         UIViewRoot viewRoot = null;
         if (isSavingStateInClient(context)) {
             // restore view from response.
- if (log.isDebugEnabled()) {
- log.debug("Begin restoring view from response " + viewId);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.log(Level.FINE, "Begin restoring view from response "
+ + viewId);
             }
             viewRoot = restoreTreeStructure(context, viewId, renderKitId);
             if (viewRoot != null) {
                 restoreComponentState(context, viewRoot, renderKitId);
             } else {
- if (log.isDebugEnabled()) {
- log.debug("Possibly a new request. Tree structure could not "
- + " be restored for " + viewId);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("Possibly a new request. Tree structure could not "
+ + " be restored for " + viewId);
                 }
             }
- if (log.isDebugEnabled()) {
- log.debug("End restoring view from response " + viewId);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("End restoring view from response " + viewId);
             }
         } else {
             // restore tree from session.
@@ -208,9 +219,9 @@
                          getTreeStructureToRestore(context, viewId));
 
             if (null != id) {
-
- if (log.isDebugEnabled()) {
- log.debug("Begin restoring view in session for viewId " + viewId);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine( "Begin restoring view in session for viewId "
+ + viewId);
                 }
                 
                 Map lruMap, sessionMap = Util.getSessionMap(context);
@@ -226,8 +237,9 @@
                 
                 viewRoot.processRestoreState(context, stateArray[1]);
                 
- if (log.isDebugEnabled()) {
- log.debug("End restoring view in session for viewId " + viewId);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("End restoring view in session for viewId "
+ + viewId);
                 }
             }
         }
@@ -302,6 +314,9 @@
             // check for id uniqueness
             id = kid.getClientId(context);
             if (id != null && !componentIds.add(id)) {
+ if (logger.isLoggable(Level.SEVERE)) {
+ logger.log(Level.SEVERE,"jsf.duplicate_component_id_error",id);
+ }
                 throw new IllegalStateException(Util.getExceptionMessageString(
                         Util.DUPLICATE_COMPONENT_ID_ERROR_ID,
                         new Object[]{id}));
@@ -328,6 +343,10 @@
             // check for id uniqueness
             id = facetComponent.getClientId(context);
             if (id != null && !componentIds.add(id)) {
+ if (logger.isLoggable(Level.SEVERE)) {
+ logger.log(Level.SEVERE,"jsf.duplicate_component_id_error",
+ id);
+ }
                 throw new IllegalStateException(Util.getExceptionMessageString(
                         Util.DUPLICATE_COMPONENT_ID_ERROR_ID,
                         new Object[]{id}));
@@ -384,8 +403,8 @@
     protected UIViewRoot restoreSerializedView(FacesContext context,
         SerializedView sv, String viewId) {
         if ( sv == null) {
- if (log.isDebugEnabled()) {
- log.debug("Possibly a new request. Tree structure could not "
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine( "Possibly a new request. Tree structure could not "
                         + " be restored for " + viewId);
             }
             return null;
@@ -419,8 +438,8 @@
             try {
                 noOfViews = Integer.valueOf(noOfViewsStr).intValue();
             } catch (NumberFormatException nfe) {
- if (log.isDebugEnabled()) {
- log.debug("Error parsing the servetInitParameter " +
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("Error parsing the servetInitParameter " +
                             NUMBER_OF_VIEWS_IN_SESSION + ". Using default " +
                             noOfViews);
                 }
Index: src/com/sun/faces/application/ViewHandlerImpl.java
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/application/ViewHandlerImpl.java,v
retrieving revision 1.48
diff -u -r1.48 ViewHandlerImpl.java
--- src/com/sun/faces/application/ViewHandlerImpl.java 17 Mar 2005 16:10:44 -0000 1.48
+++ src/com/sun/faces/application/ViewHandlerImpl.java 5 Apr 2005 00:33:07 -0000
@@ -15,8 +15,6 @@
 
 import com.sun.faces.RIConstants;
 import com.sun.faces.util.Util;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 
 import javax.faces.FacesException;
 import javax.faces.application.ViewHandler;
@@ -32,6 +30,8 @@
 import java.util.Iterator;
 import java.util.Locale;
 import java.util.Map;
+import java.util.logging.Logger;
+import java.util.logging.Level;
 
 /**
  * <B>ViewHandlerImpl</B> is the default implementation class for ViewHandler.
@@ -41,11 +41,12 @@
  */
 public class ViewHandlerImpl extends ViewHandler {
 
- //
- // Private/Protected Constants
- //
- private static final Log log = LogFactory.getLog(ViewHandlerImpl.class);
-
+ // Log instance for this class
+ private static Logger logger;
+ static {
+ logger = Util.getLogger(Util.FACES_LOGGER);
+ }
+
     /**
      * <p>The <code>request</code> scoped attribute to store the
      * {_at_link javax.faces.webapp.FacesServlet} path of the original
@@ -66,8 +67,8 @@
 
 
     public ViewHandlerImpl() {
- if (log.isDebugEnabled()) {
- log.debug("Created ViewHandler instance ");
+ if (logger.isLoggable(Level.FINE)) {
+ logger.log(Level.FINE,"Created ViewHandler instance ");
         }
     }
 
@@ -84,14 +85,15 @@
             throw new NullPointerException(message);
         }
         
- ApplicationAssociate associate = ApplicationAssociate.getInstance(context.getExternalContext());
+ ApplicationAssociate associate =
+ ApplicationAssociate.getInstance(context.getExternalContext());
         
         if (null != associate) {
             associate.responseRendered();
         }
         String requestURI = viewToRender.getViewId();
- if (log.isDebugEnabled()) {
- log.debug("About to render view " + requestURI);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.log(Level.FINE, "About to render view " + requestURI);
         }
 
         String mapping = getFacesMapping(context);
@@ -99,14 +101,14 @@
         // If we have a valid mapping (meaning we were invoked via the
         // FacesServlet) and we're extension mapped, do the replacement.
         if (mapping != null && !isPrefixMapped(mapping)) {
- if (log.isDebugEnabled()) {
- log.debug(
- "Found URL pattern mapping to FacesServlet " + mapping);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine( "Found URL pattern mapping to FacesServlet "
+ + mapping);
             }
             newViewId = convertViewId(context, requestURI);
         } else {
- if (log.isDebugEnabled()) {
- log.debug("Found no URL patterns mapping to FacesServlet ");
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("Found no URL patterns mapping to FacesServlet ");
             }
         }
 
@@ -124,12 +126,12 @@
                 context.getExternalContext().getRequest(),
                        Config.FMT_LOCALE, context.getViewRoot().getLocale());
         }
- if (log.isTraceEnabled()) {
- log.trace("Before dispacthMessage to newViewId " + newViewId);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("Before dispacthMessage to newViewId " + newViewId);
         }
         context.getExternalContext().dispatch(newViewId);
- if (log.isTraceEnabled()) {
- log.trace("After dispacthMessage to newViewId " + newViewId);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("After dispacthMessage to newViewId " + newViewId);
         }
 
     }
@@ -147,11 +149,6 @@
 
         // set the request character encoding. NOTE! This MUST be done
         // before any request praameter is accessed.
-
- /*
- HttpServletRequest request =
- (HttpServletRequest) extContext.getRequest();
- */
         Map headerMap = extContext.getRequestHeaderMap();
         String
             contentType = null,
@@ -181,17 +178,17 @@
         }
         if (null != charEnc) {
             try {
- if (log.isTraceEnabled()) {
- log.trace(
- "set character encoding on request to " + charEnc);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("set character encoding on request to "
+ + charEnc);
                 }
                 Object request = extContext.getRequest();
                 if (request instanceof ServletRequest) {
                     ((ServletRequest) request).setCharacterEncoding(charEnc);
                 }
             } catch (java.io.UnsupportedEncodingException uee) {
- if (log.isErrorEnabled()) {
- log.error(uee.getMessage(), uee);
+ if (logger.isLoggable(Level.SEVERE)) {
+ logger.log(Level.SEVERE,uee.getMessage(), uee);
                 }
                 throw new FacesException(uee);
             }
@@ -209,13 +206,12 @@
             context.getApplication().getViewHandler();
         String renderKitId =
             outerViewHandler.calculateRenderKitId(context);
- viewRoot = Util.getStateManager(context).restoreView(context,
- viewId,
- renderKitId);
-
- if (log.isTraceEnabled()) {
- log.trace("Restored View Tree");
- log.trace(com.sun.faces.util.DebugUtil.printTree(viewRoot));
+ viewRoot = Util.getStateManager(context).restoreView(context, viewId,
+ renderKitId);
+
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("Restored View Tree");
+ logger.fine(com.sun.faces.util.DebugUtil.printTree(viewRoot));
         }
     
         return viewRoot;
@@ -247,8 +243,8 @@
             // send them off to the root of the web application
             try {
                 context.responseComplete();
- if (log.isDebugEnabled()) {
- log.debug("Response Complete for" + viewId);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.log(Level.FINE, "Response Complete for" + viewId);
                 }
                 extContext.redirect(extContext.getRequestContextPath());
                 return result;
@@ -267,8 +263,8 @@
             locale = context.getViewRoot().getLocale();
             renderKitId = context.getViewRoot().getRenderKitId();
         }
- if (log.isDebugEnabled()) {
- log.debug("Created new view for " + viewId);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.log(Level.FINE, "Created new view for " + viewId);
         }
         // PENDING(): not sure if we should set the RenderKitId here.
         // The UIViewRoot ctor sets the renderKitId to the default
@@ -279,14 +275,14 @@
             locale =
                 context.getApplication().getViewHandler().calculateLocale(
                     context);
- if (log.isDebugEnabled()) {
- log.debug("Locale for this view as determined by calculateLocale "
- + locale.toString());
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("Locale for this view as determined by calculateLocale "
+ + locale.toString());
             }
         } else {
- if (log.isDebugEnabled()) {
- log.debug(
- "Using locale from previous view " + locale.toString());
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("Using locale from previous view "
+ + locale.toString());
             }
         }
 
@@ -294,14 +290,15 @@
             renderKitId =
                 context.getApplication().getViewHandler().calculateRenderKitId(
                     context);
- if (log.isDebugEnabled()) {
- log.debug("RenderKitId for this view as determined by calculateRenderKitId "
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine(
+ "RenderKitId for this view as determined by calculateRenderKitId "
                           + renderKitId);
             }
         } else {
- if (log.isDebugEnabled()) {
- log.debug(
- "Using renderKitId from previous view " + renderKitId);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("Using renderKitId from previous view "
+ + renderKitId);
             }
         }
 
@@ -423,14 +420,14 @@
             throw new NullPointerException(message);
         }
         
- if (log.isTraceEnabled()) {
- log.trace("Begin writing state to response for viewId" +
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("Begin writing state to response for viewId " +
                       context.getViewRoot().getViewId());
         }
         context.getResponseWriter().writeText(
                                     RIConstants.SAVESTATE_FIELD_MARKER, null);
- if (log.isTraceEnabled()) {
- log.trace("End writing state to response for viewId" +
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("End writing state to response for viewId " +
                       context.getViewRoot().getViewId());
         }
         
@@ -447,11 +444,12 @@
         }
 
         if (viewId.charAt(0) != '/') {
- String message = Util.getExceptionMessageString(Util.ILLEGAL_VIEW_ID_ID,
- new Object[]{viewId});
- if (log.isErrorEnabled()) {
- log.error(message + " " + viewId);
+ if (logger.isLoggable(Level.SEVERE)) {
+ logger.log(Level.SEVERE, "jsf.illegal_view_id_error", viewId);
             }
+ String message =
+ Util.getExceptionMessageString(Util.ILLEGAL_VIEW_ID_ID,
+ new Object[]{viewId});
             throw new IllegalArgumentException(message);
         }
         
@@ -551,21 +549,20 @@
 
             mapping = getMappingForRequest(servletPath, pathInfo);
             if (mapping == null) {
- String message = Util.getExceptionMessageString(
- Util.FACES_SERVLET_MAPPING_CANNOT_BE_DETERMINED_ID,
- new Object[]{servletPath});
- if (log.isWarnEnabled()) {
- log.warn(message);
- }
- //throw new FacesException(message);
+ if (logger.isLoggable(Level.WARNING)) {
+ logger.log(Level.WARNING,
+ "jsf.faces_servlet_mapping_cannot_be_determined_error",
+ new Object[]{servletPath});
+ }
             }
         }
 
         if (mapping != null) {
             extContext.getRequestMap().put(INVOCATION_PATH, mapping);
         }
- if (log.isDebugEnabled()) {
- log.debug("URL pattern of the FacesServlet executing the current request "
+ if (logger.isLoggable(Level.FINE)) {
+ logger.log(Level.FINE,
+ "URL pattern of the FacesServlet executing the current request "
                       + mapping);
         }
         return mapping;
@@ -585,9 +582,9 @@
         if (servletPath == null) {
             return null;
         }
- if (log.isTraceEnabled()) {
- log.trace("servletPath " + servletPath);
- log.trace("pathInfo " + pathInfo);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.log(Level.FINE, "servletPath " + servletPath);
+ logger.log(Level.FINE, "pathInfo " + pathInfo);
         }
 
         // If the path returned by HttpServletRequest.getServletPath()
@@ -642,8 +639,8 @@
                 if (contextDefaultSuffix == null) {
                     contextDefaultSuffix = ViewHandler.DEFAULT_SUFFIX;
                 }
- if (log.isDebugEnabled()) {
- log.debug("contextDefaultSuffix " + contextDefaultSuffix);
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine("contextDefaultSuffix " + contextDefaultSuffix);
                 }
             }
         }
@@ -661,8 +658,8 @@
                 buffer.append(contextDefaultSuffix);
             }
             convertedViewId = buffer.toString();
- if (log.isDebugEnabled()) {
- log.debug("viewId after appending the context suffix " +
+ if (logger.isLoggable(Level.FINE)) {
+ logger.fine( "viewId after appending the context suffix " +
                           convertedViewId);
             }
 
Index: src/com/sun/faces/util/Util.java
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/util/Util.java,v
retrieving revision 1.152
diff -u -r1.152 Util.java
--- src/com/sun/faces/util/Util.java 28 Feb 2005 18:48:21 -0000 1.152
+++ src/com/sun/faces/util/Util.java 5 Apr 2005 00:33:07 -0000
@@ -13,8 +13,6 @@
 
 import com.sun.faces.RIConstants;
 import com.sun.faces.renderkit.RenderKitImpl;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 
 import javax.faces.FacesException;
 import javax.faces.FactoryFinder;
@@ -54,6 +52,8 @@
 import java.util.Locale;
 import java.util.Map;
 import java.util.StringTokenizer;
+import java.util.logging.Logger;
+import java.util.logging.Level;
 
 /**
  * <B>Util</B> is a class ...
@@ -68,9 +68,17 @@
     //
     // Private/Protected Constants
     //
+ public static final String FACES_LOGGER = "javax.enterprise.resource.jsf.";
+
+ public static final String FACES_LOG_STRINGS =
+ "com.sun.faces.logging.LogStrings";
+
     // Log instance for this class
- protected static Log log = LogFactory.getLog(Util.class);
-
+ private static Logger logger;
+ static {
+ logger = getLogger(FACES_LOGGER);
+ }
+
     // README - make sure to add the message identifier constant
     // (ex: Util.CONVERSION_ERROR_MESSAGE_ID) and the number of substitution
     // parameters to test/com/sun/faces/util/TestUtil_messages (see comment there).
@@ -427,6 +435,10 @@
         }
         return loader;
     }
+
+ public static Logger getLogger( String loggerName ) {
+ return Logger.getLogger(loggerName, FACES_LOG_STRINGS );
+ }
 
 
     /**
@@ -1169,11 +1181,11 @@
                 }
             } catch (Exception e) {
                 Object[] params = new Object[1];
- params[0] = className;
+ params[0] = className;
                 String msg = Util.getExceptionMessageString(
                     Util.CANT_INSTANTIATE_CLASS_ERROR_MESSAGE_ID, params);
- if (log.isErrorEnabled()) {
- log.error(msg + ":" + className + ":exception:", e);
+ if ( logger.isLoggable(Level.SEVERE)) {
+ logger.log(Level.SEVERE, msg, e);
                 }
             }
         }


#
# Copyright 2004 Sun Microsystems, Inc. All Rights Reserved.
#
# Redistribution and use in source and binary forms, with or
# without modification, are permitted provided that the following
# conditions are met:
#
# - Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# - Redistribution in binary form must reproduce the above
# copyright notice, this list of conditions and the following
# disclaimer in the documentation and/or other materials
# provided with the distribution.
#
# Neither the name of Sun Microsystems, Inc. or the names of
# contributors may be used to endorse or promote products derived
# from this software without specific prior written permission.
#
# This software is provided "AS IS," without a warranty of any
# kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND
# WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY
# EXCLUDED. SUN AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY
# DAMAGES OR LIABILITIES SUFFERED BY LICENSEE AS A RESULT OF OR
# RELATING TO USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE OR
# ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE
# FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT,
# SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER
# CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF
# THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS
# BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
#
# You acknowledge that this software is not designed, licensed or
# intended for use in the design, construction, operation or
# maintenance of any nuclear facility.
#

jsf.managed_bean_creation_error=JSF1001: Managedbean {0} could not be created.
jsf.illegal_attempt_setting_viewhandler_error=JSF1002: Illegal attempt to set ViewHandler after a response has been generated.
jsf.illegal_attempt_setting_statemanager_error=JSF1003: Illegal attempt to set StateManager after a response has been generated.
jsf.cannot_instantiate_component_error=JSF1004:Cannot instantiate component of type {0)
jsf.cannot_instantiate_validator_error=JSF1005:Cannot instantiate validator of type {0)
jsf.cannot_instantiate_converter_error=JSF1006:Cannot instantiate converter of type {0)
jsf.duplicate_component_id_error=JSF1007:Duplicate component ID {0} found in view.
jsf.redirect_failed_error=JSF1008:Redirect to path {0} failed
jsf.faces_servlet_mapping_cannot_be_determined_error=Unable to determine FaceServlet mapping for servlet path {0}.
jsf.illegal_view_id_error=Illegal view ID {0}. The ID must begin with ''/''