[jboss-cvs] JBossAS SVN: r76270 - in trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster: ha and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sun Jul 27 18:43:06 EDT 2008


Author: bstansberry at jboss.com
Date: 2008-07-27 18:43:06 -0400 (Sun, 27 Jul 2008)
New Revision: 76270

Modified:
   trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/DefaultJBossWebEventHandler.java
   trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/LocalStrings.properties
   trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/ModClusterService.java
   trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/Utils.java
   trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/ha/ClusteredMCMPHandlerImpl.java
   trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/ha/HASingletonAwareResetRequestSource.java
   trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/mcmp/impl/DefaultMCMPHandler.java
Log:
[JBAS-5659] Fix StringManager usage

Modified: trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/DefaultJBossWebEventHandler.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/DefaultJBossWebEventHandler.java	2008-07-27 21:51:13 UTC (rev 76269)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/DefaultJBossWebEventHandler.java	2008-07-27 22:43:06 UTC (rev 76270)
@@ -134,7 +134,7 @@
       checkInit(); 
       
       if (log.isDebugEnabled()) {
-         log.debug(sm.getString("clusterListener.config", engine.getName()));
+         log.debug(sm.getString("modcluster.engine.config", engine.getName()));
       }
       
       // If needed, create automagical JVM route (address + port + engineName)
@@ -142,7 +142,7 @@
          Utils.establishJvmRouteAndConnectorAddress(engine, this.mcmpHandler);
       } catch (Exception e) {
          mcmpHandler.markProxiesInError();
-         log.info(sm.getString("clusterListener.error.addressJvmRoute"), e);
+         log.info(sm.getString("modcluster.error.addressJvmRoute"), e);
          return;
       }
      
@@ -158,7 +158,7 @@
       checkInit();
       
       if (log.isDebugEnabled()) {
-         log.debug(sm.getString("clusterListener.context.enable", context.getPath(), context.getParent().getName(), ((StandardContext) context).getState()));
+         log.debug(sm.getString("modcluster.context.enable", context.getPath(), context.getParent().getName(), ((StandardContext) context).getState()));
      }
 
      // Send ENABLE-APP if state is started
@@ -173,7 +173,7 @@
       checkInit();
       
       if (log.isDebugEnabled()) {
-         log.debug(sm.getString("clusterListener.context.start", context.getPath(), context.getParent().getName()));
+         log.debug(sm.getString("modcluster.context.start", context.getPath(), context.getParent().getName()));
      }
 
      // Send ENABLE-APP
@@ -186,7 +186,7 @@
       checkInit();
       
       if (log.isDebugEnabled()) {
-         log.debug(sm.getString("clusterListener.context.stop", context.getPath(), context.getParent().getName()));
+         log.debug(sm.getString("modcluster.context.stop", context.getPath(), context.getParent().getName()));
      }
 
      // Send STOP-APP
@@ -199,7 +199,7 @@
       checkInit();
       
       if (log.isDebugEnabled()) {
-         log.debug(sm.getString("clusterListener.context.disable", context.getPath(), context.getParent().getName(), ((StandardContext) context).getState()));
+         log.debug(sm.getString("modcluster.context.disable", context.getPath(), context.getParent().getName(), ((StandardContext) context).getState()));
      }
 
      // JVMRoute can be null here if nothing was ever initialized
@@ -214,7 +214,7 @@
       checkInit();
       
       if (log.isDebugEnabled()) {
-         log.debug(sm.getString("clusterListener.stop", engine.getName()));
+         log.debug(sm.getString("modcluster.engine.stop", engine.getName()));
      }
 
      // JVMRoute can be null here if nothing was ever initialized
@@ -230,7 +230,7 @@
       checkInit();
       
       if (log.isDebugEnabled()) {
-          log.debug(sm.getString("clusterListener.status", engine.getName()));
+          log.debug(sm.getString("modcluster.engine.status", engine.getName()));
       }
       
       mcmpHandler.status();
@@ -263,6 +263,6 @@
    private void checkInit()
    {
       if (!init)
-         throw new IllegalStateException("Not initialized; call init() first");
+         throw new IllegalStateException(sm.getString("modcluster.error.uninitialized"));
    }
 }

Modified: trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/LocalStrings.properties
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/LocalStrings.properties	2008-07-27 21:51:13 UTC (rev 76269)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/LocalStrings.properties	2008-07-27 22:43:06 UTC (rev 76270)
@@ -1,24 +1,39 @@
 # Regular messages
-clusterListener.address=Detected local address [{0}]
-clusterListener.config=Sending configuration for engine [{0}]
-clusterListener.context.disable=Undeploy context [{0}] with state [{2}] to Host [{1}]
-clusterListener.context.enable=Deploy context [{0}] with state [{2}] to Host [{1}]
-clusterListener.context.start=Start context [{0}] in Host [{1}]
-clusterListener.context.stop=Stop context [{0}] in Host [{1}]
-clusterListener.jvmRoute=Engine [{0}] will use jvmRoute [{1}]
-clusterListener.request=Sending command [{0}] wildcard [{1}] to proxy [{2}]
-clusterListener.status=Check status for engine [{0}]
-clusterListener.stop=Stop all web applications for engine [{0}]
+modcluster.context.disable=Undeploy context [{0}] with state [{2}] to Host [{1}]
+modcluster.context.enable=Deploy context [{0}] with state [{2}] to Host [{1}]
+modcluster.context.start=Start context [{0}] in Host [{1}]
+modcluster.context.stop=Stop context [{0}] in Host [{1}]
+modcluster.engine.config=Sending configuration for engine [{0}]
+modcluster.engine.status=Check status for engine [{0}]
+modcluster.engine.stop=Stop all web applications for engine [{0}]
+modcluster.request=Sending command [{0}] wildcard [{1}] to proxy [{2}]
+modcluster.singleton.ignorestop=Ignoring call to stopOldMaster for domain [{0}] as we are in domain [{1}]
+modcluster.util.address=Detected local address [{0}]
+modcluster.util.jvmRoute=Engine [{0}] will use jvmRoute [{1}]
 
 # Error messages
-clusterListener.error.addressJvmRoute=Error connecting to proxy to determine Engine.JVMRoute or Connector.address
-clusterListener.error.invalidHost=Invalid host specified: {0}
-clusterListener.error.io=IO error sending command {0} to proxy {1}
-clusterListener.error.jmxRegister=Error during JMX registration
-clusterListener.error.jmxUnregister=Error during JMX unregistration
-clusterListener.error.nullAttribute=Value for attribute {0} cannot be null
-clusterListener.error.other=Error [{2}: {3}] sending command {0} to proxy {1}, configuration will be reset
-clusterListener.error.parse=Error parsing response header for command {0}
-clusterListener.error.startListener=Error starting advertise listener
-clusterListener.error.stopListener=Error stopping advertise listener
-clusterListener.error.syntax=Unrecoverable syntax error [{2}: {3}] sending command {0} to proxy {1}
+modcluster.error.addressJvmRoute=Error connecting to proxy to determine Engine.JVMRoute or Connector.address
+modcluster.error.discovery.add=Failure notifying master of added proxy [{0}]:[{1}]
+modcluster.error.discovery.remove=Failure notifying master of removed proxy [{0}]:[{1}]
+modcluster.error.drm="Error updating DRM
+modcluster.error.invalidHost=Invalid host specified: {0}
+modcluster.error.io=IO error sending command {0} to proxy {1}
+modcluster.error.jmxRegister=Error during JMX registration
+modcluster.error.jmxUnregister=Error during JMX unregistration
+modcluster.error.noproxy=No proxy list or URL configured, advertise disabled and no localhost available; connect connect to mod_cluster
+modcluster.error.nullAttribute=Value for attribute {0} cannot be null
+modcluster.error.other=Error [{2}: {3}] sending command {0} to proxy {1}, configuration will be reset
+modcluster.error.iae.null=[{0}] is null
+modcluster.error.iae.invalid="Invalid value [{0}] for [{1}]
+modcluster.error.parse=Error parsing response header for command {0}
+modcluster.error.rpc.known=Call to [{0}] received throwable from [{1}]
+modcluster.error.rpc.noresp=No valid response to RPC [{0}]
+modcluster.error.rpc.unknown=Call to [{0}] received throwable from unknown server
+modcluster.error.rpc.unexpected=Unexpected response [{0}] to RPC [{1}]
+modcluster.error.startListener=Error starting advertise listener
+modcluster.error.status.complete=Caught exception advising cluster of status upddate completion
+modcluster.error.status.unsupported=status() should not be invoked on ClusteredMCMPHandler
+modcluster.error.stopListener=Error stopping advertise listener
+modcluster.error.stopOldMaster=Call to stopOldMaster failed. New master singleton will not start.
+modcluster.error.syntax=Unrecoverable syntax error [{2}: {3}] sending command {0} to proxy {1}
+modcluster.error.unitialized=Not initialized; call init() first
\ No newline at end of file

Modified: trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/ModClusterService.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/ModClusterService.java	2008-07-27 21:51:13 UTC (rev 76269)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/ModClusterService.java	2008-07-27 22:43:06 UTC (rev 76270)
@@ -85,7 +85,7 @@
    /**
     * The string manager for this package.
     */
-   private StringManager sm = StringManager.getManager(Constants.Package);
+   private final StringManager sm = StringManager.getManager(Constants.Package);
    
    private final HASingletonAwareResetRequestSource resetRequestSource;
    private final MCMPHandler localHandler;
@@ -133,9 +133,9 @@
                              LoadBalanceFactorProvider loadFactorProvider,
                              HASingletonElector singletonElector)
    {      
-      assert partition != null          : "partition is null";        
-      assert loadFactorProvider != null : "loadFactorProvider is null";         
-      assert config != null             : "config is null";
+      assert partition != null          : sm.getString("modcluster.error.iae.null", "partition");        
+      assert loadFactorProvider != null : sm.getString("modcluster.error.iae.null", "loadFactorProvider");         
+      assert config != null             : sm.getString("modcluster.error.iae.null", "config is null");
       
       setHAPartition(partition);
       
@@ -179,13 +179,13 @@
          LoadBalanceFactorProvider loadManager,
          HASingletonElector singletonElector)
    {
-      assert partition != null        : "partition is null";
-      assert localHandler != null     : "mcmpHandler is null";         
-      assert loadManager != null      : "loadManager is null";   
-      assert resetRequestSource != null : "resetRequestSource is null";       
-      assert nodeConfig != null       : "nodeConfig is null"; 
-      assert balancerConfig != null   : "balancerConfig is null";
-      assert clusteredHandler != null : "clusteredHandler is null";
+      assert partition != null          : sm.getString("modcluster.error.iae.null", "partition");
+      assert localHandler != null       : sm.getString("modcluster.error.iae.null", "localHandler");         
+      assert loadManager != null        : sm.getString("modcluster.error.iae.null", "loadManager");   
+      assert resetRequestSource != null : sm.getString("modcluster.error.iae.null", "resetRequestSource");       
+      assert nodeConfig != null         : sm.getString("modcluster.error.iae.null", "nodeConfig"); 
+      assert balancerConfig != null     : sm.getString("modcluster.error.iae.null", "balancerConfig");
+      assert clusteredHandler != null   : sm.getString("modcluster.error.iae.null", "clusteredHandler");
       
       setHAPartition(partition);
       
@@ -243,7 +243,7 @@
          Utils.establishJvmRouteAndConnectorAddress(engine, this.clusteredHandler);
       } catch (Exception e) {
          this.clusteredHandler.markProxiesInError();
-         log.info(sm.getString("clusterListener.error.addressJvmRoute"), e);
+         log.info(sm.getString("modcluster.error.addressJvmRoute"), e);
          return;
       }
       
@@ -296,10 +296,6 @@
          statusCount = (statusCount + 1) % processStatusFrequency;
          if (statusCount == 0) 
          {
-            // 1) Poll everybody for status
-            // 2) Deal with any dropped mcmp request situations
-            // 3) Update the LBFs on mod_cluster
-            // 4) Get the mod_cluster proxy lists in sync
             updateClusterStatus();
          }
       }
@@ -385,7 +381,7 @@
       }
       catch (Exception ex)
       {
-         this.log.error("_stopOldMaster failed. New master singleton will not start.", ex);
+         this.log.error(sm.getString("modcluster.error.stopOldMaster"), ex);
       }
    }
 
@@ -422,8 +418,7 @@
       }
       else
       {
-         log.debug("ignoring call to _stopOldMaster for domain " + domain + 
-                   " as we are in domain " + this.getDomain());
+         log.debug(sm.getString("modcluster.singleton.ignorestop", domain, this.getDomain()));
       }
    }
    
@@ -524,18 +519,18 @@
             ThrowableGroupRpcResponse tgrr = (ThrowableGroupRpcResponse) response;
             ClusterNode cn = tgrr.getSender();
             
-            log.warn("Call to getClusterCoordinatorState received throwable from " + cn, tgrr.getValue());
+            log.warn(sm.getString("modcluster.error.rpc.known", "getClusterCoordinatorState", cn), tgrr.getValue());
             
             // Don't remove from nonresponsive list and we'll pass back an error 
             // status (null server list) to this peer
          }
          else if (response instanceof Throwable)
          {
-            log.warn("Call to getClusterCoordinatorState received throwable from unknown server", (Throwable) response);
+            log.warn(sm.getString("modcluster.error.rpc.unknown", "getClusterCoordinatorState"), (Throwable) response);
          }
          else
          {
-            log.error("Call to getClusterCoordinatorState received unexpected response : " + response);
+            log.error(sm.getString("modcluster.error.rpc.unexpected", response, "getClusterCoordinatorState"));
          }
       }
       
@@ -618,7 +613,7 @@
       }
       catch (Exception e)
       {
-         log.error("Caught exception advising cluster to update DRM", e);
+         log.error(sm.getString("modcluster.error.status.complete"), e);
       }
    }
 
@@ -755,7 +750,7 @@
                }
                catch (Exception e)
                {
-                  this.coord.log.error("Error updating DRM", e);
+                  this.coord.log.error(sm.getString("modcluster.error.drm"), e);
                }
             }
          }
@@ -789,7 +784,8 @@
       {
          if (this.coord.isMasterNode())      
          {
-            throw new UnsupportedOperationException("TODO implement me");
+            this.coord.localHandler.markProxiesInError();
+            return SUCCESS;
          }
          else
          {         

Modified: trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/Utils.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/Utils.java	2008-07-27 21:51:13 UTC (rev 76269)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/Utils.java	2008-07-27 22:43:06 UTC (rev 76270)
@@ -109,7 +109,7 @@
                    // Should not happen
                    IntrospectionUtils.setProperty(connector.getProtocolHandler(), "address", "127.0.0.1");
                }
-               log.info(sm.getString("clusterListener.address", localAddress.getHostAddress()));
+               log.info(sm.getString("modcluster.util.address", localAddress.getHostAddress()));
            }
            if (engine.getJvmRoute() == null) {
                String hostName = null;
@@ -121,7 +121,7 @@
                }
                String jvmRoute = hostName + ":" + connector.getPort() + ":" + engine.getName();
                engine.setJvmRoute(jvmRoute);
-               log.info(sm.getString("clusterListener.jvmRoute", engine.getName(), jvmRoute));
+               log.info(sm.getString("modcluster.util.jvmRoute", engine.getName(), jvmRoute));
            }
       }
    }

Modified: trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/ha/ClusteredMCMPHandlerImpl.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/ha/ClusteredMCMPHandlerImpl.java	2008-07-27 21:51:13 UTC (rev 76269)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/ha/ClusteredMCMPHandlerImpl.java	2008-07-27 22:43:06 UTC (rev 76270)
@@ -423,7 +423,7 @@
 
    public void status()
    {
-      log.warn("status() should not be invoked on ClusteredMCMPHandlerImpl");      
+      log.warn(sm.getString("modcluster.error.status.unsupported"));      
    }
    
    // ----------------------------------------------------------------  Private
@@ -460,14 +460,14 @@
          }
          else 
          {
-            log.warn("Unexpected response " + obj + "("  + obj.getClass() + ") to RPC " + methodName);
+            log.warn(sm.getString("modcluster.error.rpc.unexpected", obj, methodName));
          }
       }
       
       if (thrown != null)
          throw Utils.convertToUnchecked(thrown);
          
-      throw new IllegalStateException("No valid response to RPC " + methodName);
+      throw new IllegalStateException(sm.getString("modcluster.error.rpc.noresp", methodName));
    }    
    
    /**
@@ -493,10 +493,10 @@
               }
               this.advertiseListener.start();
           } catch (IOException e) {
-              log.error(sm.getString("clusterListener.error.startListener"), e);
+              log.error(sm.getString("modcluster.error.startListener"), e);
           } catch (NoSuchAlgorithmException e) {
               // Should never happen
-              log.error(sm.getString("clusterListener.error.startListener"), e);
+              log.error(sm.getString("modcluster.error.startListener"), e);
           }
       }
    }
@@ -511,12 +511,13 @@
            try {
               this.advertiseListener.destroy();
            } catch (IOException e) {
-               log.error(sm.getString("clusterListener.error.stopListener"), e);
+               log.error(sm.getString("modcluster.error.stopListener"), e);
            }
            this.advertiseListener = null;
        }
    }
    
+   @SuppressWarnings("unchecked")
    private synchronized void sendDiscoveryEventToPartition(InetAddress address, int port, boolean addition)
    {
       AddressPort ap = new AddressPort(address, port);
@@ -543,8 +544,9 @@
       if (throwable != null)
       {
          // Just log it; we'll retry later
-         log.error("Failure notifying master of " + (addition ? "added" : "removed") + 
-                   " proxy " + address.toString() + ":" + port, throwable);
+         String msg = addition ? "modcluster.error.discovery.add" 
+                               : "modcluster.error.discovery.remove";
+         log.error(sm.getString(msg, address.toString(), port), throwable);
          
       }      
    }

Modified: trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/ha/HASingletonAwareResetRequestSource.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/ha/HASingletonAwareResetRequestSource.java	2008-07-27 21:51:13 UTC (rev 76269)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/ha/HASingletonAwareResetRequestSource.java	2008-07-27 22:43:06 UTC (rev 76270)
@@ -27,8 +27,10 @@
 import java.util.List;
 
 import org.apache.catalina.Server;
+import org.apache.catalina.util.StringManager;
 import org.jboss.ha.framework.interfaces.HAPartition;
 import org.jboss.logging.Logger;
+import org.jboss.web.tomcat.service.modcluster.Constants;
 import org.jboss.web.tomcat.service.modcluster.Utils;
 import org.jboss.web.tomcat.service.modcluster.config.BalancerConfiguration;
 import org.jboss.web.tomcat.service.modcluster.config.NodeConfiguration;
@@ -49,6 +51,11 @@
 {
    private static final Logger log = Logger.getLogger(HASingletonAwareResetRequestSource.class);
    
+   /**
+    * The string manager for this package.
+    */
+   private final StringManager sm = StringManager.getManager(Constants.Package);
+   
    private final NodeConfiguration nodeConfig;
    private final BalancerConfiguration balancerConfig;
    private final HAPartition partition;
@@ -127,15 +134,15 @@
          {
             ThrowableGroupRpcResponse tgrr = (ThrowableGroupRpcResponse) response;
             //FIXME what to do?
-            log.warn("Call to getResetRequests received throwable from " + tgrr.getSender(), tgrr.getValue());
+            log.warn(sm.getString("modcluster.error.rpc.known", "getResetRequests", tgrr.getSender()), tgrr.getValue());
          }
          else if (response instanceof Throwable)
          {
-            log.warn("Call to getResetRequests received throwable from unknown server", (Throwable) response);
+            log.warn(sm.getString("modcluster.error.rpc.unknown", "getResetRequests"), (Throwable) response);
          }
          else
          {
-            log.error("Call to getResetRequests received unexpected response : " + response);
+            log.error(sm.getString("modcluster.error.rpc.unexpected", response, "getResetRequests"));
          }
          
       }

Modified: trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/mcmp/impl/DefaultMCMPHandler.java
===================================================================
--- trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/mcmp/impl/DefaultMCMPHandler.java	2008-07-27 21:51:13 UTC (rev 76269)
+++ trunk/tomcat/src/main/org/jboss/web/tomcat/service/modcluster/mcmp/impl/DefaultMCMPHandler.java	2008-07-27 22:43:06 UTC (rev 76270)
@@ -181,8 +181,7 @@
             catch (UnknownHostException e)
             {
                proxies = new Proxy[0];
-               log.fatal("No proxy list or URL configured, advertise disabled " +
-               		"and no localhost available; connect connect to mod_cluster", e);
+               log.fatal(sm.getString("modcluster.error.noproxy"), e);
             }
          }
       } else {
@@ -208,7 +207,7 @@
                   inetAddress = InetAddress.getByName(address);
                }
             } catch (Exception e) {
-               log.error(sm.getString("clusterListener.error.invalidHost", address), e);
+               log.error(sm.getString("modcluster.error.invalidHost", address), e);
                continue;
             }
             Proxy proxy = new Proxy(inetAddress, port, this.sslSocketFactory, this.config.getSocketTimeout());
@@ -580,7 +579,7 @@
                String key = keys.next();
                String value = parameters.get(key);
                if (value == null) {
-                   throw new IllegalArgumentException(sm.getString("clusterListener.error.nullAttribute", key));
+                   throw new IllegalArgumentException(sm.getString("modcluster.error.nullAttribute", key));
                }
                body = encoder.encodeURL(key, 0, key.length());
                body.append('=');
@@ -604,7 +603,7 @@
         }
         
         if (log.isDebugEnabled()) {
-            log.debug(sm.getString("clusterListener.request", command, wildcard, proxy));
+            log.debug(sm.getString("modcluster.request", command, wildcard, proxy));
         }
         
         synchronized (proxy)
@@ -680,7 +679,7 @@
                            header = reader.readLine();
                        }
                    } catch (Exception e) {
-                       log.info(sm.getString("clusterListener.error.parse", command), e);
+                       log.info(sm.getString("modcluster.error.parse", command), e);
                    }
                }
    
@@ -718,10 +717,10 @@
                    if ("SYNTAX".equals(errorType)) {
                        // Syntax error means the protocol is incorrect, which cannot be automatically fixed
                        proxy.setState(Proxy.State.DOWN);
-                       log.error(sm.getString("clusterListener.error.syntax", command, proxy, errorType, message));
+                       log.error(sm.getString("modcluster.error.syntax", command, proxy, errorType, message));
                    } else {
                        proxy.setState(Proxy.State.ERROR);
-                       log.error(sm.getString("clusterListener.error.other", command, proxy, errorType, message));
+                       log.error(sm.getString("modcluster.error.other", command, proxy, errorType, message));
                    }
                }
    
@@ -731,7 +730,7 @@
                
                // Log it only if we haven't done so already. Don't spam the log
                if (proxy.isIoErrorLogged() == false) {                  
-                  log.info(sm.getString("clusterListener.error.io", command, proxy), e);
+                  log.info(sm.getString("modcluster.error.io", command, proxy), e);
                   proxy.setIoErrorLogged(true);
                }
            } finally {
@@ -776,10 +775,10 @@
               }
               listener.start();
           } catch (IOException e) {
-              log.error(sm.getString("clusterListener.error.startListener"), e);
+              log.error(sm.getString("modcluster.error.startListener"), e);
           } catch (NoSuchAlgorithmException e) {
               // Should never happen
-              log.error(sm.getString("clusterListener.error.startListener"), e);
+              log.error(sm.getString("modcluster.error.startListener"), e);
           }
       }
    }
@@ -793,7 +792,7 @@
            try {
                listener.destroy();
            } catch (IOException e) {
-               log.error(sm.getString("clusterListener.error.stopListener"), e);
+               log.error(sm.getString("modcluster.error.stopListener"), e);
            }
            listener = null;
        }
@@ -852,11 +851,11 @@
       {
          if (address == null)
          {
-            throw new IllegalArgumentException("address is null");
+            throw new IllegalArgumentException(sm.getString("modcluster.error.iae.null", "address"));
          }
          if (port <= 0)
          {
-            throw new IllegalArgumentException("invalid port");
+            throw new IllegalArgumentException(sm.getString("modcluster.error.iae.invalid", port, "port"));
          }
          
          this.address = address;
@@ -932,7 +931,7 @@
       {
          if (state == null)
          {
-            throw new IllegalArgumentException("state is null");
+            throw new IllegalArgumentException(sm.getString("modcluster.error.iae.null", "state"));
          }
          this.state = state;
       }




More information about the jboss-cvs-commits mailing list