[jbossweb-commits] JBossWeb SVN: r2080 - in trunk/src/main/java/org: jboss/web and 1 other directory.

jbossweb-commits at lists.jboss.org jbossweb-commits at lists.jboss.org
Wed Sep 12 12:44:28 EDT 2012


Author: remy.maucherat at jboss.com
Date: 2012-09-12 12:44:27 -0400 (Wed, 12 Sep 2012)
New Revision: 2080

Modified:
   trunk/src/main/java/org/apache/catalina/core/ApplicationContext.java
   trunk/src/main/java/org/apache/catalina/core/ApplicationDispatcher.java
   trunk/src/main/java/org/apache/catalina/core/ApplicationFilterChain.java
   trunk/src/main/java/org/apache/catalina/core/ApplicationFilterConfig.java
   trunk/src/main/java/org/apache/catalina/core/ApplicationHttpRequest.java
   trunk/src/main/java/org/apache/catalina/core/ApplicationHttpResponse.java
   trunk/src/main/java/org/apache/catalina/core/ApplicationRequest.java
   trunk/src/main/java/org/apache/catalina/core/ApplicationResponse.java
   trunk/src/main/java/org/apache/catalina/core/AprLifecycleListener.java
   trunk/src/main/java/org/apache/catalina/core/ContainerBase.java
   trunk/src/main/java/org/apache/catalina/core/LocalStrings.properties
   trunk/src/main/java/org/apache/catalina/core/StandardContext.java
   trunk/src/main/java/org/apache/catalina/core/StandardEngine.java
   trunk/src/main/java/org/apache/catalina/core/StandardHost.java
   trunk/src/main/java/org/apache/catalina/core/StandardWrapper.java
   trunk/src/main/java/org/jboss/web/CatalinaLogger.java
   trunk/src/main/java/org/jboss/web/CatalinaMessages.java
Log:
Part 1 of the core package.

Modified: trunk/src/main/java/org/apache/catalina/core/ApplicationContext.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/core/ApplicationContext.java	2012-09-06 14:06:07 UTC (rev 2079)
+++ trunk/src/main/java/org/apache/catalina/core/ApplicationContext.java	2012-09-12 16:44:27 UTC (rev 2080)
@@ -47,6 +47,8 @@
 package org.apache.catalina.core;
 
 
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
 import java.io.File;
 import java.io.InputStream;
 import java.net.MalformedURLException;
@@ -97,7 +99,6 @@
 import org.apache.catalina.util.RequestUtil;
 import org.apache.catalina.util.ResourceSet;
 import org.apache.catalina.util.ServerInfo;
-import org.apache.catalina.util.StringManager;
 import org.apache.naming.resources.DirContextURLStreamHandler;
 import org.apache.naming.resources.Resource;
 import org.apache.tomcat.util.buf.CharChunk;
@@ -175,13 +176,6 @@
 
 
     /**
-     * The string manager for this package.
-     */
-    private static final StringManager sm =
-      StringManager.getManager(Constants.Package);
-
-
-    /**
      * Base path.
      */
     private String basePath = null;
@@ -436,9 +430,7 @@
         if (path.startsWith("?"))
             path = "/" + path;
         if (!path.startsWith("/"))
-            throw new IllegalArgumentException
-                (sm.getString
-                 ("applicationContext.requestDispatcher.iae", path));
+            throw MESSAGES.invalidDispatcherPath(path);
 
         // Get query string
         String queryString = null;
@@ -494,7 +486,7 @@
             }
         } catch (Exception e) {
             // Should never happen
-            log(sm.getString("applicationContext.mapping.error"), e);
+            log(MESSAGES.dispatcherMappingError(), e);
             return (null);
         }
 
@@ -528,7 +520,7 @@
         throws MalformedURLException {
 
         if (path == null || (Globals.STRICT_SERVLET_COMPLIANCE && !path.startsWith("/"))) {
-            throw new MalformedURLException(sm.getString("applicationContext.requestDispatcher.iae", path));
+            throw new MalformedURLException(MESSAGES.invalidDispatcherPathString(path));
         }
         
         path = RequestUtil.normalize(path);
@@ -615,8 +607,7 @@
             return null;
         }
         if (!path.startsWith("/")) {
-            throw new IllegalArgumentException
-                (sm.getString("applicationContext.resourcePaths.iae", path));
+            throw MESSAGES.invalidDispatcherPath(path);
         }
 
         path = RequestUtil.normalize(path);
@@ -783,7 +774,7 @@
                 context.fireContainerEvent("afterContextAttributeRemoved",
                                            listener);
                 // FIXME - should we do anything besides log these?
-                log(sm.getString("applicationContext.attributeEvent"), t);
+                log(MESSAGES.servletContextAttributeListenerException(), t);
             }
         }
 
@@ -801,8 +792,7 @@
 
         // Name cannot be null
         if (name == null)
-            throw new IllegalArgumentException
-                (sm.getString("applicationContext.setAttribute.namenull"));
+            throw new IllegalArgumentException(MESSAGES.servletContextAttributeNameIsNull());
 
         // Null value is the same as removeAttribute()
         if (value == null) {
@@ -863,7 +853,7 @@
                     context.fireContainerEvent("afterContextAttributeAdded",
                                                listener);
                 // FIXME - should we do anything besides log these?
-                log(sm.getString("applicationContext.attributeEvent"), t);
+                log(MESSAGES.servletContextAttributeListenerException(), t);
             }
         }
 
@@ -873,11 +863,10 @@
     public FilterRegistration.Dynamic addFilter(String filterName, String className)
             throws IllegalArgumentException, IllegalStateException {
         if (restricted) {
-            throw new UnsupportedOperationException(sm.getString("applicationContext.restricted"));
+            throw MESSAGES.restrictedListenerCannotCallMethod();
         }
         if (!context.isStarting()) {
-            throw new IllegalStateException(sm.getString("applicationContext.alreadyInitialized",
-                            getContextPath()));
+            throw MESSAGES.contextAlreadyInitialized(getContextPath());
         }
         if (context.findFilterDef(filterName) != null) {
             return null;
@@ -895,11 +884,10 @@
 
     public FilterRegistration.Dynamic addFilter(String filterName, Filter filter) {
         if (restricted) {
-            throw new UnsupportedOperationException(sm.getString("applicationContext.restricted"));
+            throw MESSAGES.restrictedListenerCannotCallMethod();
         }
         if (!context.isStarting()) {
-            throw new IllegalStateException(sm.getString("applicationContext.alreadyInitialized",
-                            getContextPath()));
+            throw MESSAGES.contextAlreadyInitialized(getContextPath());
         }
         if (context.findFilterDef(filterName) != null) {
             return null;
@@ -935,11 +923,10 @@
     public ServletRegistration.Dynamic addServlet(String servletName, String className)
             throws IllegalArgumentException, IllegalStateException {
         if (restricted) {
-            throw new UnsupportedOperationException(sm.getString("applicationContext.restricted"));
+            throw MESSAGES.restrictedListenerCannotCallMethod();
         }
         if (!context.isStarting()) {
-            throw new IllegalStateException(sm.getString("applicationContext.alreadyInitialized",
-                            getContextPath()));
+            throw MESSAGES.contextAlreadyInitialized(getContextPath());
         }
         if (context.findChild(servletName) != null) {
             return null;
@@ -962,11 +949,10 @@
 
     public ServletRegistration.Dynamic addServlet(String servletName, Servlet servlet) {
         if (restricted) {
-            throw new UnsupportedOperationException(sm.getString("applicationContext.restricted"));
+            throw MESSAGES.restrictedListenerCannotCallMethod();
         }
         if (!context.isStarting()) {
-            throw new IllegalStateException(sm.getString("applicationContext.alreadyInitialized",
-                            getContextPath()));
+            throw MESSAGES.contextAlreadyInitialized(getContextPath());
         }
         if (context.findChild(servletName) != null) {
             return null;
@@ -991,7 +977,7 @@
 
     public FilterRegistration getFilterRegistration(String filterName) {
         if (restricted) {
-            throw new UnsupportedOperationException(sm.getString("applicationContext.restricted"));
+            throw MESSAGES.restrictedListenerCannotCallMethod();
         }
         ApplicationFilterConfig filterConfig = context.findApplicationFilterConfig(filterName);
         if (filterConfig == null) {
@@ -1009,7 +995,7 @@
 
     public ServletRegistration getServletRegistration(String servletName) {
         if (restricted) {
-            throw new UnsupportedOperationException(sm.getString("applicationContext.restricted"));
+            throw MESSAGES.restrictedListenerCannotCallMethod();
         }
         Wrapper wrapper = (Wrapper) context.findChild(servletName);
         if (wrapper != null) {
@@ -1022,7 +1008,7 @@
 
     public Map<String, FilterRegistration> getFilterRegistrations() {
         if (restricted) {
-            throw new UnsupportedOperationException(sm.getString("applicationContext.restricted"));
+            throw MESSAGES.restrictedListenerCannotCallMethod();
         }
         HashMap<String, FilterRegistration> result = 
             new HashMap<String, FilterRegistration>();
@@ -1036,7 +1022,7 @@
 
     public Map<String, ServletRegistration> getServletRegistrations() {
         if (restricted) {
-            throw new UnsupportedOperationException(sm.getString("applicationContext.restricted"));
+            throw MESSAGES.restrictedListenerCannotCallMethod();
         }
         HashMap<String, ServletRegistration> result = 
             new HashMap<String, ServletRegistration>();
@@ -1051,14 +1037,14 @@
 
     public Set<SessionTrackingMode> getDefaultSessionTrackingModes() {
         if (restricted) {
-            throw new UnsupportedOperationException(sm.getString("applicationContext.restricted"));
+            throw MESSAGES.restrictedListenerCannotCallMethod();
         }
         return context.getDefaultSessionTrackingModes();
     }
 
     public Set<SessionTrackingMode> getEffectiveSessionTrackingModes() {
         if (restricted) {
-            throw new UnsupportedOperationException(sm.getString("applicationContext.restricted"));
+            throw MESSAGES.restrictedListenerCannotCallMethod();
         }
         return context.getSessionTrackingModes();
     }
@@ -1066,7 +1052,7 @@
 
     public SessionCookieConfig getSessionCookieConfig() {
         if (restricted) {
-            throw new UnsupportedOperationException(sm.getString("applicationContext.restricted"));
+            throw MESSAGES.restrictedListenerCannotCallMethod();
         }
         return context.getSessionCookie();
     }
@@ -1075,12 +1061,12 @@
     public <T extends Filter> T createFilter(Class<T> c)
             throws ServletException {
         if (restricted) {
-            throw new UnsupportedOperationException(sm.getString("applicationContext.restricted"));
+            throw MESSAGES.restrictedListenerCannotCallMethod();
         }
         try {
             return (T) context.getInstanceManager().newInstance(c);
         } catch (Throwable e) {
-            throw new ServletException(sm.getString("applicationContext.create"), e);
+            throw new ServletException(MESSAGES.contextObjectCreationError(), e);
         }
     }
 
@@ -1088,23 +1074,22 @@
     public <T extends Servlet> T createServlet(Class<T> c)
             throws ServletException {
         if (restricted) {
-            throw new UnsupportedOperationException(sm.getString("applicationContext.restricted"));
+            throw MESSAGES.restrictedListenerCannotCallMethod();
         }
         try {
             return (T) context.getInstanceManager().newInstance(c);
         } catch (Throwable e) {
-            throw new ServletException(sm.getString("applicationContext.create"), e);
+            throw new ServletException(MESSAGES.contextObjectCreationError(), e);
         }
     }
 
 
     public boolean setInitParameter(String name, String value) {
         if (restricted) {
-            throw new UnsupportedOperationException(sm.getString("applicationContext.restricted"));
+            throw MESSAGES.restrictedListenerCannotCallMethod();
         }
         if (!context.isStarting()) {
-            throw new IllegalStateException(sm.getString("applicationContext.alreadyInitialized",
-                            getContextPath()));
+            throw MESSAGES.contextAlreadyInitialized(getContextPath());
         }
         mergeParameters();
         if (parameters.get(name) != null) {
@@ -1118,24 +1103,20 @@
 
     public void setSessionTrackingModes(Set<SessionTrackingMode> sessionTrackingModes) {
         if (restricted) {
-            throw new UnsupportedOperationException(sm.getString("applicationContext.restricted"));
+            throw MESSAGES.restrictedListenerCannotCallMethod();
         }
         if (!context.isStarting()) {
-            throw new IllegalStateException(sm.getString("applicationContext.alreadyInitialized",
-                            getContextPath()));
+            throw MESSAGES.contextAlreadyInitialized(getContextPath());
         }
         // Check that only supported tracking modes have been requested
         for (SessionTrackingMode sessionTrackingMode : sessionTrackingModes) {
             if (!getDefaultSessionTrackingModes().contains(sessionTrackingMode)) {
-                throw new IllegalArgumentException(sm.getString(
-                        "applicationContext.setSessionTracking.iae",
-                        sessionTrackingMode.toString(), getContextPath()));
+                throw MESSAGES.unsupportedSessionTrackingMode(sessionTrackingMode.toString(), getContextPath());
             }
         }
         // If SSL is specified, it should be the only one used
         if (sessionTrackingModes.contains(SessionTrackingMode.SSL) && sessionTrackingModes.size() > 1) {
-            throw new IllegalArgumentException(sm.getString(
-                    "applicationContext.setSessionTracking.ssl", getContextPath()));
+            throw MESSAGES.sslSessionTrackingModeIsExclusive(getContextPath());
         }
         context.setSessionTrackingModes(sessionTrackingModes);
     }
@@ -1143,24 +1124,21 @@
 
     public void addListener(String className) {
         if (restricted) {
-            throw new UnsupportedOperationException(sm.getString("applicationContext.restricted"));
+            throw MESSAGES.restrictedListenerCannotCallMethod();
         }
         if (!context.isStarting()) {
-            throw new IllegalStateException(sm.getString("applicationContext.alreadyInitialized",
-                            getContextPath()));
+            throw MESSAGES.contextAlreadyInitialized(getContextPath());
         }
         EventListener listenerInstance = null;
         try {
             Class<?> clazz = context.getLoader().getClassLoader().loadClass(className);
             listenerInstance = (EventListener) context.getInstanceManager().newInstance(clazz);
         } catch (Throwable t) {
-            throw new IllegalArgumentException(sm.getString("applicationContext.badListenerClass", 
-                    className, getContextPath()), t);
+            throw MESSAGES.invalidContextListener(className, getContextPath(), t);
         }
         checkListenerType(listenerInstance);
         if (context.getApplicationLifecycleListeners() != null && listenerInstance instanceof ServletContextListener) {
-            throw new IllegalArgumentException(sm.getString("applicationContext.badListenerClass", 
-                    className, getContextPath()));
+            throw MESSAGES.invalidContextListener(className, getContextPath());
         }
         context.addApplicationListenerInstance(listenerInstance);
     }
@@ -1168,16 +1146,14 @@
 
     public <T extends EventListener> void addListener(T listener) {
         if (restricted) {
-            throw new UnsupportedOperationException(sm.getString("applicationContext.restricted"));
+            throw MESSAGES.restrictedListenerCannotCallMethod();
         }
         if (!context.isStarting()) {
-            throw new IllegalStateException(sm.getString("applicationContext.alreadyInitialized",
-                            getContextPath()));
+            throw MESSAGES.contextAlreadyInitialized(getContextPath());
         }
         checkListenerType(listener);
         if (context.getApplicationLifecycleListeners() != null && listener instanceof ServletContextListener) {
-            throw new IllegalArgumentException(sm.getString("applicationContext.badListenerClass", 
-                    listener.getClass().getName(), getContextPath()));
+            throw MESSAGES.invalidContextListener(listener.getClass().getName(), getContextPath());
         }
         context.addApplicationListenerInstance(listener);
     }
@@ -1185,23 +1161,20 @@
 
     public void addListener(Class<? extends EventListener> listenerClass) {
         if (restricted) {
-            throw new UnsupportedOperationException(sm.getString("applicationContext.restricted"));
+            throw MESSAGES.restrictedListenerCannotCallMethod();
         }
         if (!context.isStarting()) {
-            throw new IllegalStateException(sm.getString("applicationContext.alreadyInitialized",
-                            getContextPath()));
+            throw MESSAGES.contextAlreadyInitialized(getContextPath());
         }
         EventListener listenerInstance = null;
         try {
             listenerInstance = (EventListener) context.getInstanceManager().newInstance(listenerClass);
         } catch (Exception e) {
-            throw new IllegalArgumentException(sm.getString("applicationContext.badListenerClass", 
-                    listenerClass.getName(), getContextPath()), e);
+            throw MESSAGES.invalidContextListener(listenerClass.getName(), getContextPath(), e);
         }
         checkListenerType(listenerInstance);
         if (context.getApplicationLifecycleListeners() != null && listenerInstance instanceof ServletContextListener) {
-            throw new IllegalArgumentException(sm.getString("applicationContext.badListenerClass", 
-                    listenerClass.getName(), getContextPath()));
+            throw MESSAGES.invalidContextListener(listenerClass.getName(), getContextPath());
         }
         context.addApplicationListenerInstance(listenerInstance);
     }
@@ -1210,17 +1183,16 @@
     public <T extends EventListener> T createListener(Class<T> clazz)
             throws ServletException {
         if (restricted) {
-            throw new UnsupportedOperationException(sm.getString("applicationContext.restricted"));
+            throw MESSAGES.restrictedListenerCannotCallMethod();
         }
         if (!context.isStarting()) {
-            throw new IllegalStateException(sm.getString("applicationContext.alreadyInitialized",
-                            getContextPath()));
+            throw MESSAGES.contextAlreadyInitialized(getContextPath());
         }
         T listenerInstance = null;
         try {
             listenerInstance = (T) context.getInstanceManager().newInstance(clazz);
         } catch (Throwable t) {
-            throw new ServletException(sm.getString("applicationContext.create"), t);
+            throw new ServletException(MESSAGES.contextObjectCreationError(), t);
         }
         checkListenerType(listenerInstance);
         return listenerInstance;
@@ -1229,7 +1201,7 @@
 
     public ClassLoader getClassLoader() {
         if (restricted) {
-            throw new UnsupportedOperationException(sm.getString("applicationContext.restricted"));
+            throw MESSAGES.restrictedListenerCannotCallMethod();
         }
         return context.getLoader().getClassLoader();
     }
@@ -1237,7 +1209,7 @@
 
     public JspConfigDescriptor getJspConfigDescriptor() {
         if (restricted) {
-            throw new UnsupportedOperationException(sm.getString("applicationContext.restricted"));
+            throw MESSAGES.restrictedListenerCannotCallMethod();
         }
         ArrayList<TaglibDescriptor> taglibDescriptors = new ArrayList<TaglibDescriptor>();
         String[] taglibURIs = context.findTaglibs();
@@ -1259,7 +1231,7 @@
 
     public int getEffectiveMajorVersion() {
         if (restricted) {
-            throw new UnsupportedOperationException(sm.getString("applicationContext.restricted"));
+            throw MESSAGES.restrictedListenerCannotCallMethod();
         }
         return context.getVersionMajor();
     }
@@ -1267,23 +1239,21 @@
 
     public int getEffectiveMinorVersion() {
         if (restricted) {
-            throw new UnsupportedOperationException(sm.getString("applicationContext.restricted"));
+            throw MESSAGES.restrictedListenerCannotCallMethod();
         }
         return context.getVersionMinor();
     }
 
     public void declareRoles(String... roleNames) {
         if (restricted) {
-            throw new UnsupportedOperationException(sm.getString("applicationContext.restricted"));
+            throw MESSAGES.restrictedListenerCannotCallMethod();
         }
         if (!context.isStarting()) {
-            throw new IllegalStateException(sm.getString("applicationContext.alreadyInitialized",
-                            getContextPath()));
+            throw MESSAGES.contextAlreadyInitialized(getContextPath());
         }
         for (String role: roleNames) {
             if (role == null || "".equals(role)) {
-                throw new IllegalArgumentException(sm.getString("applicationContext.emptyRole",
-                        getContextPath()));
+                throw MESSAGES.invalidEmptyRole(getContextPath());
             }
             context.addSecurityRole(role);
         }
@@ -1298,8 +1268,7 @@
                 && !(listener instanceof ServletRequestAttributeListener)
                 && !(listener instanceof HttpSessionListener)
                 && !(listener instanceof HttpSessionAttributeListener)) {
-            throw new IllegalArgumentException(sm.getString("applicationContext.badListenerClass", 
-                    listener.getClass().getName(), getContextPath()));
+            throw MESSAGES.invalidContextListener(listener.getClass().getName(), getContextPath());
         }
     }
     

Modified: trunk/src/main/java/org/apache/catalina/core/ApplicationDispatcher.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/core/ApplicationDispatcher.java	2012-09-06 14:06:07 UTC (rev 2079)
+++ trunk/src/main/java/org/apache/catalina/core/ApplicationDispatcher.java	2012-09-12 16:44:27 UTC (rev 2080)
@@ -18,6 +18,8 @@
 
 package org.apache.catalina.core;
 
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
 import java.io.IOException;
 import java.io.PrintWriter;
 import java.security.AccessController;
@@ -49,7 +51,6 @@
 import org.apache.catalina.connector.Response;
 import org.apache.catalina.connector.ResponseFacade;
 import org.apache.catalina.util.InstanceSupport;
-import org.apache.catalina.util.StringManager;
 
 /**
  * Standard implementation of <code>RequestDispatcher</code> that allows a
@@ -280,13 +281,6 @@
 
 
     /**
-     * The StringManager for this package.
-     */
-    private static final StringManager sm =
-      StringManager.getManager(Constants.Package);
-
-
-    /**
      * The InstanceSupport instance associated with our Wrapper (used to
      * send "before dispatch" and "after dispatch" events.
      */
@@ -495,8 +489,7 @@
         
         // Reset any output that has been buffered, but keep headers/cookies
         if (response.isCommitted()) {
-            throw new IllegalStateException
-                (sm.getString("applicationDispatcher.forward.ise"));
+            throw MESSAGES.cannotForwardAfterCommit();
         }
         try {
             response.resetBuffer();
@@ -776,12 +769,11 @@
                     try {
                         listener.requestInitialized(event);
                     } catch (Throwable t) {
-                        context.getLogger().error(sm.getString("requestListenerValve.requestInit",
-                                         instances[i].getClass().getName()), t);
+                        context.getLogger().error
+                            (MESSAGES.requestListenerInitException(instances[i].getClass().getName()), t);
                         request.setAttribute(RequestDispatcher.ERROR_EXCEPTION, t);
                         servletException = new ServletException
-                            (sm.getString("requestListenerValve.requestInit",
-                                wrapper.getName()), t);
+                            (MESSAGES.requestListenerInitException(instances[i].getClass().getName()), t);
                     }
                 }
             }
@@ -791,15 +783,12 @@
 
         // Check for the servlet being marked unavailable
         if (wrapper.isUnavailable()) {
-            wrapper.getLogger().warn(
-                    sm.getString("applicationDispatcher.isUnavailable", 
-                    wrapper.getName()));
+            wrapper.getLogger().warn(MESSAGES.servletIsUnavailable(wrapper.getName()));
             long available = wrapper.getAvailable();
             if ((available > 0L) && (available < Long.MAX_VALUE))
                 hresponse.setDateHeader("Retry-After", available);
-            hresponse.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE, sm
-                    .getString("applicationDispatcher.isUnavailable", wrapper
-                            .getName()));
+            hresponse.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE, 
+                    MESSAGES.servletIsUnavailable(wrapper.getName()));
             unavailable = true;
         }
 
@@ -809,16 +798,14 @@
                 servlet = wrapper.allocate();
             }
         } catch (ServletException e) {
-            wrapper.getLogger().error(sm.getString("applicationDispatcher.allocateException",
-                             wrapper.getName()), StandardWrapper.getRootCause(e));
+            wrapper.getLogger().error(MESSAGES.servletAllocateException(wrapper.getName()), 
+                    StandardWrapper.getRootCause(e));
             servletException = e;
             servlet = null;
         } catch (Throwable e) {
-            wrapper.getLogger().error(sm.getString("applicationDispatcher.allocateException",
-                             wrapper.getName()), e);
+            wrapper.getLogger().error(MESSAGES.servletAllocateException(wrapper.getName()), e);
             servletException = new ServletException
-                (sm.getString("applicationDispatcher.allocateException",
-                              wrapper.getName()), e);
+                (MESSAGES.servletAllocateException(wrapper.getName()), e);
             servlet = null;
         }
                 
@@ -843,24 +830,20 @@
         } catch (ClientAbortException e) {
             ioException = e;
         } catch (IOException e) {
-            wrapper.getLogger().error(sm.getString("applicationDispatcher.serviceException",
-                             wrapper.getName()), e);
+            wrapper.getLogger().error(MESSAGES.servletServiceException(wrapper.getName()), e);
             ioException = e;
         } catch (UnavailableException e) {
-            wrapper.getLogger().error(sm.getString("applicationDispatcher.serviceException",
-                             wrapper.getName()), e);
+            wrapper.getLogger().error(MESSAGES.servletServiceException(wrapper.getName()), e);
             servletException = e;
             wrapper.unavailable(e);
         } catch (ServletException e) {
             Throwable rootCause = StandardWrapper.getRootCause(e);
             if (!(rootCause instanceof ClientAbortException)) {
-                wrapper.getLogger().error(sm.getString("applicationDispatcher.serviceException",
-                        wrapper.getName()), rootCause);
+                wrapper.getLogger().error(MESSAGES.servletServiceException(wrapper.getName()), rootCause);
             }
             servletException = e;
         } catch (RuntimeException e) {
-            wrapper.getLogger().error(sm.getString("applicationDispatcher.serviceException",
-                             wrapper.getName()), e);
+            wrapper.getLogger().error(MESSAGES.servletServiceException(wrapper.getName()), e);
             runtimeException = e;
         } finally {
             if (jspFile != null) {
@@ -880,15 +863,12 @@
                 wrapper.deallocate(servlet);
             }
         } catch (ServletException e) {
-            wrapper.getLogger().error(sm.getString("applicationDispatcher.deallocateException",
-                             wrapper.getName()), e);
+            wrapper.getLogger().error(MESSAGES.servletDeallocateException(wrapper.getName()), e);
             servletException = e;
         } catch (Throwable e) {
-            wrapper.getLogger().error(sm.getString("applicationDispatcher.deallocateException",
-                             wrapper.getName()), e);
+            wrapper.getLogger().error(MESSAGES.servletDeallocateException(wrapper.getName()), e);
             servletException = new ServletException
-                (sm.getString("applicationDispatcher.deallocateException",
-                              wrapper.getName()), e);
+                (MESSAGES.servletDeallocateException(wrapper.getName()), e);
         }
 
 
@@ -906,12 +886,10 @@
                     try {
                         listener.requestDestroyed(event);
                     } catch (Throwable t) {
-                        context.getLogger().error(sm.getString("requestListenerValve.requestDestroy",
-                                instances[i].getClass().getName()), t);
+                        context.getLogger().error(MESSAGES.requestListenerDestroyException(instances[i].getClass().getName()), t);
                         request.setAttribute(RequestDispatcher.ERROR_EXCEPTION, t);
                         servletException = new ServletException
-                            (sm.getString("requestListenerValve.requestDestroy",
-                                    wrapper.getName()), t);
+                            (MESSAGES.requestListenerDestroyException(instances[i].getClass().getName()), t);
                     }
                 }
             }
@@ -1143,8 +1121,7 @@
             }
         }
         if (!same) {
-            throw new ServletException(sm.getString(
-                    "applicationDispatcher.specViolation.request"));
+            throw new ServletException(MESSAGES.notOriginalRequestInDispatcher());
         }
         
         same = false;
@@ -1172,8 +1149,7 @@
         }
 
         if (!same) {
-            throw new ServletException(sm.getString(
-                    "applicationDispatcher.specViolation.response"));
+            throw new ServletException(MESSAGES.notOriginalResponseInDispatcher());
         }
     }
 

Modified: trunk/src/main/java/org/apache/catalina/core/ApplicationFilterChain.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/core/ApplicationFilterChain.java	2012-09-06 14:06:07 UTC (rev 2079)
+++ trunk/src/main/java/org/apache/catalina/core/ApplicationFilterChain.java	2012-09-12 16:44:27 UTC (rev 2080)
@@ -47,6 +47,8 @@
 package org.apache.catalina.core;
 
 
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
 import java.io.IOException;
 import java.security.Principal;
 import java.security.PrivilegedActionException;
@@ -66,7 +68,6 @@
 import org.apache.catalina.connector.RequestFacade;
 import org.apache.catalina.security.SecurityUtil;
 import org.apache.catalina.util.InstanceSupport;
-import org.apache.catalina.util.StringManager;
 import org.jboss.servlet.http.HttpEvent;
 import org.jboss.servlet.http.HttpEventFilter;
 import org.jboss.servlet.http.HttpEventFilterChain;
@@ -166,13 +167,6 @@
     private Servlet servlet = null;
 
 
-   /**
-     * The string manager for our package.
-     */
-    private static final StringManager sm =
-      StringManager.getManager(Constants.Package);
-
-
     /**
      * Static class array used when the SecurityManager is turned on and 
      * <code>doFilter</code> is invoked.
@@ -290,7 +284,7 @@
                 throw e;
             } catch (Throwable e) {
                 throwable = e;
-                throw new ServletException(sm.getString("filterChain.filter"), e);
+                throw new ServletException(MESSAGES.filterException(), e);
             } finally {
                 pointer--;
                 if (filter != null) {
@@ -343,8 +337,7 @@
             throw e;
         } catch (Throwable e) {
             throwable = e;
-            throw new ServletException
-              (sm.getString("filterChain.servlet"), e);
+            throw new ServletException(MESSAGES.servletException(), e);
         } finally {
             pointer--;
             if (Globals.STRICT_SERVLET_COMPLIANCE) {
@@ -462,8 +455,7 @@
                 throw e;
             } catch (Throwable e) {
                 throwable = e;
-                throw new ServletException
-                    (sm.getString("filterChain.filter"), e);
+                throw new ServletException(MESSAGES.filterException(), e);
             } finally {
                 pointer--;
                 if (filter != null) {
@@ -504,8 +496,7 @@
             throw e;
         } catch (Throwable e) {
             throwable = e;
-            throw new ServletException
-                (sm.getString("filterChain.servlet"), e);
+            throw new ServletException(MESSAGES.servletException(), e);
         } finally {
             pointer--;
             support.fireInstanceEvent(InstanceEvent.AFTER_SERVICE_EVENT,

Modified: trunk/src/main/java/org/apache/catalina/core/ApplicationFilterConfig.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/core/ApplicationFilterConfig.java	2012-09-06 14:06:07 UTC (rev 2079)
+++ trunk/src/main/java/org/apache/catalina/core/ApplicationFilterConfig.java	2012-09-12 16:44:27 UTC (rev 2080)
@@ -47,6 +47,8 @@
 package org.apache.catalina.core;
 
 
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
 import java.io.Serializable;
 import java.lang.reflect.InvocationTargetException;
 import java.util.ArrayList;
@@ -74,8 +76,8 @@
 import org.apache.catalina.deploy.FilterMap;
 import org.apache.catalina.security.SecurityUtil;
 import org.apache.catalina.util.Enumerator;
-import org.apache.catalina.util.StringManager;
 import org.apache.tomcat.util.modeler.Registry;
+import org.jboss.web.CatalinaLogger;
 
 
 /**
@@ -90,12 +92,6 @@
 public final class ApplicationFilterConfig implements FilterConfig, Serializable {
 
 
-    protected static org.jboss.logging.Logger log=
-        org.jboss.logging.Logger.getLogger( ApplicationFilterConfig.class );
-
-    protected static StringManager sm =
-        StringManager.getManager(Constants.Package);
-
     // ----------------------------------------------------------- Constructors
 
 
@@ -258,10 +254,10 @@
     public boolean addMappingForServletNames(EnumSet<DispatcherType> dispatcherTypes, 
             boolean isMatchAfter, String... servletNames) {
         if (!context.isStarting()) {
-            throw new IllegalStateException(sm.getString("filterRegistration.ise", context.getPath()));
+            throw MESSAGES.cannotAddFilterRegistrationAfterInit(context.getPath());
         }
         if (servletNames == null || servletNames.length == 0) {
-            throw new IllegalArgumentException(sm.getString("filterRegistration.iae"));
+            throw MESSAGES.invalidFilterRegistrationArguments();
         }
         FilterMap filterMap = new FilterMap(); 
         for (String servletName : servletNames) {
@@ -286,10 +282,10 @@
             EnumSet<DispatcherType> dispatcherTypes, boolean isMatchAfter,
             String... urlPatterns) {
         if (!context.isStarting()) {
-            throw new IllegalStateException(sm.getString("filterRegistration.ise", context.getPath()));
+            throw MESSAGES.cannotAddFilterRegistrationAfterInit(context.getPath());
         }
         if (urlPatterns == null || urlPatterns.length == 0) {
-            throw new IllegalArgumentException(sm.getString("filterRegistration.iae"));
+            throw MESSAGES.invalidFilterRegistrationArguments();
         }
         FilterMap filterMap = new FilterMap(); 
         for (String urlPattern : urlPatterns) {
@@ -350,7 +346,7 @@
 
     public void setAsyncSupported(boolean asyncSupported) {
         if (!context.isStarting()) {
-            throw new IllegalStateException(sm.getString("filterRegistration.ise", context.getPath()));
+            throw MESSAGES.cannotAddFilterRegistrationAfterInit(context.getPath());
         }
         filterDef.setAsyncSupported(asyncSupported);
         context.addFilterDef(filterDef);
@@ -365,10 +361,10 @@
 
     public boolean setInitParameter(String name, String value) {
         if (!context.isStarting()) {
-            throw new IllegalStateException(sm.getString("filterRegistration.ise", context.getPath()));
+            throw MESSAGES.cannotAddFilterRegistrationAfterInit(context.getPath());
         }
         if (name == null || value == null) {
-            throw new IllegalArgumentException(sm.getString("filterRegistration.iae"));
+            throw MESSAGES.invalidFilterRegistrationArguments();
         }
         if (filterDef.getInitParameter(name) != null) {
             return false;
@@ -381,10 +377,10 @@
 
     public Set<String> setInitParameters(Map<String, String> initParameters) {
         if (!context.isStarting()) {
-            throw new IllegalStateException(sm.getString("filterRegistration.ise", context.getPath()));
+            throw MESSAGES.cannotAddFilterRegistrationAfterInit(context.getPath());
         }
         if (initParameters == null) {
-            throw new IllegalArgumentException(sm.getString("filterRegistration.iae"));
+            throw MESSAGES.invalidFilterRegistrationArguments();
         }
         Set<String> conflicts = new HashSet<String>();
         Iterator<String> parameterNames = initParameters.keySet().iterator();
@@ -395,7 +391,7 @@
             } else {
                 String value = initParameters.get(parameterName);
                 if (value == null) {
-                    throw new IllegalArgumentException(sm.getString("filterRegistration.iae"));
+                    throw MESSAGES.invalidFilterRegistrationArguments();
                 }
                 filterDef.addInitParameter(parameterName, value);
             }
@@ -497,7 +493,7 @@
                 try {
                     SecurityUtil.doAsPrivilege("destroy", filter);
                 } catch(java.lang.Exception ex){
-                    context.getLogger().error("ApplicationFilterConfig.doAsPrivilege", ex);
+                    context.getLogger().error(MESSAGES.doAsPrivilegeException(), ex);
                 }
                 SecurityUtil.remove(filter);
             } else {
@@ -506,7 +502,7 @@
             try {
                 ((StandardContext) context).getInstanceManager().destroyInstance(this.filter);
             } catch (Exception e) {
-                context.getLogger().error("ApplicationFilterConfig.preDestroy", e);
+                context.getLogger().error(MESSAGES.preDestroyException(), e);
             }
         }
         this.filter = null;
@@ -545,8 +541,7 @@
             Registry.getRegistry(null, null).registerComponent(this, oname,
                     null);
         } catch (Exception ex) {
-            log.info(sm.getString("applicationFilterConfig.jmxRegsiterFail",
-                    getFilterClass(), getFilterName()), ex);
+            CatalinaLogger.CORE_LOGGER.filterJmxRegistrationFailed(getFilterClass(), getFilterName(), ex);
         }
     }
     
@@ -555,14 +550,8 @@
         if (oname != null) {
             try {
                 Registry.getRegistry(null, null).unregisterComponent(oname);
-                if(log.isDebugEnabled())
-                    log.debug(sm.getString(
-                            "applicationFilterConfig.jmxUnregsiter",
-                            getFilterClass(), getFilterName()));
             } catch(Exception ex) {
-                log.error(sm.getString(
-                        "applicationFilterConfig.jmxUnregsiterFail",
-                        getFilterClass(), getFilterName()), ex);
+                CatalinaLogger.CORE_LOGGER.filterJmxUnregistrationFailed(getFilterClass(), getFilterName(), ex);
             }
         }
 

Modified: trunk/src/main/java/org/apache/catalina/core/ApplicationHttpRequest.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/core/ApplicationHttpRequest.java	2012-09-06 14:06:07 UTC (rev 2079)
+++ trunk/src/main/java/org/apache/catalina/core/ApplicationHttpRequest.java	2012-09-12 16:44:27 UTC (rev 2080)
@@ -40,7 +40,6 @@
 import org.apache.catalina.Session;
 import org.apache.catalina.util.Enumerator;
 import org.apache.catalina.util.RequestUtil;
-import org.apache.catalina.util.StringManager;
 
 
 /**
@@ -80,13 +79,6 @@
         AsyncContext.ASYNC_QUERY_STRING };
 
 
-    /**
-     * The string manager for this package.
-     */
-    protected static StringManager sm =
-        StringManager.getManager(Constants.Package);
-
-
     // ----------------------------------------------------------- Constructors
 
 

Modified: trunk/src/main/java/org/apache/catalina/core/ApplicationHttpResponse.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/core/ApplicationHttpResponse.java	2012-09-06 14:06:07 UTC (rev 2079)
+++ trunk/src/main/java/org/apache/catalina/core/ApplicationHttpResponse.java	2012-09-12 16:44:27 UTC (rev 2080)
@@ -26,9 +26,6 @@
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpServletResponseWrapper;
 
-import org.apache.catalina.util.StringManager;
-
-
 /**
  * Wrapper around a <code>javax.servlet.http.HttpServletResponse</code>
  * that transforms an application response object (which might be the original
@@ -96,13 +93,6 @@
         "org.apache.catalina.core.ApplicationHttpResponse/1.0";
 
 
-    /**
-     * The string manager for this package.
-     */
-    protected static StringManager sm =
-        StringManager.getManager(Constants.Package);
-
-
     // ------------------------------------------------ ServletResponse Methods
 
 

Modified: trunk/src/main/java/org/apache/catalina/core/ApplicationRequest.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/core/ApplicationRequest.java	2012-09-06 14:06:07 UTC (rev 2079)
+++ trunk/src/main/java/org/apache/catalina/core/ApplicationRequest.java	2012-09-12 16:44:27 UTC (rev 2080)
@@ -28,7 +28,6 @@
 import javax.servlet.ServletRequestWrapper;
 
 import org.apache.catalina.util.Enumerator;
-import org.apache.catalina.util.StringManager;
 
 
 /**
@@ -93,13 +92,6 @@
     protected HashMap attributes = new HashMap();
 
 
-    /**
-     * The string manager for this package.
-     */
-    protected static StringManager sm =
-        StringManager.getManager(Constants.Package);
-
-
     // ------------------------------------------------- ServletRequest Methods
 
 

Modified: trunk/src/main/java/org/apache/catalina/core/ApplicationResponse.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/core/ApplicationResponse.java	2012-09-06 14:06:07 UTC (rev 2079)
+++ trunk/src/main/java/org/apache/catalina/core/ApplicationResponse.java	2012-09-12 16:44:27 UTC (rev 2080)
@@ -24,9 +24,7 @@
 import javax.servlet.ServletResponse;
 import javax.servlet.ServletResponseWrapper;
 
-import org.apache.catalina.util.StringManager;
 
-
 /**
  * Wrapper around a <code>javax.servlet.ServletResponse</code>
  * that transforms an application response object (which might be the original
@@ -86,13 +84,6 @@
     protected boolean included = false;
 
 
-    /**
-     * The string manager for this package.
-     */
-    protected static StringManager sm =
-        StringManager.getManager(Constants.Package);
-
-
     // ------------------------------------------------ ServletResponse Methods
 
 

Modified: trunk/src/main/java/org/apache/catalina/core/AprLifecycleListener.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/core/AprLifecycleListener.java	2012-09-06 14:06:07 UTC (rev 2079)
+++ trunk/src/main/java/org/apache/catalina/core/AprLifecycleListener.java	2012-09-12 16:44:27 UTC (rev 2080)
@@ -24,9 +24,8 @@
 import org.apache.catalina.Lifecycle;
 import org.apache.catalina.LifecycleEvent;
 import org.apache.catalina.LifecycleListener;
-import org.apache.catalina.util.StringManager;
 import org.apache.tomcat.jni.Library;
-import org.jboss.logging.Logger;
+import org.jboss.web.CatalinaLogger;
 
 
 
@@ -43,15 +42,6 @@
 public class AprLifecycleListener
     implements LifecycleListener {
 
-    private static Logger log = Logger.getLogger(AprLifecycleListener.class);
-
-    /**
-     * The string manager for this package.
-     */
-    protected StringManager sm =
-        StringManager.getManager(Constants.Package);
-
-
     // ---------------------------------------------- Constants
 
 
@@ -82,10 +72,10 @@
                 try {
                     initializeSSL();
                 } catch (Throwable t) {
-                    if (!log.isDebugEnabled()) {
-                        log.info(sm.getString("aprListener.sslInit"));
+                    if (!CatalinaLogger.CORE_LOGGER.isDebugEnabled()) {
+                        CatalinaLogger.CORE_LOGGER.aprSslEngineInitFailed();
                     } else {
-                        log.debug(sm.getString("aprListener.sslInit"), t);
+                        CatalinaLogger.CORE_LOGGER.aprSslEngineInitFailed(t);
                     }
                 }
             }
@@ -114,47 +104,26 @@
             minor = clazz.getField("TCN_MINOR_VERSION").getInt(null);
             patch = clazz.getField("TCN_PATCH_VERSION").getInt(null);
         } catch (Throwable t) {
-            if (!log.isDebugEnabled()) {
-                log.info(sm.getString("aprListener.aprInit",
-                        System.getProperty("java.library.path")));
+            if (!CatalinaLogger.CORE_LOGGER.isDebugEnabled()) {
+                CatalinaLogger.CORE_LOGGER.aprInitFailed();
             } else {
-                log.debug(sm.getString("aprListener.aprInit",
-                        System.getProperty("java.library.path")), t);
+                CatalinaLogger.CORE_LOGGER.aprInitFailed(t);
             }
             return false;
         }
         if ((major != TCN_REQUIRED_MAJOR)  ||
             (minor != TCN_REQUIRED_MINOR) ||
             (patch <  TCN_REQUIRED_PATCH)) {
-            log.error(sm.getString("aprListener.tcnInvalid", major + "."
-                    + minor + "." + patch,
-                    TCN_REQUIRED_MAJOR + "." +
-                    TCN_REQUIRED_MINOR + "." +
-                    TCN_REQUIRED_PATCH));
+            CatalinaLogger.CORE_LOGGER.aprInvalidVersion(major, minor, patch, 
+                    TCN_REQUIRED_MAJOR, TCN_REQUIRED_MINOR, TCN_REQUIRED_PATCH);
             return false;
         }
         if (patch <  TCN_RECOMMENDED_PV) {
-            if (!log.isDebugEnabled()) {
-                log.info(sm.getString("aprListener.tcnVersion", major + "."
-                        + minor + "." + patch,
-                        TCN_REQUIRED_MAJOR + "." +
-                        TCN_REQUIRED_MINOR + "." +
-                        TCN_RECOMMENDED_PV));
-            } else {
-                log.debug(sm.getString("aprListener.tcnVersion", major + "."
-                        + minor + "." + patch,
-                        TCN_REQUIRED_MAJOR + "." +
-                        TCN_REQUIRED_MINOR + "." +
-                        TCN_RECOMMENDED_PV));
-            }
+            CatalinaLogger.CORE_LOGGER.aprRecommendedVersion(major, minor, patch, 
+                    TCN_REQUIRED_MAJOR, TCN_REQUIRED_MINOR, TCN_RECOMMENDED_PV);
         }
-        if (log.isDebugEnabled()) {
-            log.debug(sm.getString("aprListener.tcnValid", major + "."
-                    + minor + "." + patch));
-            // Log APR flags
-            log.debug(sm.getString("aprListener.flags", Library.APR_HAVE_IPV6, Library.APR_HAS_SENDFILE, 
-                    Library.APR_HAS_RANDOM));
-        }
+        CatalinaLogger.CORE_LOGGER.aprInit(major, minor, patch, Library.APR_HAVE_IPV6, Library.APR_HAS_SENDFILE, 
+                    Library.APR_HAS_RANDOM);
         return true;
     }
 

Modified: trunk/src/main/java/org/apache/catalina/core/ContainerBase.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/core/ContainerBase.java	2012-09-06 14:06:07 UTC (rev 2079)
+++ trunk/src/main/java/org/apache/catalina/core/ContainerBase.java	2012-09-12 16:44:27 UTC (rev 2080)
@@ -19,6 +19,8 @@
 package org.apache.catalina.core;
 
 
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
 import java.beans.PropertyChangeListener;
 import java.beans.PropertyChangeSupport;
 import java.io.IOException;
@@ -55,10 +57,10 @@
 import org.apache.catalina.connector.Request;
 import org.apache.catalina.connector.Response;
 import org.apache.catalina.util.LifecycleSupport;
-import org.apache.catalina.util.StringManager;
 import org.apache.naming.resources.ProxyDirContext;
 import org.apache.tomcat.util.modeler.Registry;
 import org.jboss.logging.Logger;
+import org.jboss.web.CatalinaLogger;
 
 
 /**
@@ -124,9 +126,6 @@
 public abstract class ContainerBase
     implements Container, Lifecycle, Pipeline, MBeanRegistration {
 
-    private static org.jboss.logging.Logger log=
-        org.jboss.logging.Logger.getLogger( ContainerBase.class );
-
     /**
      * Container array type.
      */
@@ -256,13 +255,6 @@
 
 
     /**
-     * The string manager for this package.
-     */
-    protected static StringManager sm =
-        StringManager.getManager(Constants.Package);
-
-
-    /**
      * Has this component been started?
      */
     protected boolean started = false;
@@ -375,7 +367,7 @@
             try {
                 ((Lifecycle) oldLoader).stop();
             } catch (LifecycleException e) {
-                log.error("ContainerBase.setLoader: stop: ", e);
+                CatalinaLogger.CORE_LOGGER.errorStoppingLoader(e);
             }
         }
 
@@ -387,7 +379,7 @@
             try {
                 ((Lifecycle) loader).start();
             } catch (LifecycleException e) {
-                log.error("ContainerBase.setLoader: start: ", e);
+                CatalinaLogger.CORE_LOGGER.errorStartingLoader(e);
             }
         }
 
@@ -447,7 +439,7 @@
             try {
                 ((Lifecycle) oldManager).stop();
             } catch (LifecycleException e) {
-                log.error("ContainerBase.setManager: stop: ", e);
+                CatalinaLogger.CORE_LOGGER.errorStoppingManager(e);
             }
         }
 
@@ -459,7 +451,7 @@
             try {
                 ((Lifecycle) manager).start();
             } catch (LifecycleException e) {
-                log.error("ContainerBase.setManager: start: ", e);
+                CatalinaLogger.CORE_LOGGER.errorStartingManager(e);
             }
         }
 
@@ -511,7 +503,7 @@
             try {
                 ((Lifecycle) oldCluster).stop();
             } catch (LifecycleException e) {
-                log.error("ContainerBase.setCluster: stop: ", e);
+                CatalinaLogger.CORE_LOGGER.errorStoppingCluster(e);
             }
         }
 
@@ -524,7 +516,7 @@
             try {
                 ((Lifecycle) cluster).start();
             } catch (LifecycleException e) {
-                log.error("ContainerBase.setCluster: start: ", e);
+                CatalinaLogger.CORE_LOGGER.errorStartingCluster(e);
             }
         }
 
@@ -700,7 +692,7 @@
             try {
                 ((Lifecycle) oldRealm).stop();
             } catch (LifecycleException e) {
-                log.error("ContainerBase.setRealm: stop: ", e);
+                CatalinaLogger.CORE_LOGGER.errorStoppingRealm(e);
             }
         }
 
@@ -712,7 +704,7 @@
             try {
                 ((Lifecycle) realm).start();
             } catch (LifecycleException e) {
-                log.error("ContainerBase.setRealm: start: ", e);
+                CatalinaLogger.CORE_LOGGER.errorStartingRealm(e);
             }
         }
 
@@ -796,13 +788,10 @@
 
     private synchronized void addChildInternal(Container child) {
 
-        if( log.isDebugEnabled() )
-            log.debug("Add child " + child + " " + this);
-
         if (child.getName() == null)
-            throw new IllegalArgumentException(sm.getString("containerBase.addChild.nullName"));
+            throw MESSAGES.containerChildWithNullName();
         if (children.get(child.getName()) != null)
-            throw new IllegalArgumentException(sm.getString("containerBase.addChild.notUnique", child.getName()));
+            throw MESSAGES.containerChildNameNotUnique(child.getName());
 
         child.setParent(this);  // May throw IAE
         children.put(child.getName(), child);
@@ -814,7 +803,7 @@
                 ((Lifecycle) child).start();
                 success = true;
             } catch (LifecycleException e) {
-                throw new IllegalStateException(sm.getString("containerBase.addChild.start", child.getName()), e);
+                throw MESSAGES.containerChildStartFailed(child.getName(), e);
             } finally {
                 if (!success) {
                     children.remove(child.getName());
@@ -930,7 +919,7 @@
                     ((Lifecycle) child).stop();
                 }
             } catch (LifecycleException e) {
-                log.error("ContainerBase.removeChild: stop: ", e);
+                CatalinaLogger.CORE_LOGGER.errorStoppingChild(e);
             }
         }
         
@@ -1011,8 +1000,7 @@
 
         // Validate and update our current component state
         if (started) {
-            if(log.isInfoEnabled())
-                log.info(sm.getString("containerBase.alreadyStarted", logName()));
+            CatalinaLogger.CORE_LOGGER.containerAlreadyStarted(logName());
             return;
         }
         
@@ -1070,8 +1058,7 @@
 
         // Validate and update our current component state
         if (!started) {
-            if(log.isInfoEnabled())
-                log.info(sm.getString("containerBase.notStarted", logName()));
+            CatalinaLogger.CORE_LOGGER.containerNotStarted(logName());
             return;
         }
 
@@ -1139,16 +1126,17 @@
      */ 
     public void init() throws Exception {
 
-        if( this.getParent() == null ) {
-            // "Life" update
-            ObjectName parentName=getParentName();
+        if (org.apache.tomcat.util.Constants.ENABLE_MODELER) {
+            if( this.getParent() == null ) {
+                // "Life" update
+                ObjectName parentName=getParentName();
 
-            //log.info("Register " + parentName );
-            if( parentName != null && 
-                    mserver.isRegistered(parentName)) 
-            {
-                mserver.invoke(parentName, "addChild", new Object[] { this },
-                        new String[] {"org.apache.catalina.Container"});
+                if( parentName != null && 
+                        mserver.isRegistered(parentName)) 
+                {
+                    mserver.invoke(parentName, "addChild", new Object[] { this },
+                            new String[] {"org.apache.catalina.Container"});
+                }
             }
         }
         initialized=true;
@@ -1169,13 +1157,10 @@
             if ( oname != null ) {
                 try {
                     if( controller == oname ) {
-                        Registry.getRegistry(null, null)
-                        .unregisterComponent(oname);
-                        if(log.isDebugEnabled())
-                            log.debug("unregistering " + oname);
+                        Registry.getRegistry(null, null).unregisterComponent(oname);
                     }
                 } catch( Throwable t ) {
-                    log.error("Error unregistering ", t );
+                    CatalinaLogger.CORE_LOGGER.failedContainerJmxUnregistration(oname, t);
                 }
             }
         }
@@ -1302,28 +1287,28 @@
             try {
                 cluster.backgroundProcess();
             } catch (Exception e) {
-                log.warn(sm.getString("containerBase.backgroundProcess.cluster", cluster), e);                
+                CatalinaLogger.CORE_LOGGER.backgroundProcessingError(cluster, e);
             }
         }
         if (loader != null) {
             try {
                 loader.backgroundProcess();
             } catch (Exception e) {
-                log.warn(sm.getString("containerBase.backgroundProcess.loader", loader), e);                
+                CatalinaLogger.CORE_LOGGER.backgroundProcessingError(loader, e);
             }
         }
         if (manager != null) {
             try {
                 manager.backgroundProcess();
             } catch (Exception e) {
-                log.warn(sm.getString("containerBase.backgroundProcess.manager", manager), e);                
+                CatalinaLogger.CORE_LOGGER.backgroundProcessingError(manager, e);
             }
         }
         if (realm != null) {
             try {
                 realm.backgroundProcess();
             } catch (Exception e) {
-                log.warn(sm.getString("containerBase.backgroundProcess.realm", realm), e);                
+                CatalinaLogger.CORE_LOGGER.backgroundProcessingError(realm, e);
             }
         }
         Valve current = pipeline.getFirst();
@@ -1331,7 +1316,7 @@
             try {
                 current.backgroundProcess();
             } catch (Exception e) {
-                log.warn(sm.getString("containerBase.backgroundProcess.valve", current), e);                
+                CatalinaLogger.CORE_LOGGER.backgroundProcessingError(current, e);
             }
             current = current.getNext();
         }
@@ -1486,8 +1471,6 @@
     public ObjectName createObjectName(String domain, ObjectName parent)
         throws Exception
     {
-        if( log.isDebugEnabled())
-            log.debug("Create ObjectName " + domain + " " + parent );
         return null;
     }
 
@@ -1604,7 +1587,7 @@
                 }
                 container.backgroundProcess();
             } catch (Throwable t) {
-                log.error("Exception invoking periodic operation: ", t);
+                CatalinaLogger.CORE_LOGGER.errorInPeriodicOperation(t);
             } finally {
                 if (container instanceof Context) {
                     ((Context) container).getThreadBindingListener().unbind();

Modified: trunk/src/main/java/org/apache/catalina/core/LocalStrings.properties
===================================================================
--- trunk/src/main/java/org/apache/catalina/core/LocalStrings.properties	2012-09-06 14:06:07 UTC (rev 2079)
+++ trunk/src/main/java/org/apache/catalina/core/LocalStrings.properties	2012-09-12 16:44:27 UTC (rev 2080)
@@ -13,34 +13,14 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-applicationContext.alreadyInitialized=Context {0} is already initialized.
-applicationContext.restricted=Listener that attempted to call this method is restricted.
-applicationContext.attributeEvent=Exception thrown by attributes event listener
-applicationContext.create=Error creating instance
-applicationContext.emptyRole=Invalid empty role specified for context {0}
-applicationContext.mapping.error=Error during mapping
-applicationContext.requestDispatcher.iae=Path {0} does not start with a "/" character
-applicationContext.resourcePaths.iae=Path {0} does not start with a "/" character
-applicationContext.setAttribute.namenull=Name cannot be null
-applicationContext.setSessionTracking.iae=The session tracking mode {0} requested for context {1} is not supported by that context
-applicationContext.setSessionTracking.ssl=The session tracking mode SSL requested for context {1} cannot be combined with other tracking modes
-applicationContext.badListenerClass=Bad listener class {0} for context {1}
-applicationDispatcher.allocateException=Allocate exception for servlet {0}
-applicationDispatcher.deallocateException=Deallocate exception for servlet {0}
-applicationDispatcher.forward.ise=Cannot forward after response has been committed
-applicationDispatcher.forward.throw=Forwarded resource threw an exception
-applicationDispatcher.include.throw=Included resource threw an exception
-applicationDispatcher.isUnavailable=Servlet {0} is currently unavailable
-applicationDispatcher.serviceException=Servlet.service() for servlet {0} threw exception
-applicationDispatcher.specViolation.request=Original SevletRequest or wrapped original ServletRequest not passed to RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1
-applicationDispatcher.specViolation.response=Original SevletResponse or wrapped original ServletResponse not passed to RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1
-applicationFilterConfig.jmxRegisterFail=JMX registration failed for filter of type [{0}] and name [{1}]
-applicationFilterConfig.jmxUnregister=JMX de-registration complete for filter of type [{0}] and name [{1}]
-applicationFilterConfig.jmxUnregisterFail=JMX de-registration failed for filter of type [{0}] and name [{1}]
+filterChain.filter=Filter execution threw an exception
+filterChain.servlet=Servlet execution threw an exception
+
 applicationRequest.badParent=Cannot locate parent Request implementation
 applicationRequest.badRequest=Request is not a javax.servlet.ServletRequestWrapper
 applicationResponse.badParent=Cannot locate parent Response implementation
 applicationResponse.badResponse=Response is not a javax.servlet.ServletResponseWrapper
+
 aprListener.aprInit=The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: {0}
 aprListener.tcnInvalid=An incompatible version {0} of the Apache Tomcat Native library is installed, while Tomcat requires version {1} 
 aprListener.tcnVersion=An older version {0} of the Apache Tomcat Native library is installed, while Tomcat recommends version greater then {1}
@@ -48,6 +28,7 @@
 aprListener.sslInit=Failed to initialize the SSLEngine.
 aprListener.tcnValid=Loaded Apache Tomcat Native library {0}.
 aprListener.flags=APR capabilities: IPv6 [{0}], sendfile [{1}], random [{2}].
+
 containerBase.addDefaultMapper=Exception configuring default mapper of class {0}
 containerBase.alreadyStarted=Container {0} has already been started
 containerBase.notConfigured=No basic Valve has been configured
@@ -61,10 +42,9 @@
 containerBase.addChild.nullName=Child container name cannot be null
 containerBase.addChild.notUnique=Child container with name {0} already exists
 containerBase.addChild.start=Failed to start child container {0}
+
 fastEngineMapper.alreadyStarted=FastEngineMapper {0} has already been started
 fastEngineMapper.notStarted=FastEngineMapper {0} has not yet been started
-filterChain.filter=Filter execution threw an exception
-filterChain.servlet=Servlet execution threw an exception
 httpContextMapper.container=This container is not a StandardContext
 httpEngineMapper.container=This container is not a StandardEngine
 httpHostMapper.container=This container is not a StandardHost

Modified: trunk/src/main/java/org/apache/catalina/core/StandardContext.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/core/StandardContext.java	2012-09-06 14:06:07 UTC (rev 2079)
+++ trunk/src/main/java/org/apache/catalina/core/StandardContext.java	2012-09-12 16:44:27 UTC (rev 2080)
@@ -18,6 +18,8 @@
 
 package org.apache.catalina.core;
 
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
 import java.io.BufferedReader;
 import java.io.File;
 import java.io.FileInputStream;
@@ -36,7 +38,6 @@
 import java.util.Set;
 import java.util.TreeMap;
 
-import javax.management.AttributeNotFoundException;
 import javax.management.ListenerNotFoundException;
 import javax.management.MBeanNotificationInfo;
 import javax.management.MBeanRegistrationException;
@@ -97,7 +98,7 @@
 import org.apache.naming.resources.WARDirContext;
 import org.apache.tomcat.InstanceManager;
 import org.apache.tomcat.util.modeler.Registry;
-import org.jboss.logging.Logger;
+import org.jboss.web.CatalinaLogger;
 
 /**
  * Standard implementation of the <b>Context</b> interface.  Each
@@ -113,7 +114,6 @@
     extends ContainerBase
     implements Context, NotificationEmitter
 {
-    protected static Logger log = Logger.getLogger(StandardContext.class);
 
     // ----------------------------------------------------------- Constructors
 
@@ -1269,32 +1269,23 @@
 
         // Validate the incoming property value
         if (config == null)
-            throw new IllegalArgumentException
-                (sm.getString("standardContext.loginConfig.required"));
+            throw MESSAGES.nullLoginConfig();
         String loginPage = config.getLoginPage();
         if ((loginPage != null) && !loginPage.startsWith("/")) {
             if (isServlet22()) {
-                if(log.isDebugEnabled())
-                    log.debug(sm.getString("standardContext.loginConfig.loginWarning",
-                                 loginPage));
+                CatalinaLogger.CORE_LOGGER.loginPageStartsWithSlash(loginPage);
                 config.setLoginPage("/" + loginPage);
             } else {
-                throw new IllegalArgumentException
-                    (sm.getString("standardContext.loginConfig.loginPage",
-                                  loginPage));
+                throw MESSAGES.loginPageMustStartWithSlash(loginPage);
             }
         }
         String errorPage = config.getErrorPage();
         if ((errorPage != null) && !errorPage.startsWith("/")) {
             if (isServlet22()) {
-                if(log.isDebugEnabled())
-                    log.debug(sm.getString("standardContext.loginConfig.errorWarning",
-                                 errorPage));
+                CatalinaLogger.CORE_LOGGER.errorPageStartsWithSlash(errorPage);
                 config.setErrorPage("/" + errorPage);
             } else {
-                throw new IllegalArgumentException
-                    (sm.getString("standardContext.loginConfig.errorPage",
-                                  errorPage));
+                throw MESSAGES.errorPageMustStartWithSlash(errorPage);
             }
         }
 
@@ -1604,9 +1595,7 @@
         try {
             wrapperClass = Class.forName(wrapperClassName);         
             if (!StandardWrapper.class.isAssignableFrom(wrapperClass)) {
-                throw new IllegalArgumentException(
-                    sm.getString("standardContext.invalidWrapperClass",
-                                 wrapperClassName));
+                throw MESSAGES.invalidWrapperClass(wrapperClassName);
             }
         } catch (ClassNotFoundException cnfe) {
             throw new IllegalArgumentException(cnfe.getMessage());
@@ -1623,8 +1612,7 @@
     public void setResources(DirContext resources) {
 
         if (started) {
-            throw new IllegalStateException
-                (sm.getString("standardContext.resources.started"));
+            throw MESSAGES.cannotSetResourcesAfterStart();
         }
 
         DirContext oldResources = this.webappResources;
@@ -1712,7 +1700,7 @@
                 workDir = new File(catalinaHomePath,
                         getWorkDir());
             } catch (IOException e) {
-                log.warn("Exception obtaining work path for " + getPath());
+                CatalinaLogger.CORE_LOGGER.failedObtainingWorkDirectory(getPath(), e);
             }
         }
         return workDir.getAbsolutePath();
@@ -1763,7 +1751,7 @@
         String results[] = new String[applicationListeners.length + 1];
         for (int i = 0; i < applicationListeners.length; i++) {
             if (listener.equals(applicationListeners[i])) {
-                log.info(sm.getString("standardContext.duplicateListener", listener));
+                CatalinaLogger.CORE_LOGGER.duplicateListener(listener);
                 if (!restricted && restrictedApplicationListeners.contains(listener)) {
                     restrictedApplicationListeners.remove(listener);
                 }
@@ -1799,7 +1787,7 @@
         EventListener results[] = new EventListener[applicationListenerInstances.length + 1];
         for (int i = 0; i < applicationListenerInstances.length; i++) {
             if (listener.equals(applicationListenerInstances[i])) {
-                log.info(sm.getString("standardContext.duplicateListener", listener));
+                CatalinaLogger.CORE_LOGGER.duplicateListener(listener.getClass().getName());
                 return;
             }
             results[i] = applicationListenerInstances[i];
@@ -1847,8 +1835,7 @@
         Wrapper oldJspServlet = null;
 
         if (!(child instanceof Wrapper)) {
-            throw new IllegalArgumentException
-                (sm.getString("standardContext.notWrapper"));
+            throw MESSAGES.contextChildMustBeWrapper();
         }
 
         Wrapper wrapper = (Wrapper) child;
@@ -1865,13 +1852,10 @@
         String jspFile = wrapper.getJspFile();
         if ((jspFile != null) && !jspFile.startsWith("/")) {
             if (isServlet22()) {
-                if(log.isDebugEnabled())
-                    log.debug(sm.getString("standardContext.wrapper.warning", 
-                                       jspFile));
+                CatalinaLogger.CORE_LOGGER.jspFileStartsWithSlash(jspFile);
                 wrapper.setJspFile("/" + jspFile);
             } else {
-                throw new IllegalArgumentException
-                    (sm.getString("standardContext.wrapper.error", jspFile));
+                throw MESSAGES.jspFileMustStartWithSlash(jspFile);
             }
         }
 
@@ -1902,10 +1886,7 @@
             for (int j = 0; j < patterns.length; j++) {
                 patterns[j] = adjustURLPattern(patterns[j]);
                 if (!validateURLPattern(patterns[j]))
-                    throw new IllegalArgumentException
-                        (sm.getString
-                         ("standardContext.securityConstraint.pattern",
-                          patterns[j]));
+                    throw MESSAGES.invalidSecurityConstraintUrlPattern(patterns[j]);
             }
         }
 
@@ -1929,19 +1910,14 @@
     public void addErrorPage(ErrorPage errorPage) {
         // Validate the input parameters
         if (errorPage == null)
-            throw new IllegalArgumentException
-                (sm.getString("standardContext.errorPage.required"));
+            throw MESSAGES.nullErrorPage();
         String location = errorPage.getLocation();
         if ((location != null) && !location.startsWith("/")) {
             if (isServlet22()) {
-                if(log.isDebugEnabled())
-                    log.debug(sm.getString("standardContext.errorPage.warning",
-                                 location));
+                CatalinaLogger.CORE_LOGGER.errorPageStartsWithSlash(location);
                 errorPage.setLocation("/" + location);
             } else {
-                throw new IllegalArgumentException
-                    (sm.getString("standardContext.errorPage.error",
-                                  location));
+                throw MESSAGES.errorPageMustStartWithSlash(location);
             }
         }
 
@@ -2037,14 +2013,12 @@
         String[] servletNames = filterMap.getServletNames();
         String[] urlPatterns = filterMap.getURLPatterns();
         if (findFilterDef(filterName) == null)
-            throw new IllegalArgumentException
-                (sm.getString("standardContext.filterMap.name", filterName));
+            throw MESSAGES.unknownFilterNameInMapping(filterName);
 
         if (!filterMap.getMatchAllServletNames() && 
             !filterMap.getMatchAllUrlPatterns() && 
             (servletNames.length == 0) && (urlPatterns.length == 0))
-            throw new IllegalArgumentException
-                (sm.getString("standardContext.filterMap.either"));
+            throw MESSAGES.missingFilterMapping();
         // FIXME: Older spec revisions may still check this
         /*
         if ((servletNames.length != 0) && (urlPatterns.length != 0))
@@ -2053,9 +2027,7 @@
         */
         for (int i = 0; i < urlPatterns.length; i++) {
             if (!validateURLPattern(urlPatterns[i])) {
-                throw new IllegalArgumentException
-                    (sm.getString("standardContext.filterMap.pattern",
-                            urlPatterns[i]));
+                throw MESSAGES.invalidFilterMappingUrlPattern(urlPatterns[i]);
             }
         }
     }
@@ -2095,8 +2067,7 @@
         if( findChild(servletName) != null) {
             addServletMapping(pattern, servletName, true);
         } else {
-            if(log.isDebugEnabled())
-                log.debug("Skiping " + pattern + " , no servlet " + servletName);
+            CatalinaLogger.CORE_LOGGER.missingJspServlet();
         }
     }
 
@@ -2180,11 +2151,9 @@
     public void addParameter(String name, String value) {
         // Validate the proposed context initialization parameter
         if ((name == null) || (value == null))
-            throw new IllegalArgumentException
-                (sm.getString("standardContext.parameter.required"));
+            throw MESSAGES.missingParameterNameOrValue();
         if (parameters.get(name) != null)
-            throw new IllegalArgumentException
-                (sm.getString("standardContext.parameter.duplicate", name));
+            throw MESSAGES.duplicateContextParameters(name);
 
         // Add this parameter to our defined set
         parameters.put(name, value);
@@ -2252,12 +2221,10 @@
         // Validate the proposed mapping
         Wrapper wrapper = (Wrapper) findChild(name);
         if (findChild(name) == null)
-            throw new IllegalArgumentException
-                (sm.getString("standardContext.servletMap.name", name));
+            throw MESSAGES.unknownServletNameInMapping(name);
         pattern = adjustURLPattern(RequestUtil.URLDecode(pattern));
         if (!validateURLPattern(pattern))
-            throw new IllegalArgumentException
-                (sm.getString("standardContext.servletMap.pattern", pattern));
+            throw MESSAGES.invalidServletMappingUrlPattern(pattern);
 
         // Add this mapping to our registered set
         String name2 = (String) servletMappings.get(pattern);
@@ -2363,7 +2330,7 @@
             try {
                 wrapper = (Wrapper) wrapperClass.newInstance();
             } catch (Throwable t) {
-                throw new IllegalStateException(sm.getString("standardContext.createWrapper.failed"), t);
+                throw MESSAGES.errorCreatingWrapper(t);
             }
         } else {
             wrapper = new StandardWrapper();
@@ -2376,7 +2343,7 @@
                     (InstanceListener) clazz.newInstance();
                 wrapper.addInstanceListener(listener);
             } catch (Throwable t) {
-                throw new IllegalStateException(sm.getString("standardContext.createWrapper.failed"), t);
+                throw MESSAGES.errorCreatingWrapper(t);
             }
         }
 
@@ -2388,7 +2355,7 @@
                 if (wrapper instanceof Lifecycle)
                     ((Lifecycle) wrapper).addLifecycleListener(listener);
             } catch (Throwable t) {
-                throw new IllegalStateException(sm.getString("standardContext.createWrapper.failed"), t);
+                throw MESSAGES.errorCreatingWrapper(t);
             }
         }
 
@@ -2399,7 +2366,7 @@
                     (ContainerListener) clazz.newInstance();
                 wrapper.addContainerListener(listener);
             } catch (Throwable t) {
-                throw new IllegalStateException(sm.getString("standardContext.createWrapper.failed"), t);
+                throw MESSAGES.errorCreatingWrapper(t);
             }
         }
 
@@ -2751,29 +2718,21 @@
 
         // Validate our current component state
         if (!started)
-            throw new IllegalStateException
-                (sm.getString("containerBase.notStarted", logName()));
+            return;
 
-        // Make sure reloading is enabled
-        //      if (!reloadable)
-        //          throw new IllegalStateException
-        //              (sm.getString("standardContext.notReloadable"));
-        if(log.isInfoEnabled())
-            log.info(sm.getString("standardContext.reloadingStarted"));
-
         // Stop accepting requests temporarily
         setPaused(true);
 
         try {
             stop();
         } catch (LifecycleException e) {
-            log.error(sm.getString("standardContext.stoppingContext"), e);
+            CatalinaLogger.CORE_LOGGER.errorStoppingContext(getName(), e);
         }
 
         try {
             start();
         } catch (LifecycleException e) {
-            log.error(sm.getString("standardContext.startingContext"), e);
+            CatalinaLogger.CORE_LOGGER.errorStartingContext(getName(), e);
         }
 
         setPaused(false);
@@ -2864,8 +2823,7 @@
     public void removeChild(Container child) {
 
         if (!(child instanceof Wrapper)) {
-            throw new IllegalArgumentException
-                (sm.getString("standardContext.notWrapper"));
+            throw MESSAGES.contextChildMustBeWrapper();
         }
 
         super.removeChild(child);
@@ -3241,8 +3199,6 @@
      */
     protected boolean filterStart() {
 
-        if (getLogger().isDebugEnabled())
-            getLogger().debug("Starting filters");
         // Instantiate and record a FilterConfig for each defined filter
         boolean ok = true;
         Iterator<ApplicationFilterConfig> filterConfigsIterator = 
@@ -3252,25 +3208,23 @@
             try {
                 filterConfig.getFilter();
             } catch (Throwable t) {
-                getLogger().error
-                (sm.getString("standardContext.filterStart", name), t);
+                getLogger().error(MESSAGES.errorStartingFilter(filterConfig.getFilterName()), t);
                 ok = false;
             }
         }
         Iterator<String> names = filterDefs.keySet().iterator();
         while (names.hasNext()) {
             String name = names.next();
+            CatalinaLogger.CORE_LOGGER.startingFilter(name);
             if (getLogger().isDebugEnabled())
                 getLogger().debug(" Starting filter '" + name + "'");
             ApplicationFilterConfig filterConfig = null;
             try {
-                filterConfig = new ApplicationFilterConfig
-                (this, (FilterDef) filterDefs.get(name));
+                filterConfig = new ApplicationFilterConfig(this, (FilterDef) filterDefs.get(name));
                 filterConfig.getFilter();
                 filterConfigs.put(name, filterConfig);
             } catch (Throwable t) {
-                getLogger().error
-                (sm.getString("standardContext.filterStart", name), t);
+                getLogger().error(MESSAGES.errorStartingFilter(name), t);
                 ok = false;
             }
         }
@@ -3287,15 +3241,11 @@
      */
     protected boolean filterStop() {
 
-        if (getLogger().isDebugEnabled())
-            getLogger().debug("Stopping filters");
-
         // Release all Filter and FilterConfig instances
         Iterator<String> names = filterConfigs.keySet().iterator();
         while (names.hasNext()) {
             String name = names.next();
-            if (getLogger().isDebugEnabled())
-                getLogger().debug(" Stopping filter '" + name + "'");
+            CatalinaLogger.CORE_LOGGER.stoppingFilter(name);
             ApplicationFilterConfig filterConfig =
                 (ApplicationFilterConfig) filterConfigs.get(name);
             filterConfig.release();
@@ -3326,24 +3276,16 @@
      */
     public boolean contextListenerStart() {
 
-        if (log.isDebugEnabled())
-            log.debug("Configuring application event listeners");
-
         // Instantiate the required listeners
         String listeners[] = findApplicationListeners();
         EventListener listenerInstances[] = applicationListenerInstances;
         EventListener results[] = new EventListener[listeners.length + listenerInstances.length];
         boolean ok = true;
         for (int i = 0; i < listeners.length; i++) {
-            if (getLogger().isDebugEnabled())
-                getLogger().debug(" Configuring event listener class '" +
-                    listeners[i] + "'");
             try {
                 results[i] = (EventListener) instanceManager.newInstance(listeners[i]);
             } catch (Throwable t) {
-                getLogger().error
-                    (sm.getString("standardContext.applicationListener",
-                                  listeners[i]), t);
+                getLogger().error(MESSAGES.errorInstatiatingApplicationListener(listeners[i]), t);
                 ok = false;
             }
         }
@@ -3352,7 +3294,7 @@
         }
         applicationListenerInstances = new EventListener[0];
         if (!ok) {
-            getLogger().error(sm.getString("standardContext.applicationSkipped"));
+            getLogger().error(MESSAGES.skippingApplicationListener());
             return (false);
         }
 
@@ -3371,9 +3313,6 @@
 
         // Send application start events
 
-        if (getLogger().isDebugEnabled())
-            getLogger().debug("Sending application start events");
-
         Object instances[] = getApplicationLifecycleListeners();
         if (instances == null || instances.length == 0)
             return (ok);
@@ -3394,8 +3333,7 @@
             } catch (Throwable t) {
                 fireContainerEvent("afterContextInitialized", listener);
                 getLogger().error
-                    (sm.getString("standardContext.listenerStart",
-                                  instances[i].getClass().getName()), t);
+                    (MESSAGES.errorSendingContextInitializedEvent(instances[i].getClass().getName()), t);
                 ok = false;
             } finally {
                 context.setRestricted(false);
@@ -3413,9 +3351,6 @@
      */
     public boolean listenerStart() {
 
-        if (log.isDebugEnabled())
-            log.debug("Configuring application event listeners");
-
         // Instantiate the required listeners
         Object listeners[] = listenersInstances;
         EventListener listenerInstances[] = applicationListenerInstances;
@@ -3425,9 +3360,7 @@
             try {
                 results[i] = (EventListener) listeners[i];
             } catch (Throwable t) {
-                getLogger().error
-                    (sm.getString("standardContext.applicationListener",
-                                  listeners[i]), t);
+                getLogger().error(MESSAGES.errorInstatiatingApplicationListener(listeners[i].getClass().getName()), t);
                 ok = false;
             }
         }
@@ -3435,7 +3368,7 @@
             results[i + listeners.length] = listenerInstances[i];
         }
         if (!ok) {
-            getLogger().error(sm.getString("standardContext.applicationSkipped"));
+            getLogger().error(MESSAGES.skippingApplicationListener());
             return (false);
         }
         this.listenersInstances = results;
@@ -3470,9 +3403,6 @@
      */
     public boolean listenerStop() {
 
-        if (log.isDebugEnabled())
-            log.debug("Sending application stop events");
-
         boolean ok = true;
         Object listeners[] = getApplicationLifecycleListeners();
         if (listeners != null && (listeners.length > 0)) {
@@ -3491,8 +3421,7 @@
                     } catch (Throwable t) {
                         fireContainerEvent("afterContextDestroyed", listener);
                         getLogger().error
-                            (sm.getString("standardContext.listenerStop",
-                                listeners[i].getClass().getName()), t);
+                            (MESSAGES.errorSendingContextDestroyedEvent(listeners[i].getClass().getName()), t);
                         ok = false;
                     }
                 }
@@ -3509,8 +3438,7 @@
                     getInstanceManager().destroyInstance(listeners[i]);
                 } catch (Throwable t) {
                     getLogger().error
-                        (sm.getString("standardContext.listenerStop",
-                            listeners[i].getClass().getName()), t);
+                        (MESSAGES.errorDestroyingApplicationListener(listeners[i].getClass().getName()), t);
                     ok = false;
                 }
             }
@@ -3572,7 +3500,7 @@
             }
             this.resources = proxyDirContext;
         } catch (Throwable t) {
-            log.error(sm.getString("standardContext.resourcesStart"), t);
+            CatalinaLogger.CORE_LOGGER.errorStartingResources(t);
             ok = false;
         }
 
@@ -3611,7 +3539,7 @@
                 }
             }
         } catch (Throwable t) {
-            log.error(sm.getString("standardContext.resourcesStop"), t);
+            CatalinaLogger.CORE_LOGGER.errorStoppingResources(t);
             ok = false;
         }
 
@@ -3654,8 +3582,7 @@
                 try {
                     wrapper.load();
                 } catch (ServletException e) {
-                    getLogger().error(sm.getString("standardWrapper.loadException",
-                                      getName()), StandardWrapper.getRootCause(e));
+                    getLogger().error(MESSAGES.errorLoadingServlet(wrapper.getName()), StandardWrapper.getRootCause(e));
                     // NOTE: load errors (including a servlet that throws
                     // UnavailableException from tht init() method) are NOT
                     // fatal to application startup
@@ -3673,17 +3600,16 @@
      */
     public synchronized void start() throws LifecycleException {
         if (started) {
+            CatalinaLogger.CORE_LOGGER.containerAlreadyStarted(logName());
             return;
         }
         if( !initialized ) { 
             try {
                 init();
             } catch( Exception ex ) {
-                throw new LifecycleException("Error initializaing ", ex);
+                throw new LifecycleException(MESSAGES.errorInitializingContext(), ex);
             }
         }
-        if(log.isDebugEnabled())
-            log.debug("Starting " + ("".equals(getName()) ? "ROOT" : getName()));
 
         if (org.apache.tomcat.util.Constants.ENABLE_MODELER) {
             // Set JMX object name for proper pipeline registration
@@ -3707,21 +3633,18 @@
 
         // Add missing components as necessary
         if (webappResources == null) {   // (1) Required by Loader
-            if (log.isDebugEnabled())
-                log.debug("Configuring default Resources");
             try {
                 if ((docBase != null) && (docBase.endsWith(".war")) && (!(new File(getBasePath())).isDirectory()))
                     setResources(new WARDirContext());
                 else
                     setResources(new FileDirContext());
             } catch (IllegalArgumentException e) {
-                log.error("Error initializing resources: " + e.getMessage());
+                CatalinaLogger.CORE_LOGGER.errorInitializingResources(e);
                 ok = false;
             }
         }
         if (ok) {
             if (!resourcesStart()) {
-                log.error( "Error in resourceStart()");
                 ok = false;
             }
         }
@@ -3732,10 +3655,6 @@
         // Post work directory
         postWorkDirectory();
 
-        // Standard container startup
-        if (log.isDebugEnabled())
-            log.debug("Processing standard container startup");
-
         // Binding thread
         ClassLoader oldCCL = bindThread();
 
@@ -3820,7 +3739,7 @@
         } catch (Throwable t) {
             // This can happen in rare cases with custom components
             ok = false;
-            log.error(sm.getString("standardContext.startFailed", getName()), t);
+            CatalinaLogger.CORE_LOGGER.errorStartingContext(getName(), t);
         } finally {
             // Unbinding thread
             unbindThread(oldCCL);
@@ -3848,7 +3767,6 @@
             // Configure and call application event listeners
             if (ok) {
                 if (!contextListenerStart()) {
-                    log.error( "Error listenerStart");
                     ok = false;
                 }
             }
@@ -3863,7 +3781,6 @@
             // Configure and call application filters
             if (ok) {
                 if (!filterStart()) {
-                    log.error( "Error filterStart");
                     ok = false;
                 }
             }
@@ -3875,7 +3792,6 @@
             
             if (ok) {
                 if (!listenerStart()) {
-                    log.error( "Error listenerStart");
                     ok = false;
                 }
             }
@@ -3897,7 +3813,7 @@
         } catch (Throwable t) {
             // This can happen in rare cases with custom components
             ok = false;
-            log.error(sm.getString("standardContext.startFailed", getName()), t);
+            CatalinaLogger.CORE_LOGGER.errorStartingContext(getName(), t);
         } finally {
             // Unbinding thread
             unbindThread(oldCCL);
@@ -3908,15 +3824,13 @@
 
         // Set available status depending upon startup success
         if (ok) {
-            if (log.isDebugEnabled())
-                log.debug("Starting completed");
             setAvailable(true);
         } else {
-            log.error(sm.getString("standardContext.startFailed", getName()));
+            CatalinaLogger.CORE_LOGGER.errorStartingContextWillStop(getName());
             try {
                 stop();
             } catch (Throwable t) {
-                log.error(sm.getString("standardContext.startCleanup"), t);
+                CatalinaLogger.CORE_LOGGER.errorStartingContextCleanup(getName(), t);
             }
             setAvailable(false);
         }
@@ -3954,8 +3868,7 @@
 
         // Validate and update our current component state
         if (!started) {
-            if(log.isInfoEnabled())
-                log.info(sm.getString("containerBase.notStarted", logName()));
+            CatalinaLogger.CORE_LOGGER.containerNotStarted(logName());
             return;
         }
 
@@ -4001,9 +3914,6 @@
             // Finalize our character set mapper
             setCharsetMapper(null);
 
-            // Normal container shutdown processing
-            if (log.isDebugEnabled())
-                log.debug("Processing standard container shutdown");
             // Notify our interested LifecycleListeners
             lifecycle.fireLifecycleEvent(STOP_EVENT, null);
             started = false;
@@ -4058,15 +3968,12 @@
         try {
             resetContext();
         } catch( Exception ex ) {
-            log.error( "Error reseting context " + this + " " + ex, ex );
+            CatalinaLogger.CORE_LOGGER.errorResettingContext(getName(), ex);
         }
         
         // Notify our interested LifecycleListeners
         lifecycle.fireLifecycleEvent(AFTER_STOP_EVENT, null);
 
-        if (log.isDebugEnabled())
-            log.debug("Stopping complete");
-
     }
 
     /** Destroy needs to clean up the context completely.
@@ -4114,9 +4021,6 @@
         instanceManager = null;
         
         authenticator = null;
-        
-        if(log.isDebugEnabled())
-            log.debug("resetContext " + oname);
     }
 
     /**
@@ -4156,9 +4060,7 @@
             return (urlPattern);
         if (!isServlet22())
             return (urlPattern);
-        if(log.isDebugEnabled())
-            log.debug(sm.getString("standardContext.urlPattern.patternWarning",
-                         urlPattern));
+        CatalinaLogger.CORE_LOGGER.urlPatternStartsWithSlash(urlPattern);
         return ("/" + urlPattern);
 
     }
@@ -4532,12 +4434,10 @@
      * See Bugzilla 34805, 43079 & 43080
      */
     protected void checkUnusualURLPattern(String urlPattern) {
-        if (log.isInfoEnabled()) {
+        if (CatalinaLogger.CORE_LOGGER.isInfoEnabled()) {
             if(urlPattern.endsWith("*") && (urlPattern.length() < 2 ||
                     urlPattern.charAt(urlPattern.length()-2) != '/')) {
-                log.info("Suspicious url pattern: \"" + urlPattern + "\"" +
-                        " in context [" + getName() + "] - see" +
-                " section SRV.11.2 of the Servlet specification" );
+                CatalinaLogger.CORE_LOGGER.suspiciousUrlPattern(getName(), urlPattern);
             }
         }
     }
@@ -4625,8 +4525,6 @@
                 getJ2EEServer();
 
         onameStr="j2eeType=WebModule,name=" + name + suffix;
-        if( log.isDebugEnabled())
-            log.debug("Registering " + onameStr + " for " + oname);
         
         // default case - no domain explictely set.
         if( getDomain() == null ) domain=hst.getDomain();
@@ -4644,17 +4542,12 @@
                 controller = oname;
             }
         } catch(Exception ex) {
-            if(log.isInfoEnabled())
-                log.info("Error registering ctx with jmx " + this + " " +
-                     oname + " " + ex.toString(), ex );
+            CatalinaLogger.CORE_LOGGER.contextObjectNameCreationFailed(getName(), ex);
         }
     }
 
     protected void registerJMX() {
         try {
-            if (log.isDebugEnabled()) {
-                log.debug("Checking for " + oname );
-            }
             if(! Registry.getRegistry(null, null)
                 .getMBeanServer().isRegistered(oname)) {
                 controller = oname;
@@ -4675,9 +4568,7 @@
                 ((StandardWrapper)children[i]).registerJMX( this );
             }
         } catch (Exception ex) {
-            if(log.isInfoEnabled())
-                log.info("Error registering wrapper with jmx " + this + " " +
-                    oname + " " + ex.toString(), ex );
+            CatalinaLogger.CORE_LOGGER.contextJmxRegistrationFailed(getName(), ex);
         }
     }
 
@@ -4708,7 +4599,7 @@
             try {
                 stop();
             } catch( Exception ex ) {
-                log.error( "error stopping ", ex);
+                CatalinaLogger.CORE_LOGGER.errorStoppingContext(getName(), ex);
             }
         }
     }
@@ -4740,11 +4631,12 @@
         // "Life" update
         String path=oname.getKeyProperty("name");
         if( path == null ) {
-            log.error( "No name attribute " +name );
+            CatalinaLogger.CORE_LOGGER.cannotFindContextJmxParentName(getName());
             return null;
         }
         if( ! path.startsWith( "//")) {
-            log.error("Invalid name " + name);
+            CatalinaLogger.CORE_LOGGER.cannotFindContextJmxParentName(getName());
+            return null;
         }
         path=path.substring(2);
         int delim=path.indexOf( "/" );
@@ -4758,8 +4650,6 @@
                 this.setName(path);
             }
         } else {
-            if(log.isDebugEnabled())
-                log.debug("Setting path " +  path );
             this.setName( path );
         }
         // XXX The service and domain should be the same.

Modified: trunk/src/main/java/org/apache/catalina/core/StandardEngine.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/core/StandardEngine.java	2012-09-06 14:06:07 UTC (rev 2079)
+++ trunk/src/main/java/org/apache/catalina/core/StandardEngine.java	2012-09-12 16:44:27 UTC (rev 2080)
@@ -19,8 +19,8 @@
 package org.apache.catalina.core;
 
 
-import java.io.File;
-import java.util.List;
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
 import java.util.Locale;
 
 import javax.management.MBeanServer;
@@ -33,8 +33,7 @@
 import org.apache.catalina.LifecycleException;
 import org.apache.catalina.Service;
 import org.apache.tomcat.util.modeler.Registry;
-import org.apache.tomcat.util.modeler.modules.MbeansSource;
-import org.jboss.logging.Logger;
+import org.jboss.web.CatalinaLogger;
 
 /**
  * Standard implementation of the <b>Engine</b> interface.  Each
@@ -50,8 +49,6 @@
     extends ContainerBase
     implements Engine {
 
-    private static Logger log = Logger.getLogger(StandardEngine.class);
-
     // ----------------------------------------------------------- Constructors
 
 
@@ -101,20 +98,6 @@
      */
     private String baseDir = null;
 
-    /** Optional mbeans config file. This will replace the "hacks" in
-     * jk and ServerListener. The mbeans file will support (transparent) 
-     * persistence - soon. It'll probably replace jk2.properties and could
-     * replace server.xml. Of course - the same beans could be loaded and 
-     * managed by an external entity - like the embedding app - which
-     *  can use a different persistence mechanism.
-     */ 
-    private String mbeansFile = null;
-    
-    /** Mbeans loaded by the engine.  
-     */ 
-    private List mbeans;
-    
-
     /**
      * The JVM Route ID for this Tomcat instance. All Route ID's must be unique
      * across the cluster.
@@ -204,14 +187,6 @@
         this.service = service;
     }
 
-    public String getMbeansFile() {
-        return mbeansFile;
-    }
-
-    public void setMbeansFile(String mbeansFile) {
-        this.mbeansFile = mbeansFile;
-    }
-
     public String getBaseDir() {
         if( baseDir==null ) {
             baseDir=System.getProperty("catalina.base");
@@ -238,8 +213,7 @@
     public void addChild(Container child) {
 
         if (!(child instanceof Host))
-            throw new IllegalArgumentException
-                (sm.getString("standardEngine.notHost"));
+            throw MESSAGES.engineChildMustBeHost();
         super.addChild(child);
 
     }
@@ -264,8 +238,7 @@
      */
     public void setParent(Container container) {
 
-        throw new IllegalArgumentException
-            (sm.getString("standardEngine.notParent"));
+        throw MESSAGES.engineHasNoParent();
 
     }
 
@@ -283,54 +256,16 @@
                     if (domain==null) {
                         domain=getName();
                     }
-                    if(log.isDebugEnabled())
-                        log.debug( "Register " + domain );
                     oname=new ObjectName(domain + ":type=Engine");
                     controller=oname;
                     Registry.getRegistry(null, null)
                     .registerComponent(this, oname, null);
                 } catch( Throwable t ) {
-                    log.info("Error registering ", t );
+                    CatalinaLogger.CORE_LOGGER.failedEngineJmxRegistration(oname, t);
                 }
             }
-
-            if( mbeansFile == null ) {
-                String defaultMBeansFile=getBaseDir() + "/conf/tomcat5-mbeans.xml";
-                File f=new File( defaultMBeansFile );
-                if( f.exists() ) mbeansFile=f.getAbsolutePath();
-            }
-            if( mbeansFile != null ) {
-                readEngineMbeans();
-            }
-            if( mbeans != null ) {
-                try {
-                    Registry.getRegistry(null, null).invoke(mbeans, "init", false);
-                } catch (Exception e) {
-                    log.error("Error in init() for " + mbeansFile, e);
-                }
-            }
         }
         
-        // not needed since the following if statement does the same thing the right way
-        // remove later after checking
-        //if( service==null ) {
-        //    try {
-        //        ObjectName serviceName=getParentName();        
-        //        if( mserver.isRegistered( serviceName )) {
-        //            log.info("Registering with the service ");
-        //            try {
-        //                mserver.invoke( serviceName, "setContainer",
-        //                        new Object[] { this },
-        //                        new String[] { "org.apache.catalina.Container" } );
-        //            } catch( Exception ex ) {
-        //               ex.printStackTrace();
-        //            }
-        //        }
-        //    } catch( Exception ex ) {
-        //        log.error("Error registering with service ");
-        //    }
-        //}
-        
         if( service==null ) {
             // for consistency...: we are probably in embeded mode
             try {
@@ -338,7 +273,7 @@
                 service.setContainer( this );
                 service.initialize();
             } catch( Throwable t ) {
-                log.error(t);
+                CatalinaLogger.CORE_LOGGER.failedServiceCreation(t);
             }
         }
         
@@ -353,26 +288,15 @@
         ((StandardService)service).destroy();
 
         if (org.apache.tomcat.util.Constants.ENABLE_MODELER) {
-            if( mbeans != null ) {
+            if ( oname != null ) {
                 try {
-                    Registry.getRegistry(null, null)
-                    .invoke(mbeans, "destroy", false);
-                } catch (Exception e) {
-                    log.error(sm.getString("standardEngine.unregister.mbeans.failed" ,mbeansFile), e);
-                }
-            }
-            // 
-            if( mbeans != null ) {
-                try {
-                    for( int i=0; i<mbeans.size() ; i++ ) {
-                        Registry.getRegistry(null, null)
-                        .unregisterComponent((ObjectName)mbeans.get(i));
+                    if( controller == oname ) {
+                        Registry.getRegistry(null, null).unregisterComponent(oname);
                     }
-                } catch (Exception e) {
-                    log.error(sm.getString("standardEngine.unregister.mbeans.failed", mbeansFile), e);
+                } catch( Throwable t ) {
+                    CatalinaLogger.CORE_LOGGER.failedContainerJmxUnregistration(oname, t);
                 }
             }
-
             // force all metadata to be reloaded.
             // That doesn't affect existing beans. We should make it per
             // registry - and stop using the static.
@@ -393,53 +317,11 @@
             init();
         }
 
-        if (org.apache.tomcat.util.Constants.ENABLE_MODELER) {
-            // Look for a realm - that may have been configured earlier. 
-            // If the realm is added after context - it'll set itself.
-            if( realm == null ) {
-                ObjectName realmName=null;
-                try {
-                    realmName=new ObjectName( domain + ":type=Realm");
-                    if( mserver.isRegistered(realmName ) ) {
-                        mserver.invoke(realmName, "init", 
-                                new Object[] {},
-                                new String[] {}
-                        );            
-                    }
-                } catch( Throwable t ) {
-                    log.debug("No realm for this engine " + realmName);
-                }
-            }
-
-            if( mbeans != null ) {
-                try {
-                    Registry.getRegistry(null, null)
-                    .invoke(mbeans, "start", false);
-                } catch (Exception e) {
-                    log.error("Error in start() for " + mbeansFile, e);
-                }
-            }
-        }
-
         // Standard container startup
         super.start();
 
     }
     
-    public void stop() throws LifecycleException {
-        super.stop();
-        if (org.apache.tomcat.util.Constants.ENABLE_MODELER) {
-            if( mbeans != null ) {
-                try {
-                    Registry.getRegistry(null, null).invoke(mbeans, "stop", false);
-                } catch (Exception e) {
-                    log.error("Error in stop() for " + mbeansFile, e);
-                }
-            }
-        }
-    }
-
-
     /**
      * Return a String representation of this component.
      */
@@ -482,31 +364,9 @@
     public ObjectName createObjectName(String domain, ObjectName parent)
         throws Exception
     {
-        if( log.isDebugEnabled())
-            log.debug("Create ObjectName " + domain + " " + parent );
         return new ObjectName( domain + ":type=Engine");
     }
 
-    
-    private void readEngineMbeans() {
-        try {
-            MbeansSource mbeansMB=new MbeansSource();
-            File mbeansF=new File( mbeansFile );
-            mbeansMB.setSource(mbeansF);
-            
-            Registry.getRegistry(null, null).registerComponent
-                (mbeansMB, domain + ":type=MbeansFile", null);
-            mbeansMB.load();
-            mbeansMB.init();
-            mbeansMB.setRegistry(Registry.getRegistry(null, null));
-            mbeans=mbeansMB.getMBeans();
-            
-        } catch( Throwable t ) {
-            log.error( "Error loading " + mbeansFile, t );
-        }
-        
-    }
-    
     public String getDomain() {
         if (domain!=null) {
             return domain;

Modified: trunk/src/main/java/org/apache/catalina/core/StandardHost.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/core/StandardHost.java	2012-09-06 14:06:07 UTC (rev 2079)
+++ trunk/src/main/java/org/apache/catalina/core/StandardHost.java	2012-09-12 16:44:27 UTC (rev 2080)
@@ -19,6 +19,8 @@
 package org.apache.catalina.core;
 
 
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
 import java.util.Locale;
 
 import javax.management.MBeanServer;
@@ -32,6 +34,7 @@
 import org.apache.catalina.startup.HostConfig;
 import org.apache.catalina.valves.ValveBase;
 import org.apache.tomcat.util.modeler.Registry;
+import org.jboss.web.CatalinaLogger;
 
 
 /**
@@ -48,10 +51,6 @@
     extends ContainerBase
     implements Host  
  {
-    /* Why do we implement deployer and delegate to deployer ??? */
-
-    private static org.jboss.logging.Logger log=
-        org.jboss.logging.Logger.getLogger( StandardHost.class );
     
     // ----------------------------------------------------------- Constructors
 
@@ -280,8 +279,7 @@
     public void setName(String name) {
 
         if (name == null)
-            throw new IllegalArgumentException
-                (sm.getString("standardHost.nullName"));
+            throw MESSAGES.hostNameIsNull();
 
         name = name.toLowerCase(Locale.ENGLISH);      // Internally all names are lower case
 
@@ -351,8 +349,7 @@
     public void addChild(Container child) {
 
         if (!(child instanceof Context))
-            throw new IllegalArgumentException
-                (sm.getString("standardHost.notContext"));
+            throw MESSAGES.hostChildMustBeContext();
         super.addChild(child);
 
     }
@@ -447,23 +444,6 @@
         if( ! initialized )
             init();
 
-        // Look for a realm - that may have been configured earlier. 
-        // If the realm is added after context - it'll set itself.
-        if( realm == null ) {
-            ObjectName realmName=null;
-            try {
-                realmName=new ObjectName( domain + ":type=Realm,host=" + getName());
-                if( mserver.isRegistered(realmName ) ) {
-                    mserver.invoke(realmName, "init", 
-                            new Object[] {},
-                            new String[] {}
-                    );            
-                }
-            } catch( Throwable t ) {
-                log.debug("No realm for this host " + realmName);
-            }
-        }
-            
         // Set error report valve
         if ((errorReportValveClass != null)
             && (!errorReportValveClass.equals(""))) {
@@ -483,9 +463,7 @@
                         errorReportValveObjectName = ((ValveBase)valve).getObjectName() ;
                     }
             } catch (Throwable t) {
-                log.error(sm.getString
-                    ("standardHost.invalidErrorReportValveClass", 
-                     errorReportValveClass), t);
+                CatalinaLogger.CORE_LOGGER.invalidErrorReportValveClass(errorReportValveClass, t);
             }
         }
 
@@ -525,42 +503,31 @@
         if( initialized ) return;
         initialized=true;
         
-        // already registered.
-        if( getParent() == null ) {
-            try {
-                // Register with the Engine
-                ObjectName serviceName=new ObjectName(domain + 
-                                        ":type=Engine");
-
-                HostConfig deployer = new HostConfig();
-                addLifecycleListener(deployer);                
-                if( mserver.isRegistered( serviceName )) {
-                    if(log.isDebugEnabled())
-                        log.debug("Registering "+ serviceName +" with the Engine");
-                    mserver.invoke( serviceName, "addChild",
-                            new Object[] { this },
-                            new String[] { "org.apache.catalina.Container" } );
-                }
-            } catch( Exception ex ) {
-                log.error("Host registering failed!",ex);
-            }
-        }
-        
         if (org.apache.tomcat.util.Constants.ENABLE_MODELER) {
             if( oname==null ) {
                 // not registered in JMX yet - standalone mode
                 try {
                     StandardEngine engine=(StandardEngine)parent;
                     domain=engine.getName();
-                    if(log.isDebugEnabled())
-                        log.debug( "Register host " + getName() + " with domain "+ domain );
                     oname=new ObjectName(domain + ":type=Host,host=" +
                             this.getName());
                     controller = oname;
-                    Registry.getRegistry(null, null)
-                    .registerComponent(this, oname, null);
+                    if( getParent() == null ) {
+                        // Register with the Engine
+                        ObjectName serviceName=new ObjectName(domain + 
+                                ":type=Engine");
+
+                        HostConfig deployer = new HostConfig();
+                        addLifecycleListener(deployer);                
+                        if( mserver.isRegistered( serviceName )) {
+                            mserver.invoke( serviceName, "addChild",
+                                    new Object[] { this },
+                                    new String[] { "org.apache.catalina.Container" } );
+                        }
+                    }
+                    Registry.getRegistry(null, null).registerComponent(this, oname, null);
                 } catch( Throwable t ) {
-                    log.error("Host registering failed!", t );
+                    CatalinaLogger.CORE_LOGGER.failedHostJmxRegistration(oname, t);
                 }
             }
         }
@@ -590,8 +557,6 @@
     public ObjectName createObjectName(String domain, ObjectName parent)
         throws Exception
     {
-        if( log.isDebugEnabled())
-            log.debug("Create ObjectName " + domain + " " + parent );
         return new ObjectName( domain + ":type=Host,host=" + getName());
     }
 

Modified: trunk/src/main/java/org/apache/catalina/core/StandardWrapper.java
===================================================================
--- trunk/src/main/java/org/apache/catalina/core/StandardWrapper.java	2012-09-06 14:06:07 UTC (rev 2079)
+++ trunk/src/main/java/org/apache/catalina/core/StandardWrapper.java	2012-09-12 16:44:27 UTC (rev 2080)
@@ -18,6 +18,8 @@
 
 package org.apache.catalina.core;
 
+import static org.jboss.web.CatalinaMessages.MESSAGES;
+
 import java.io.PrintStream;
 import java.lang.reflect.Method;
 import java.util.ArrayList;
@@ -63,6 +65,7 @@
 import org.apache.tomcat.InstanceManager;
 import org.apache.tomcat.PeriodicEventListener;
 import org.apache.tomcat.util.modeler.Registry;
+import org.jboss.web.CatalinaLogger;
 
 /**
  * Standard implementation of the <b>Wrapper</b> interface that represents
@@ -77,9 +80,6 @@
     extends ContainerBase
     implements ServletConfig, Wrapper, NotificationEmitter {
 
-    protected static org.jboss.logging.Logger log=
-        org.jboss.logging.Logger.getLogger( StandardWrapper.class );
-
     protected static final String[] DEFAULT_SERVLET_METHODS = new String[] {
                                                     "GET", "HEAD", "POST" };
 
@@ -598,8 +598,7 @@
 
         if ((container != null) &&
             !(container instanceof Context))
-            throw new IllegalArgumentException
-                (sm.getString("standardWrapper.notContext"));
+            throw MESSAGES.wrapperParentMustBeContext();
         if (container instanceof StandardContext) {
             unloadDelay = ((StandardContext)container).getUnloadDelay();
         }
@@ -847,8 +846,7 @@
      */
     public void addChild(Container child) {
 
-        throw new IllegalStateException
-            (sm.getString("standardWrapper.notChild"));
+        throw MESSAGES.wrapperHasNoChild();
 
     }
 
@@ -942,7 +940,7 @@
         // If we are currently unloading this servlet, throw an exception
         if (unloading)
             throw new ServletException
-              (sm.getString("standardWrapper.unloading", getName()));
+              (MESSAGES.cannotAllocateServletWhileUnloading(getName()));
 
         // Load and initialize our instance if necessary
         if (instance == null) {
@@ -953,7 +951,7 @@
                     } catch (ServletException e) {
                         throw e;
                     } catch (Throwable e) {
-                        throw new ServletException(sm.getString("standardWrapper.allocate"), e);
+                        throw new ServletException(MESSAGES.cannotAllocateServletInstance(), e);
                     }
                 }
             }
@@ -975,7 +973,7 @@
                         throw e;
                     } catch (Throwable e) {
                         throw new ServletException
-                            (sm.getString("standardWrapper.allocate"), e);
+                            (MESSAGES.cannotAllocateServletInstance(), e);
                     }
                 } else {
                     try {
@@ -1147,7 +1145,7 @@
             if (actualClass == null) {
                 unavailable(null);
                 throw new ServletException
-                    (sm.getString("standardWrapper.notClass", getName()));
+                    (MESSAGES.noClassSpecifiedForServlet(getName()));
             }
 
             if (servletInstance == null) {
@@ -1158,19 +1156,13 @@
                     unavailable(null);
                     // Restore the context ClassLoader
                     throw new ServletException
-                    (sm.getString("standardWrapper.notServlet", actualClass), e);
+                        (MESSAGES.specifiedClassIsNotServlet(actualClass), e);
                 } catch (Throwable e) {
                     unavailable(null);
-
-                    // Added extra log statement for Bugzilla 36630:
-                    // http://issues.apache.org/bugzilla/show_bug.cgi?id=36630
-                    if(log.isDebugEnabled()) {
-                        log.debug(sm.getString("standardWrapper.instantiate", actualClass), e);
-                    }
-
+                    CatalinaLogger.CORE_LOGGER.errorInstantiatingServletClass(actualClass, e);
                     // Restore the context ClassLoader
                     throw new ServletException
-                    (sm.getString("standardWrapper.instantiate", actualClass), e);
+                        (MESSAGES.errorInstantiatingServletClass(actualClass), e);
                 }
             } else {
                 servlet = servletInstance;
@@ -1232,11 +1224,10 @@
                 throw f;
             } catch (Throwable f) {
                 throwable = f;
-                getServletContext().log("StandardWrapper.Throwable", f );
                 // If the servlet wanted to be unavailable it would have
                 // said so, so do not call unavailable(null).
                 throw new ServletException
-                    (sm.getString("standardWrapper.initException", getName()), f);
+                    (MESSAGES.errorInitializingServlet(getName()), f);
             } finally {
                 instanceSupport.fireInstanceEvent(InstanceEvent.AFTER_INIT_EVENT,
                         servlet, throwable);
@@ -1334,7 +1325,7 @@
      *  to mark this servlet as permanently unavailable
      */
     public void unavailable(UnavailableException unavailable) {
-        getServletContext().log(sm.getString("standardWrapper.unavailable", getName()));
+        getServletContext().log(MESSAGES.markingServletUnavailable(getName()));
         if (unavailable == null)
             setAvailable(Long.MAX_VALUE);
         else if (unavailable.isPermanent())
@@ -1396,9 +1387,7 @@
             nInstances = 0;
             fireContainerEvent("unload", this);
             unloading = false;
-            throw new ServletException
-                (sm.getString("standardWrapper.destroyException", getName()),
-                 t);
+            throw new ServletException(MESSAGES.errorDestroyingServlet(getName()), t);
         }
 
         // Deregister the destroyed instance
@@ -1422,9 +1411,7 @@
                 nInstances = 0;
                 unloading = false;
                 fireContainerEvent("unload", this);
-                throw new ServletException
-                    (sm.getString("standardWrapper.destroyException",
-                                  getName()), t);
+                throw new ServletException(MESSAGES.errorDestroyingServlet(getName()), t);
             }
             instancePool = null;
             nInstances = 0;
@@ -1681,8 +1668,7 @@
         try {
             unload();
         } catch (ServletException e) {
-            getServletContext().log(sm.getString
-                      ("standardWrapper.unloadException", getName()), e);
+            getServletContext().log(MESSAGES.errorUnloadingServlet(getName()), e);
         }
 
         // Shut down this component
@@ -1744,7 +1730,7 @@
                 broadcaster.sendNotification(notification);
             }
         } catch( Exception ex ) {
-            log.info("Error registering servlet with jmx " + this, ex);
+            CatalinaLogger.CORE_LOGGER.failedServletJmxRegistration(this, ex);
         }
 
         if (isJspServlet) {
@@ -1758,8 +1744,7 @@
                 Registry.getRegistry(null, null)
                     .registerComponent(instance, jspMonitorON, null);
             } catch( Exception ex ) {
-                log.info("Error registering JSP monitoring with jmx " +
-                         instance, ex);
+                CatalinaLogger.CORE_LOGGER.failedServletJspMonitorJmxRegistration(instance, ex);
             }
         }
     }

Modified: trunk/src/main/java/org/jboss/web/CatalinaLogger.java
===================================================================
--- trunk/src/main/java/org/jboss/web/CatalinaLogger.java	2012-09-06 14:06:07 UTC (rev 2079)
+++ trunk/src/main/java/org/jboss/web/CatalinaLogger.java	2012-09-12 16:44:27 UTC (rev 2080)
@@ -83,6 +83,11 @@
      */
     CatalinaLogger SESSION_LOGGER = Logger.getMessageLogger(CatalinaLogger.class, "org.apache.catalina.session");
 
+    /**
+     * A logger with the category of the package name.
+     */
+    CatalinaLogger CORE_LOGGER = Logger.getMessageLogger(CatalinaLogger.class, "org.apache.catalina.core");
+
     @LogMessage(level = WARN)
     @Message(id = 1000, value = "A valid entry has been removed from client nonce cache to make room for new entries. A replay attack is now possible. To prevent the possibility of replay attacks, reduce nonceValidity or increase cnonceCacheSize. Further warnings of this type will be suppressed for 5 minutes.")
     void digestCacheRemove();
@@ -327,4 +332,208 @@
     @Message(id = 1059, value = "Backing up session %s to Store, idle for %s seconds")
     void persistentManagerBackupSession(String sessionId, int idle);
 
+    @LogMessage(level = ERROR)
+    @Message(id = 1060, value = "JMX registration failed for filter of type [%s] and name [%s]")
+    void filterJmxRegistrationFailed(String filterClass, String filterName, @Cause Throwable t);
+
+    @LogMessage(level = ERROR)
+    @Message(id = 1061, value = "JMX unregistration failed for filter of type [%s] and name [%s]")
+    void filterJmxUnregistrationFailed(String filterClass, String filterName, @Cause Throwable t);
+
+    @LogMessage(level = DEBUG)
+    @Message(id = 1062, value = "Failed to initialize the SSLEngine")
+    void aprSslEngineInitFailed(@Cause Throwable t);
+
+    @LogMessage(level = INFO)
+    @Message(id = 1063, value = "Failed to initialize the SSLEngine")
+    void aprSslEngineInitFailed();
+
+    @LogMessage(level = DEBUG)
+    @Message(id = 1064, value = "The native library which allows optimal performance in production environments was not found on the java.library.path: %s")
+    void aprInitFailed(@Cause Throwable t);
+
+    @LogMessage(level = INFO)
+    @Message(id = 1065, value = "The native library which allows optimal performance in production environments was not found on the java.library.path: %s")
+    void aprInitFailed();
+
+    @LogMessage(level = ERROR)
+    @Message(id = 1066, value = "An incompatible version %s.%s.%s of the native library is installed, while JBoss Web requires version %s.%s.%s")
+    void aprInvalidVersion(int major, int minor, int patch, int requiredMajor, int requiredMinor, int requiredPatch);
+
+    @LogMessage(level = INFO)
+    @Message(id = 1067, value = "An older version %s.%s.%s of the native library is installed, while JBoss Web recommends version greater than %s.%s.%s")
+    void aprRecommendedVersion(int major, int minor, int patch, int requiredMajor, int requiredMinor, int requiredPatch);
+
+    @LogMessage(level = DEBUG)
+    @Message(id = 1068, value = "Loaded native library %s.%s.%s with APR capabilities: IPv6 [%s], sendfile [%s], random [%s]")
+    void aprInit(int major, int minor, int patch, boolean hasIp6, boolean hasSendfile, boolean hasRandom);
+
+    @LogMessage(level = ERROR)
+    @Message(id = 1069, value = "Error stopping loader")
+    void errorStoppingLoader(@Cause Throwable t);
+
+    @LogMessage(level = ERROR)
+    @Message(id = 1070, value = "Error starting loader")
+    void errorStartingLoader(@Cause Throwable t);
+
+    @LogMessage(level = ERROR)
+    @Message(id = 1071, value = "Error stopping manager")
+    void errorStoppingManager(@Cause Throwable t);
+
+    @LogMessage(level = ERROR)
+    @Message(id = 1072, value = "Error starting manager")
+    void errorStartingManager(@Cause Throwable t);
+
+    @LogMessage(level = ERROR)
+    @Message(id = 1073, value = "Error stopping cluster")
+    void errorStoppingCluster(@Cause Throwable t);
+
+    @LogMessage(level = ERROR)
+    @Message(id = 1074, value = "Error starting cluster")
+    void errorStartingCluster(@Cause Throwable t);
+
+    @LogMessage(level = ERROR)
+    @Message(id = 1075, value = "Error stopping realm")
+    void errorStoppingRealm(@Cause Throwable t);
+
+    @LogMessage(level = ERROR)
+    @Message(id = 1076, value = "Error starting realm")
+    void errorStartingRealm(@Cause Throwable t);
+
+    @LogMessage(level = ERROR)
+    @Message(id = 1077, value = "Error starting realm")
+    void errorStoppingChild(@Cause Throwable t);
+
+    @LogMessage(level = INFO)
+    @Message(id = 1078, value = "Container %s has already been started")
+    void containerAlreadyStarted(String name);
+
+    @LogMessage(level = INFO)
+    @Message(id = 1079, value = "Container %s has not been started")
+    void containerNotStarted(String name);
+
+    @LogMessage(level = ERROR)
+    @Message(id = 1080, value = "Failed container [%s] JMX unregistration")
+    void failedContainerJmxUnregistration(Object objectName, @Cause Throwable t);
+
+    @LogMessage(level = ERROR)
+    @Message(id = 1081, value = "Error invoking periodic operation")
+    void errorInPeriodicOperation(@Cause Throwable t);
+
+    @LogMessage(level = ERROR)
+    @Message(id = 1082, value = "Background processing error in [%s]")
+    void backgroundProcessingError(Object component, @Cause Throwable t);
+
+    @LogMessage(level = ERROR)
+    @Message(id = 1083, value = "Failed engine [%s] JMX registration")
+    void failedEngineJmxRegistration(Object objectName, @Cause Throwable t);
+
+    @LogMessage(level = ERROR)
+    @Message(id = 1084, value = "Error setting up service")
+    void failedServiceCreation(@Cause Throwable t);
+
+    @LogMessage(level = ERROR)
+    @Message(id = 1085, value = "Failed loding specified error report valve class: %s")
+    void invalidErrorReportValveClass(String className, @Cause Throwable t);
+
+    @LogMessage(level = ERROR)
+    @Message(id = 1086, value = "Failed host [%s] JMX registration")
+    void failedHostJmxRegistration(Object objectName, @Cause Throwable t);
+
+    @LogMessage(level = DEBUG)
+    @Message(id = 1087, value = "Error instantiating servlet class %s")
+    void errorInstantiatingServletClass(String className, @Cause Throwable t);
+
+    @LogMessage(level = ERROR)
+    @Message(id = 1088, value = "Failed Servlet [%s] JMX registration")
+    void failedServletJmxRegistration(Object object, @Cause Throwable t);
+
+    @LogMessage(level = ERROR)
+    @Message(id = 1089, value = "Failed Servlet [%s] JSP monitoring JMX registration")
+    void failedServletJspMonitorJmxRegistration(Object object, @Cause Throwable t);
+
+    @LogMessage(level = DEBUG)
+    @Message(id = 1090, value = "Form login page %s must start with a ''/'' in Servlet 2.4")
+    void loginPageStartsWithSlash(String loginPage);
+
+    @LogMessage(level = DEBUG)
+    @Message(id = 1091, value = "Error page location %s must start with a ''/'' in Servlet 2.4")
+    void errorPageStartsWithSlash(String errorPage);
+
+    @LogMessage(level = ERROR)
+    @Message(id = 1092, value = "Failed access to work directory for Context %s")
+    void failedObtainingWorkDirectory(String name, @Cause Throwable t);
+
+    @LogMessage(level = INFO)
+    @Message(id = 1093, value = "The listener %s is already configured for this context, the duplicate definition has been ignored")
+    void duplicateListener(String listenerClass);
+
+    @LogMessage(level = DEBUG)
+    @Message(id = 1094, value = "JSP file %s must start with a ''/'' in Servlet 2.4")
+    void jspFileStartsWithSlash(String jspFile);
+
+    @LogMessage(level = INFO)
+    @Message(id = 1095, value = "Cannot find JSP Servlet, so ignoring jsp-property-group mappings")
+    void missingJspServlet();
+
+    @LogMessage(level = ERROR)
+    @Message(id = 1096, value = "Error stopping context")
+    void errorStoppingContext(String name, @Cause Throwable t);
+
+    @LogMessage(level = ERROR)
+    @Message(id = 1097, value = "Error starting context")
+    void errorStartingContext(String name, @Cause Throwable t);
+
+    @LogMessage(level = DEBUG)
+    @Message(id = 1098, value = "Starting filter %s")
+    void startingFilter(String filterName);
+
+    @LogMessage(level = DEBUG)
+    @Message(id = 1099, value = "Stopping filter %s")
+    void stoppingFilter(String filterName);
+
+    @LogMessage(level = ERROR)
+    @Message(id = 1100, value = "Error starting context")
+    void errorStartingResources(@Cause Throwable t);
+
+    @LogMessage(level = ERROR)
+    @Message(id = 1101, value = "Error stopping context")
+    void errorStoppingResources(@Cause Throwable t);
+
+    @LogMessage(level = ERROR)
+    @Message(id = 1102, value = "Error initializing resources")
+    void errorInitializingResources(@Cause Throwable t);
+
+    @LogMessage(level = ERROR)
+    @Message(id = 1103, value = "Error detected during context start, will stop it")
+    void errorStartingContextWillStop(String name);
+
+    @LogMessage(level = ERROR)
+    @Message(id = 1104, value = "Error performing failed context start cleanup")
+    void errorStartingContextCleanup(String name, @Cause Throwable t);
+
+    @LogMessage(level = ERROR)
+    @Message(id = 1105, value = "Error resetting context")
+    void errorResettingContext(String name, @Cause Throwable t);
+
+    @LogMessage(level = DEBUG)
+    @Message(id = 1106, value = "URL pattern %s must start with a ''/'' in Servlet 2.4")
+    void urlPatternStartsWithSlash(String urlPattern);
+
+    @LogMessage(level = INFO)
+    @Message(id = 1107, value = "Suspicious url pattern: %s in context %s - see section SRV.11.2 of the Servlet specification")
+    void suspiciousUrlPattern(String contextName, String urlPattern);
+
+    @LogMessage(level = INFO)
+    @Message(id = 1108, value = "Context %s object name creation failed")
+    void contextObjectNameCreationFailed(String contextName, @Cause Throwable t);
+
+    @LogMessage(level = INFO)
+    @Message(id = 1108, value = "Context %s JMX registration failed")
+    void contextJmxRegistrationFailed(String contextName, @Cause Throwable t);
+
+    @LogMessage(level = ERROR)
+    @Message(id = 1109, value = "Cannot find context %s parent Host JMX name")
+    void cannotFindContextJmxParentName(String name);
+
 }

Modified: trunk/src/main/java/org/jboss/web/CatalinaMessages.java
===================================================================
--- trunk/src/main/java/org/jboss/web/CatalinaMessages.java	2012-09-06 14:06:07 UTC (rev 2079)
+++ trunk/src/main/java/org/jboss/web/CatalinaMessages.java	2012-09-12 16:44:27 UTC (rev 2080)
@@ -571,10 +571,229 @@
     @Message(id = 216, value = "Non-serializable attribute %s")
     IllegalArgumentException sessionAttributeIsNotSerializable(String name);
 
-    @Message(id = 214, value = "Session binding event listener threw exception")
+    @Message(id = 217, value = "Session binding event listener threw exception")
     String sessionBindingEventListenerException();
 
-    @Message(id = 214, value = "Cannot serialize session attribute %s for session %s")
+    @Message(id = 218, value = "Cannot serialize session attribute %s for session %s")
     String sessionAttributeSerializationException(Object attribute, String sessionId);
 
+    @Message(id = 219, value = "Path %s does not start with a '/' character")
+    IllegalArgumentException invalidDispatcherPath(String path);
+
+    @Message(id = 220, value = "Dispatcher mapping error")
+    String dispatcherMappingError();
+
+    @Message(id = 221, value = "Path %s does not start with a '/' character")
+    String invalidDispatcherPathString(String path);
+
+    @Message(id = 222, value = "Exception thrown by attributes event listener")
+    String servletContextAttributeListenerException();
+
+    @Message(id = 223, value = "Attribute name cannot be null")
+    String servletContextAttributeNameIsNull();
+
+    @Message(id = 224, value = "The listener that attempted to call this method is restricted")
+    UnsupportedOperationException restrictedListenerCannotCallMethod();
+
+    @Message(id = 225, value = "Context %s is already initialized")
+    IllegalStateException contextAlreadyInitialized(String context);
+
+    @Message(id = 226, value = "Error creating instance")
+    String contextObjectCreationError();
+
+    @Message(id = 227, value = "Bad listener class %s for context %s")
+    IllegalArgumentException invalidContextListener(String className, String path);
+
+    @Message(id = 228, value = "Bad listener class %s for context %s")
+    IllegalArgumentException invalidContextListener(String className, String path, @Cause Throwable t);
+
+    @Message(id = 229, value = "The session tracking mode %s requested for context %s is not supported by that context")
+    IllegalArgumentException unsupportedSessionTrackingMode(String sessionTracking, String path);
+
+    @Message(id = 230, value = "The session tracking mode SSL requested for context %s cannot be combined with other tracking modes")
+    IllegalArgumentException sslSessionTrackingModeIsExclusive(String path);
+
+    @Message(id = 231, value = "Invalid empty role specified for context %s")
+    IllegalArgumentException invalidEmptyRole(String path);
+
+    @Message(id = 232, value = "Cannot forward after response has been committed")
+    IllegalStateException cannotForwardAfterCommit();
+
+    @Message(id = 233, value = "Exception sending request initialized lifecycle event to listener instance of class %s")
+    String requestListenerInitException(String className);
+
+    @Message(id = 234, value = "Servlet %s is currently unavailable")
+    String servletIsUnavailable(String wrapperName);
+
+    @Message(id = 235, value = "Allocate exception for servlet %s")
+    String servletAllocateException(String wrapperName);
+
+    @Message(id = 236, value = "Servlet.service() for servlet %s threw exception")
+    String servletServiceException(String wrapperName);
+
+    @Message(id = 237, value = "Deallocate exception for servlet %s")
+    String servletDeallocateException(String wrapperName);
+
+    @Message(id = 238, value = "Exception sending request destroyed lifecycle event to listener instance of class %s")
+    String requestListenerDestroyException(String className);
+
+    @Message(id = 239, value = "Original SevletRequest or wrapped original ServletRequest not passed to RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1")
+    String notOriginalRequestInDispatcher();
+
+    @Message(id = 240, value = "Original SevletResponse or wrapped original ServletResponse not passed to RequestDispatcher in violation of SRV.8.2 and SRV.14.2.5.1")
+    String notOriginalResponseInDispatcher();
+
+    @Message(id = 241, value = "Context %s has already been initialized")
+    IllegalStateException cannotAddFilterRegistrationAfterInit(String contextName);
+
+    @Message(id = 242, value = "Illegal null or empty argument specified")
+    IllegalArgumentException invalidFilterRegistrationArguments();
+
+    @Message(id = 243, value = "Context %s has already been initialized")
+    IllegalStateException cannotAddServletRegistrationAfterInit(String contextName);
+
+    @Message(id = 244, value = "Illegal null or empty argument specified")
+    IllegalArgumentException invalidServletRegistrationArguments();
+
+    @Message(id = 245, value = "Priveleged action exception")
+    String doAsPrivilegeException();
+
+    @Message(id = 246, value = "Exception processing component pre destroy")
+    String preDestroyException();
+
+    @Message(id = 247, value = "Filter execution threw an exception")
+    String filterException();
+
+    @Message(id = 248, value = "Servlet execution threw an exception")
+    String servletException();
+
+    @Message(id = 249, value = "Child container name cannot be null")
+    IllegalArgumentException containerChildWithNullName();
+
+    @Message(id = 250, value = "Child container with name %s already exists")
+    IllegalArgumentException containerChildNameNotUnique(String name);
+
+    @Message(id = 251, value = "Failed to start child container %s")
+    IllegalStateException containerChildStartFailed(String name, @Cause Throwable t);
+
+    @Message(id = 252, value = "Child of an Engine must be a Host")
+    IllegalArgumentException engineChildMustBeHost();
+
+    @Message(id = 253, value = "Engine cannot have a parent Container")
+    IllegalArgumentException engineHasNoParent();
+
+    @Message(id = 254, value = "Host name is required")
+    IllegalArgumentException hostNameIsNull();
+
+    @Message(id = 255, value = "Child of a Host must be a Context")
+    IllegalArgumentException hostChildMustBeContext();
+
+    @Message(id = 256, value = "Parent of a Wrapper must be a Context")
+    IllegalArgumentException wrapperParentMustBeContext();
+
+    @Message(id = 257, value = "A Wrapper cannot have a child container")
+    IllegalArgumentException wrapperHasNoChild();
+
+    @Message(id = 258, value = "Cannot allocate servlet %s because it is being unloaded")
+    String cannotAllocateServletWhileUnloading(String name);
+
+    @Message(id = 259, value = "Error allocating a servlet instance")
+    String cannotAllocateServletInstance();
+
+    @Message(id = 260, value = "No servlet class has been specified for servlet %s")
+    String noClassSpecifiedForServlet(String name);
+
+    @Message(id = 261, value = "Class %s is not a Servlet")
+    String specifiedClassIsNotServlet(String className);
+
+    @Message(id = 262, value = "Error instantiating servlet class %s")
+    String errorInstantiatingServletClass(String className);
+
+    @Message(id = 263, value = "Servlet.init() for servlet %s threw exception")
+    String errorInitializingServlet(String name);
+
+    @Message(id = 264, value = "Marking servlet %s as unavailable")
+    String markingServletUnavailable(String name);
+
+    @Message(id = 265, value = "Servlet.destroy() for servlet %s threw exception")
+    String errorDestroyingServlet(String name);
+
+    @Message(id = 266, value = "Servlet %s threw unload exception")
+    String errorUnloadingServlet(String name);
+
+    @Message(id = 267, value = "LoginConfig cannot be null")
+    IllegalArgumentException nullLoginConfig();
+
+    @Message(id = 268, value = "Form login page %s must start with a ''/'")
+    IllegalArgumentException loginPageMustStartWithSlash(String loginPage);
+
+    @Message(id = 269, value = "Error page location %s must start with a ''/''")
+    IllegalArgumentException errorPageMustStartWithSlash(String errorPage);
+
+    @Message(id = 270, value = "%s is not a subclass of StandardWrapper")
+    IllegalArgumentException invalidWrapperClass(String wrapperClass);
+
+    @Message(id = 271, value = "Cannot set resources after Context startup")
+    IllegalStateException cannotSetResourcesAfterStart();
+
+    @Message(id = 272, value = "Child of a Context must be a Wrapper")
+    IllegalArgumentException contextChildMustBeWrapper();
+
+    @Message(id = 273, value = "JSP file %s must start with a ''/''")
+    IllegalArgumentException jspFileMustStartWithSlash(String jspFile);
+
+    @Message(id = 274, value = "Invalid <url-pattern> %s in security constraint")
+    IllegalArgumentException invalidSecurityConstraintUrlPattern(String urlPattern);
+
+    @Message(id = 275, value = "ErrorPage cannot be null")
+    IllegalArgumentException nullErrorPage();
+
+    @Message(id = 276, value = "Filter mapping specifies an unknown filter name %s")
+    IllegalArgumentException unknownFilterNameInMapping(String filterName);
+
+    @Message(id = 277, value = "Filter mapping must specify either a <url-pattern> or a <servlet-name>")
+    IllegalArgumentException missingFilterMapping();
+
+    @Message(id = 278, value = "Invalid <url-pattern> %s in filter mapping")
+    IllegalArgumentException invalidFilterMappingUrlPattern(String urlPattern);
+
+    @Message(id = 279, value = "Both parameter name and parameter value are required")
+    IllegalArgumentException missingParameterNameOrValue();
+
+    @Message(id = 280, value = "Duplicate context initialization parameter %s")
+    IllegalArgumentException duplicateContextParameters(String name);
+
+    @Message(id = 281, value = "Servlet mapping specifies an unknown Servlet name %s")
+    IllegalArgumentException unknownServletNameInMapping(String servletName);
+
+    @Message(id = 282, value = "Invalid <url-pattern> %s in Servlet mapping")
+    IllegalArgumentException invalidServletMappingUrlPattern(String urlPattern);
+
+    @Message(id = 283, value = "Create wrapper failed")
+    IllegalStateException errorCreatingWrapper(@Cause Throwable t);
+
+    @Message(id = 284, value = "Exception starting filter %s")
+    String errorStartingFilter(String filterName);
+
+    @Message(id = 285, value = "Error configuring application listener of class %s")
+    String errorInstatiatingApplicationListener(String listenerClass);
+
+    @Message(id = 286, value = "Skipped installing application listeners due to previous error(s)")
+    String skippingApplicationListener();
+
+    @Message(id = 287, value = "Exception sending context initialized event to listener instance of class %s")
+    String errorSendingContextInitializedEvent(String listenerClass);
+
+    @Message(id = 287, value = "Exception sending context destroyed event to listener instance of class %s")
+    String errorSendingContextDestroyedEvent(String listenerClass);
+
+    @Message(id = 288, value = "Error destroying application listener of class %s")
+    String errorDestroyingApplicationListener(String listenerClass);
+
+    @Message(id = 289, value = "Servlet %s threw load() exception")
+    String errorLoadingServlet(String servletName);
+
+    @Message(id = 290, value = "Error initializing context")
+    String errorInitializingContext();
+
 }



More information about the jbossweb-commits mailing list