tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kfuj...@apache.org
Subject svn commit: r1680802 [1/3] - in /tomcat/tc8.0.x/trunk: java/org/apache/catalina/tribes/group/ java/org/apache/catalina/tribes/group/interceptors/ java/org/apache/catalina/tribes/io/ java/org/apache/catalina/tribes/membership/ java/org/apache/catalina/t...
Date Thu, 21 May 2015 10:14:51 GMT
Author: kfujino
Date: Thu May 21 10:14:50 2015
New Revision: 1680802

URL: http://svn.apache.org/r1680802
Log:
Use StringManager to provide i18n support in the org.apache.catalina.tribes packages.

Added:
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/LocalStrings.properties   (with props)
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/LocalStrings.properties   (with props)
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/io/LocalStrings.properties   (with props)
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/tipis/LocalStrings.properties   (with props)
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/LocalStrings.properties   (with props)
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/util/LocalStrings.properties   (with props)
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/LocalStrings.properties   (with props)
Modified:
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelCoordinator.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/DomainFilterInterceptor.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/FragmentationInterceptor.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/GzipInterceptor.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/NonBlockingCoordinator.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/OrderInterceptor.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TwoPhaseCommitInterceptor.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/io/BufferPool.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/io/ObjectReader.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/io/ReplicationStream.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/io/XByteBuffer.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/LocalStrings.properties
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/McastService.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/McastServiceImpl.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/MemberImpl.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/StaticMember.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/tipis/AbstractReplicatedMap.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/tipis/LazyReplicatedMap.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/tipis/ReplicatedMap.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/LocalStrings.properties
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/LocalStrings_es.properties
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/PooledSender.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/ReceiverBase.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/BioReceiver.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/BioReplicationTask.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/BioSender.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/PooledMultiSender.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/bio/util/FastQueue.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/NioReceiver.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/NioReplicationTask.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/NioSender.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/ParallelNioSender.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/transport/nio/PooledParallelSender.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/util/Arrays.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/util/ExecutorFactory.java
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/util/LocalStrings.properties
    tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/util/UUIDGenerator.java
    tomcat/tc8.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelCoordinator.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelCoordinator.java?rev=1680802&r1=1680801&r2=1680802&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelCoordinator.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/ChannelCoordinator.java Thu May 21 10:14:50 2015
@@ -31,6 +31,7 @@ import org.apache.catalina.tribes.transp
 import org.apache.catalina.tribes.transport.nio.NioReceiver;
 import org.apache.catalina.tribes.util.Arrays;
 import org.apache.catalina.tribes.util.Logs;
+import org.apache.catalina.tribes.util.StringManager;
 
 
 /**
@@ -39,6 +40,8 @@ import org.apache.catalina.tribes.util.L
  * This is the last interceptor in the chain.
  */
 public class ChannelCoordinator extends ChannelInterceptorBase implements MessageListener {
+    protected static final StringManager sm =
+            StringManager.getManager(ChannelCoordinator.class.getPackage().getName());
     private ChannelReceiver clusterReceiver;
     private ChannelSender clusterSender;
     private MembershipService membershipService;
@@ -140,7 +143,7 @@ public class ChannelCoordinator extends
             if (svc == 0 ) return;//nothing to start
 
             if (svc == (svc & startLevel)) {
-                throw new ChannelException("Channel already started for level:"+svc);
+                throw new ChannelException(sm.getString("channelCoordinator.alreadyStarted", svc));
             }
 
             //must start the receiver first so that we can coordinate the port it
@@ -174,8 +177,7 @@ public class ChannelCoordinator extends
             }
 
             if (!valid) {
-                throw new IllegalArgumentException("Invalid start level, valid levels are:" +
-                        "SND_RX_SEQ,SND_TX_SEQ,MBR_TX_SEQ,MBR_RX_SEQ");
+                throw new IllegalArgumentException(sm.getString("channelCoordinator.invalid.startLevel"));
             }
             startLevel = (startLevel | svc);
         }catch ( ChannelException cx ) {
@@ -226,8 +228,7 @@ public class ChannelCoordinator extends
                 membershipService.stop(MembershipService.MBR_TX);
             }
             if ( !valid) {
-                throw new IllegalArgumentException("Invalid start level, valid levels are:" +
-                        "SND_RX_SEQ,SND_TX_SEQ,MBR_TX_SEQ,MBR_RX_SEQ");
+                throw new IllegalArgumentException(sm.getString("channelCoordinator.invalid.startLevel"));
             }
 
             startLevel = (startLevel & (~svc));

Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java?rev=1680802&r1=1680801&r2=1680802&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/GroupChannel.java Thu May 21 10:14:50 2015
@@ -44,6 +44,7 @@ import org.apache.catalina.tribes.io.Cha
 import org.apache.catalina.tribes.io.XByteBuffer;
 import org.apache.catalina.tribes.util.Arrays;
 import org.apache.catalina.tribes.util.Logs;
+import org.apache.catalina.tribes.util.StringManager;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 
@@ -56,6 +57,8 @@ import org.apache.juli.logging.LogFactor
  */
 public class GroupChannel extends ChannelInterceptorBase implements ManagedChannel {
     private static final Log log = LogFactory.getLog(GroupChannel.class);
+    protected static final StringManager sm =
+            StringManager.getManager(GroupChannel.class.getPackage().getName());
 
     /**
      * Flag to determine if the channel manages its own heartbeat
@@ -200,11 +203,11 @@ public class GroupChannel extends Channe
     @Override
     public UniqueId send(Member[] destination, Serializable msg, int options, ErrorHandler handler)
             throws ChannelException {
-        if ( msg == null ) throw new ChannelException("Cant send a NULL message");
+        if ( msg == null ) throw new ChannelException(sm.getString("groupChannel.nullMessage"));
         XByteBuffer buffer = null;
         try {
             if (destination == null || destination.length == 0) {
-                throw new ChannelException("No destination given");
+                throw new ChannelException(sm.getString("groupChannel.noDestination"));
             }
             ChannelData data = new ChannelData(true);//generates a unique Id
             data.setAddress(getLocalMember(false));
@@ -274,7 +277,7 @@ public class GroupChannel extends Channe
                     fwd = XByteBuffer.deserialize(msg.getMessage().getBytesDirect(), 0,
                             msg.getMessage().getLength());
                 }catch (Exception sx) {
-                    log.error("Unable to deserialize message:"+msg,sx);
+                    log.error(sm.getString("groupChannel.unable.deserialize", msg),sx);
                     return;
                 }
             }
@@ -310,7 +313,7 @@ public class GroupChannel extends Channe
         } catch ( Exception x ) {
             //this could be the channel listener throwing an exception, we should log it
             //as a warning.
-            if ( log.isWarnEnabled() ) log.warn("Error receiving message:",x);
+            if ( log.isWarnEnabled() ) log.warn(sm.getString("groupChannel.receiving.error"),x);
             throw new RemoteProcessException("Exception:"+x.getMessage(),x);
         }
     }
@@ -330,7 +333,7 @@ public class GroupChannel extends Channe
                     new RpcMessage.NoRpcChannelReply(msg.rpcId, msg.uuid);
             send(new Member[]{destination},reply,Channel.SEND_OPTIONS_ASYNCHRONOUS);
         } catch ( Exception x ) {
-            log.error("Unable to find rpc channel, failed to send NoRpcChannelReply.",x);
+            log.error(sm.getString("groupChannel.sendFail.noRpcChannelReply"),x);
         }
     }
 
@@ -404,7 +407,8 @@ public class GroupChannel extends Channe
             }//end if
             first = first.getNext();
         }//while
-        if ( conflicts.length() > 0 ) throw new ChannelException("Interceptor option flag conflict: "+conflicts.toString());
+        if ( conflicts.length() > 0 ) throw new ChannelException(sm.getString("groupChannel.optionFlag.conflict",
+                conflicts.toString()));
 
     }
 
@@ -535,7 +539,8 @@ public class GroupChannel extends Channe
         if (!this.channelListeners.contains(channelListener) ) {
             this.channelListeners.add(channelListener);
         } else {
-            throw new IllegalArgumentException("Listener already exists:"+channelListener+"["+channelListener.getClass().getName()+"]");
+            throw new IllegalArgumentException(sm.getString("groupChannel.listener.alreadyExist",
+                    channelListener,channelListener.getClass().getName()));
         }
     }
 
@@ -695,7 +700,7 @@ public class GroupChannel extends Channe
                     // In the highly unlikely event it was a different trigger,
                     // simply ignore it and continue.
                 } catch ( Exception x ) {
-                    log.error("Unable to send heartbeat through Tribes interceptor stack. Will try to sleep again.",x);
+                    log.error(sm.getString("groupChannel.unable.sendHeartbeat"),x);
                 }//catch
             }//while
         }//run

Added: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/LocalStrings.properties?rev=1680802&view=auto
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/LocalStrings.properties (added)
+++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/LocalStrings.properties Thu May 21 10:14:50 2015
@@ -0,0 +1,26 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+channelCoordinator.alreadyStarted=Channel already started for level:{0}
+channelCoordinator.invalid.startLevel=Invalid start level, valid levels are:SND_RX_SEQ,SND_TX_SEQ,MBR_TX_SEQ,MBR_RX_SEQ
+groupChannel.nullMessage=Can't send a NULL message
+groupChannel.noDestination=No destination given
+groupChannel.unable.deserialize=Unable to deserialize message:{0}
+groupChannel.receiving.error=Error receiving message:
+groupChannel.sendFail.noRpcChannelReply=Unable to find rpc channel, failed to send NoRpcChannelReply.
+groupChannel.optionFlag.conflict=Interceptor option flag conflict: {0}
+groupChannel.listener.alreadyExist=Listener already exists:{0}[{1}]
+groupChannel.unable.sendHeartbeat=Unable to send heartbeat through Tribes interceptor stack. Will try to sleep again.
+rpcChannel.replyFailed=Unable to send back reply in RpcChannel.

Propchange: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/LocalStrings.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java?rev=1680802&r1=1680801&r2=1680802&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/RpcChannel.java Thu May 21 10:14:50 2015
@@ -27,6 +27,7 @@ import org.apache.catalina.tribes.Channe
 import org.apache.catalina.tribes.ErrorHandler;
 import org.apache.catalina.tribes.Member;
 import org.apache.catalina.tribes.UniqueId;
+import org.apache.catalina.tribes.util.StringManager;
 import org.apache.catalina.tribes.util.UUIDGenerator;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
@@ -36,6 +37,8 @@ import org.apache.juli.logging.LogFactor
  */
 public class RpcChannel implements ChannelListener{
     private static final Log log = LogFactory.getLog(RpcChannel.class);
+    protected static final StringManager sm =
+            StringManager.getManager(RpcChannel.class.getPackage().getName());
 
     public static final int FIRST_REPLY = 1;
     public static final int MAJORITY_REPLY = 2;
@@ -161,7 +164,7 @@ public class RpcChannel implements Chann
                 if (excallback != null && !asyncReply) {
                     excallback.replyFailed(rmsg.message, reply, sender, x);
                 } else {
-                    log.error("Unable to send back reply in RpcChannel.",x);
+                    log.error(sm.getString("rpcChannel.replyFailed"),x);
                 }
             }
             if (finished && excallback != null && !asyncReply) {

Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/DomainFilterInterceptor.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/DomainFilterInterceptor.java?rev=1680802&r1=1680801&r2=1680802&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/DomainFilterInterceptor.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/DomainFilterInterceptor.java Thu May 21 10:14:50 2015
@@ -22,6 +22,7 @@ import org.apache.catalina.tribes.Channe
 import org.apache.catalina.tribes.Member;
 import org.apache.catalina.tribes.group.ChannelInterceptorBase;
 import org.apache.catalina.tribes.membership.Membership;
+import org.apache.catalina.tribes.util.StringManager;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 
@@ -35,6 +36,8 @@ import org.apache.juli.logging.LogFactor
  */
 public class DomainFilterInterceptor extends ChannelInterceptorBase {
     private static final Log log = LogFactory.getLog(DomainFilterInterceptor.class);
+    protected static final StringManager sm =
+            StringManager.getManager(DomainFilterInterceptor.class.getPackage().getName());
     protected Membership membership = null;
 
     protected byte[] domain = new byte[0];
@@ -45,7 +48,7 @@ public class DomainFilterInterceptor ext
             super.messageReceived(msg);
         } else {
             if (log.isWarnEnabled())
-                log.warn("Received message from cluster["+msg.getAddress()+"] was refused.");
+                log.warn(sm.getString("domainFilterInterceptor.message.refused", msg.getAddress()));
         }
     }//messageReceived
 
@@ -61,7 +64,7 @@ public class DomainFilterInterceptor ext
         if ( notify ) {
             super.memberAdded(member);
         } else {
-            if(log.isInfoEnabled()) log.info("Member was refused to join cluster["+member+"]");
+            if(log.isInfoEnabled()) log.info(sm.getString("domainFilterInterceptor.member.refused", member));
         }
     }
 

Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/FragmentationInterceptor.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/FragmentationInterceptor.java?rev=1680802&r1=1680801&r2=1680802&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/FragmentationInterceptor.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/FragmentationInterceptor.java Thu May 21 10:14:50 2015
@@ -27,6 +27,9 @@ import org.apache.catalina.tribes.Member
 import org.apache.catalina.tribes.group.ChannelInterceptorBase;
 import org.apache.catalina.tribes.group.InterceptorPayload;
 import org.apache.catalina.tribes.io.XByteBuffer;
+import org.apache.catalina.tribes.util.StringManager;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
 
 /**
  *
@@ -41,7 +44,8 @@ import org.apache.catalina.tribes.io.XBy
  * @version 1.0
  */
 public class FragmentationInterceptor extends ChannelInterceptorBase {
-    private static final org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog( FragmentationInterceptor.class );
+    private static final Log log = LogFactory.getLog(FragmentationInterceptor.class );
+    protected static final StringManager sm = StringManager.getManager(FragmentationInterceptor.class.getPackage().getName());
 
     protected final HashMap<FragKey, FragCollection> fragpieces = new HashMap<>();
     private int maxSize = 1024*100;
@@ -147,7 +151,7 @@ public class FragmentationInterceptor ex
             }
         }catch ( Exception x ) {
             if ( log.isErrorEnabled() ) {
-                log.error("Unable to perform heartbeat clean up in the frag interceptor",x);
+                log.error(sm.getString("fragmentationInterceptor.heartbeat.failed"),x);
             }
         }
         super.heartbeat();
@@ -199,7 +203,7 @@ public class FragmentationInterceptor ex
         }
 
         public ChannelMessage assemble() {
-            if ( !complete() ) throw new IllegalStateException("Fragments are missing.");
+            if ( !complete() ) throw new IllegalStateException(sm.getString("fragmentationInterceptor.fragments.missing"));
             int buffersize = 0;
             for (int i=0; i<frags.length; i++ ) buffersize += frags[i].getLength();
             XByteBuffer buf = new XByteBuffer(buffersize,false);

Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/GzipInterceptor.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/GzipInterceptor.java?rev=1680802&r1=1680801&r2=1680802&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/GzipInterceptor.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/GzipInterceptor.java Thu May 21 10:14:50 2015
@@ -28,6 +28,7 @@ import org.apache.catalina.tribes.Channe
 import org.apache.catalina.tribes.Member;
 import org.apache.catalina.tribes.group.ChannelInterceptorBase;
 import org.apache.catalina.tribes.group.InterceptorPayload;
+import org.apache.catalina.tribes.util.StringManager;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 
@@ -38,6 +39,8 @@ import org.apache.juli.logging.LogFactor
 public class GzipInterceptor extends ChannelInterceptorBase {
 
     private static final Log log = LogFactory.getLog(GzipInterceptor.class);
+    protected static final StringManager sm =
+            StringManager.getManager(GzipInterceptor.class.getPackage().getName());
 
     public static final int DEFAULT_BUFFER_SIZE = 2048;
 
@@ -49,7 +52,7 @@ public class GzipInterceptor extends Cha
             msg.getMessage().append(data,0,data.length);
             super.sendMessage(destination, msg, payload);
         } catch ( IOException x ) {
-            log.error("Unable to compress byte contents");
+            log.error(sm.getString("gzipInterceptor.compress.failed"));
             throw new ChannelException(x);
         }
     }
@@ -62,7 +65,7 @@ public class GzipInterceptor extends Cha
             msg.getMessage().append(data,0,data.length);
             super.messageReceived(msg);
         } catch ( IOException x ) {
-            log.error("Unable to decompress byte contents",x);
+            log.error(sm.getString("gzipInterceptor.decompress.failed"),x);
         }
     }
 

Added: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/LocalStrings.properties?rev=1680802&view=auto
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/LocalStrings.properties (added)
+++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/LocalStrings.properties Thu May 21 10:14:50 2015
@@ -0,0 +1,58 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+domainFilterInterceptor.message.refused=Received message from cluster[{0}] was refused.
+domainFilterInterceptor.member.refused=Member was refused to join cluster[{0}]
+fragmentationInterceptor.heartbeat.failed=Unable to perform heartbeat clean up in the frag interceptor
+fragmentationInterceptor.fragments.missing=Fragments are missing.
+gzipInterceptor.compress.failed=Unable to compress byte contents
+gzipInterceptor.decompress.failed=Unable to decompress byte contents
+messageDispatchInterceptor.queue.full=Asynchronous queue is full, reached its limit of {0} bytes, current:{1} bytes.
+messageDispatchInterceptor.unableAdd.queue=Unable to add the message to the async queue, queue bug?
+messageDispatchInterceptor.warning.optionflag=Warning, you are overriding the asynchronous option flag, this will disable the Channel.SEND_OPTIONS_ASYNCHRONOUS that other apps might use.
+messageDispatchInterceptor.completeMessage.failed=Unable to report back completed message.
+messageDispatchInterceptor.AsyncMessage.failed=Error while processing async message.
+messageDispatchInterceptor.errorMessage.failed=Unable to report back error message.
+nonBlockingCoordinator.electionMessage.sendfailed=Unable to send election message to:{0}
+nonBlockingCoordinator.processCoordinationMessage.failed=Error processing coordination message. Could be fatal.
+nonBlockingCoordinator.memberAdded.failed=Unable to start election when member was added.
+nonBlockingCoordinator.memberDisappeared.failed=Unable to start election when member was removed.
+nonBlockingCoordinator.heartbeat.inconsistency=Heartbeat found inconsistency, restart election
+nonBlockingCoordinator.heartbeat.failed=Unable to perform heartbeat.
+orderInterceptor.messageAdded.sameCounter=Message added has the same counter, synchronization bug. Disable the order interceptor
+tcpFailureDetector.memberDisappeared.verify=Received memberDisappeared[{0}] message. Will verify.
+tcpFailureDetector.already.disappeared=Verification complete. Member already disappeared[{0}]
+tcpFailureDetector.member.disappeared=Verification complete. Member disappeared[{0}]
+tcpFailureDetector.still.alive=Verification complete. Member still alive[{0}]
+tcpFailureDetector.heartbeat.failed=Unable to perform heartbeat on the TcpFailureDetector.
+tcpFailureDetector.performBasicCheck.memberAdded=Member added, even though we werent notified:{0}
+tcpFailureDetector.suspectMember.dead=Suspect member, confirmed dead.[{0}]
+tcpFailureDetector.suspectMember.alive=Suspect member, confirmed alive.[{0}]
+tcpFailureDetector.failureDetection.failed=Unable to perform failure detection check, assuming member down.
+tcpPingInterceptor.ping.failed=Unable to send TCP ping.
+tcpPingInterceptor.pingFailed.pingThread=Unable to send ping from TCP ping thread.
+throughputInterceptor.report=ThroughputInterceptor Report[\
+  \n\tTx Msg:{0} messages\
+  \n\tSent:{1} MB (total)\
+  \n\tSent:{2} MB (application)\
+  \n\tTime:{3} seconds\
+  \n\tTx Speed:{4} MB/sec (total)\
+  \n\tTxSpeed:{5} MB/sec (application)\
+  \n\tError Msg:{6}\
+  \n\tRx Msg:{7} messages\
+  \n\tRx Speed:{8} MB/sec (since 1st msg)\
+  \n\tReceived:{9} MB]\n
+twoPhaseCommitInterceptor.originalMessage.missing=Received a confirmation, but original message is missing. Id:{0} 
+twoPhaseCommitInterceptor.heartbeat.failed=Unable to perform heartbeat on the TwoPhaseCommit interceptor.
\ No newline at end of file

Propchange: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/LocalStrings.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java?rev=1680802&r1=1680801&r2=1680802&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/MessageDispatchInterceptor.java Thu May 21 10:14:50 2015
@@ -25,6 +25,7 @@ import org.apache.catalina.tribes.group.
 import org.apache.catalina.tribes.group.InterceptorPayload;
 import org.apache.catalina.tribes.transport.bio.util.FastQueue;
 import org.apache.catalina.tribes.transport.bio.util.LinkObject;
+import org.apache.catalina.tribes.util.StringManager;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 
@@ -39,7 +40,9 @@ import org.apache.juli.logging.LogFactor
  */
 public class MessageDispatchInterceptor extends ChannelInterceptorBase implements Runnable {
     private static final Log log = LogFactory.getLog(MessageDispatchInterceptor.class);
-
+    protected static final StringManager sm =
+            StringManager.getManager(MessageDispatchInterceptor.class.getPackage().getName());
+    
     protected long maxQueueSize = 1024*1024*64; //64MB
     protected final FastQueue queue = new FastQueue();
     protected volatile boolean run = false;
@@ -63,15 +66,15 @@ public class MessageDispatchInterceptor
                     super.sendMessage(destination,msg,payload);
                     return;
                 } else {
-                    throw new ChannelException("Asynchronous queue is full, reached its limit of " +
-                            maxQueueSize +" bytes, current:" + getCurrentSize() + " bytes.");
+                    throw new ChannelException(sm.getString("messageDispatchInterceptor.queue.full",
+                            maxQueueSize, getCurrentSize()));
                 }//end if
             }//end if
             //add to queue
             if ( useDeepClone ) msg = (ChannelMessage)msg.deepclone();
             if (!addToQueue(msg, destination, payload) ) {
                 throw new ChannelException(
-                        "Unable to add the message to the async queue, queue bug?");
+                        sm.getString("messageDispatchInterceptor.unableAdd.queue"));
             }
             addAndGetCurrentSize(msg.getMessage().getLength());
         } else {
@@ -109,9 +112,7 @@ public class MessageDispatchInterceptor
     @Override
     public void setOptionFlag(int flag) {
         if ( flag != Channel.SEND_OPTIONS_ASYNCHRONOUS ) {
-            log.warn("Warning, you are overriding the asynchronous option " +
-                    "flag, this will disable the Channel.SEND_OPTIONS_ASYNCHRONOUS " +
-                    "that other apps might use.");
+            log.warn(sm.getString("messageDispatchInterceptor.warning.optionflag"));
         }
         super.setOptionFlag(flag);
     }
@@ -200,19 +201,19 @@ public class MessageDispatchInterceptor
                     link.getHandler().handleCompletion(new UniqueId(msg.getUniqueId()));
                 }
             } catch ( Exception ex ) {
-                log.error("Unable to report back completed message.",ex);
+                log.error(sm.getString("messageDispatchInterceptor.completeMessage.failed"),ex);
             }
         } catch ( Exception x ) {
             ChannelException cx = null;
             if ( x instanceof ChannelException ) cx = (ChannelException)x;
             else cx = new ChannelException(x);
-            if ( log.isDebugEnabled() ) log.debug("Error while processing async message.",x);
+            if ( log.isDebugEnabled() ) log.debug(sm.getString("messageDispatchInterceptor.AsyncMessage.failed"),x);
             try {
                 if (link.getHandler() != null) {
                     link.getHandler().handleError(cx, new UniqueId(msg.getUniqueId()));
                 }
             } catch ( Exception ex ) {
-                log.error("Unable to report back error message.",ex);
+                log.error(sm.getString("messageDispatchInterceptor.errorMessage.failed"),ex);
             }
         } finally {
             addAndGetCurrentSize(-msg.getMessage().getLength());

Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/NonBlockingCoordinator.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/NonBlockingCoordinator.java?rev=1680802&r1=1680801&r2=1680802&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/NonBlockingCoordinator.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/NonBlockingCoordinator.java Thu May 21 10:14:50 2015
@@ -32,6 +32,7 @@ import org.apache.catalina.tribes.io.XBy
 import org.apache.catalina.tribes.membership.MemberImpl;
 import org.apache.catalina.tribes.membership.Membership;
 import org.apache.catalina.tribes.util.Arrays;
+import org.apache.catalina.tribes.util.StringManager;
 import org.apache.catalina.tribes.util.UUIDGenerator;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
@@ -123,6 +124,8 @@ import org.apache.juli.logging.LogFactor
 public class NonBlockingCoordinator extends ChannelInterceptorBase {
 
     private static final Log log = LogFactory.getLog(NonBlockingCoordinator.class);
+    protected static final StringManager sm =
+            StringManager.getManager(NonBlockingCoordinator.class.getPackage().getName());
 
     /**
      * header for a coordination message
@@ -267,7 +270,7 @@ public class NonBlockingCoordinator exte
                 sendElectionMsg(local, msg.getMembers()[current], msg);
                 sent = true;
             }catch ( ChannelException x  ) {
-                log.warn("Unable to send election message to:"+msg.getMembers()[current]);
+                log.warn(sm.getString("nonBlockingCoordinator.electionMessage.sendfailed", msg.getMembers()[current]));
                 current = Arrays.nextIndex(msg.getMembers()[current],msg.getMembers());
                 if ( current == next ) throw x;
             }
@@ -494,7 +497,7 @@ public class NonBlockingCoordinator exte
                 fireInterceptorEvent(new CoordinationEvent(CoordinationEvent.EVT_MSG_ARRIVE,this,"Coord Msg Arrived("+Arrays.toNameString(cmbr)+")"));
                 processCoordMessage(cmsg);
             }catch ( ChannelException x ) {
-                log.error("Error processing coordination message. Could be fatal.",x);
+                log.error(sm.getString("nonBlockingCoordinator.processCoordinationMessage.failed"),x);
             }
         } else {
             super.messageReceived(msg);
@@ -513,7 +516,7 @@ public class NonBlockingCoordinator exte
             fireInterceptorEvent(new CoordinationEvent(CoordinationEvent.EVT_MBR_ADD,this,"Member add("+member.getName()+")"));
             if (started && elect) startElection(false);
         } catch (ChannelException x) {
-            log.error("Unable to start election when member was added.",x);
+            log.error(sm.getString("nonBlockingCoordinator.memberAdded.failed"),x);
         }
     }
 
@@ -526,7 +529,7 @@ public class NonBlockingCoordinator exte
             if (started && (isCoordinator() || isHighest()))
                 startElection(true); //to do, if a member disappears, only the coordinator can start
         } catch (ChannelException x) {
-            log.error("Unable to start election when member was removed.",x);
+            log.error(sm.getString("nonBlockingCoordinator.memberDisappeared.failed"),x);
         }
     }
 
@@ -548,12 +551,12 @@ public class NonBlockingCoordinator exte
             if ( view != null && (Arrays.diff(view,membership,local).length != 0 ||  Arrays.diff(membership,view,local).length != 0) ) {
                 if ( isHighest() ) {
                     fireInterceptorEvent(new CoordinationEvent(CoordinationEvent.EVT_START_ELECT, this,
-                                                               "Heartbeat found inconsistency, restart election"));
+                            sm.getString("nonBlockingCoordinator.heartbeat.inconsistency")));
                     startElection(true);
                 }
             }
         } catch ( Exception x  ){
-            log.error("Unable to perform heartbeat.",x);
+            log.error(sm.getString("nonBlockingCoordinator.heartbeat.failed"),x);
         } finally {
             super.heartbeat();
         }

Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/OrderInterceptor.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/OrderInterceptor.java?rev=1680802&r1=1680801&r2=1680802&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/OrderInterceptor.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/OrderInterceptor.java Thu May 21 10:14:50 2015
@@ -27,6 +27,7 @@ import org.apache.catalina.tribes.Member
 import org.apache.catalina.tribes.group.ChannelInterceptorBase;
 import org.apache.catalina.tribes.group.InterceptorPayload;
 import org.apache.catalina.tribes.io.XByteBuffer;
+import org.apache.catalina.tribes.util.StringManager;
 
 
 /**
@@ -53,6 +54,8 @@ import org.apache.catalina.tribes.io.XBy
  * @version 1.1
  */
 public class OrderInterceptor extends ChannelInterceptorBase {
+    protected static final StringManager sm =
+            StringManager.getManager(OrderInterceptor.class.getPackage().getName());
     private final HashMap<Member, Counter> outcounter = new HashMap<>();
     private final HashMap<Member, Counter> incounter = new HashMap<>();
     private final HashMap<Member, MessageOrder> incoming = new HashMap<>();
@@ -292,7 +295,7 @@ public class OrderInterceptor extends Ch
                 add.next = iter;
 
             } else {
-                throw new ArithmeticException("Message added has the same counter, synchronization bug. Disable the order interceptor");
+                throw new ArithmeticException(sm.getString("orderInterceptor.messageAdded.sameCounter"));
             }
 
             return head;

Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java?rev=1680802&r1=1680801&r2=1680802&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpFailureDetector.java Thu May 21 10:14:50 2015
@@ -36,6 +36,9 @@ import org.apache.catalina.tribes.io.Cha
 import org.apache.catalina.tribes.io.XByteBuffer;
 import org.apache.catalina.tribes.membership.Membership;
 import org.apache.catalina.tribes.membership.StaticMember;
+import org.apache.catalina.tribes.util.StringManager;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
 
 /**
  * <p>Title: A perfect failure detector </p>
@@ -58,7 +61,9 @@ import org.apache.catalina.tribes.member
  */
 public class TcpFailureDetector extends ChannelInterceptorBase {
 
-    private static final org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog( TcpFailureDetector.class );
+    private static final Log log = LogFactory.getLog( TcpFailureDetector.class );
+    protected static final StringManager sm =
+            StringManager.getManager(TcpFailureDetector.class.getPackage().getName());
 
     protected static final byte[] TCP_FAIL_DETECT = new byte[] {
         79, -89, 115, 72, 121, -126, 67, -55, -97, 111, -119, -128, -95, 91, 7, 20,
@@ -143,11 +148,11 @@ public class TcpFailureDetector extends
         boolean shutdown = Arrays.equals(member.getCommand(),Member.SHUTDOWN_PAYLOAD);
         if ( !shutdown )
             if(log.isInfoEnabled())
-                log.info("Received memberDisappeared["+member+"] message. Will verify.");
+                log.info(sm.getString("tcpFailureDetector.memberDisappeared.verify", member));
         synchronized (membership) {
             if (!membership.contains(member)) {
                 if(log.isInfoEnabled())
-                    log.info("Verification complete. Member already disappeared["+member+"]");
+                    log.info(sm.getString("tcpFailureDetector.already.disappeared", member));
                 return;
             }
             //check to see if the member really is gone
@@ -167,11 +172,11 @@ public class TcpFailureDetector extends
         }
         if ( notify ) {
             if(log.isInfoEnabled())
-                log.info("Verification complete. Member disappeared["+member+"]");
+                log.info(sm.getString("tcpFailureDetector.member.disappeared", member));
             super.memberDisappeared(member);
         } else {
             if(log.isInfoEnabled())
-                log.info("Verification complete. Member still alive["+member+"]");
+                log.info(sm.getString("tcpFailureDetector.still.alive", member));
 
         }
     }
@@ -213,7 +218,7 @@ public class TcpFailureDetector extends
                 else performForcedCheck();
             }
         } catch (Exception x) {
-            log.warn("Unable to perform heartbeat on the TcpFailureDetector.",x);
+            log.warn(sm.getString("tcpFailureDetector.heartbeat.failed"),x);
         }
     }
 
@@ -249,7 +254,7 @@ public class TcpFailureDetector extends
             if (membership.memberAlive(members[i])) {
                 //we don't have this one in our membership, check to see if he/she is alive
                 if (memberAlive(members[i])) {
-                    log.warn("Member added, even though we werent notified:" + members[i]);
+                    log.warn(sm.getString("tcpFailureDetector.performBasicCheck.memberAdded", members[i]));
                     super.memberAdded(members[i]);
                 } else {
                     membership.removeMember(members[i]);
@@ -267,7 +272,7 @@ public class TcpFailureDetector extends
                 super.memberDisappeared(m);
                 removeSuspects.remove(m);
                 if(log.isInfoEnabled())
-                    log.info("Suspect member, confirmed dead.["+m+"]");
+                    log.info(sm.getString("tcpFailureDetector.suspectMember.dead", m));
             } else {
                 if (removeSuspectsTimeout > 0) {
                     long timeNow = System.currentTimeMillis();
@@ -289,7 +294,7 @@ public class TcpFailureDetector extends
                 super.memberAdded(m);
                 addSuspects.remove(m);
                 if(log.isInfoEnabled())
-                    log.info("Suspect member, confirmed alive.["+m+"]");
+                    log.info(sm.getString("tcpFailureDetector.suspectMember.alive", m));
             } //end if
         }
     }
@@ -339,7 +344,7 @@ public class TcpFailureDetector extends
         } catch (ConnectException cx) {
             //do nothing, we couldn't connect
         } catch (Exception x) {
-            log.error("Unable to perform failure detection check, assuming member down.",x);
+            log.error(sm.getString("tcpFailureDetector.failureDetection.failed"),x);
         }
         return false;
     }

Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java?rev=1680802&r1=1680801&r2=1680802&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TcpPingInterceptor.java Thu May 21 10:14:50 2015
@@ -28,6 +28,7 @@ import org.apache.catalina.tribes.Member
 import org.apache.catalina.tribes.group.ChannelInterceptorBase;
 import org.apache.catalina.tribes.io.ChannelData;
 import org.apache.catalina.tribes.io.XByteBuffer;
+import org.apache.catalina.tribes.util.StringManager;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 
@@ -42,6 +43,8 @@ import org.apache.juli.logging.LogFactor
 public class TcpPingInterceptor extends ChannelInterceptorBase {
 
     private static final Log log = LogFactory.getLog(TcpPingInterceptor.class);
+    protected static final StringManager sm =
+            StringManager.getManager(TcpPingInterceptor.class.getPackage().getName());
 
     protected static final byte[] TCP_PING_DATA = new byte[] {
         79, -89, 115, 72, 121, -33, 67, -55, -97, 111, -119, -128, -95, 91, 7, 20,
@@ -151,7 +154,7 @@ public class TcpPingInterceptor extends
         try {
             super.sendMessage(members, data, null);
         }catch (ChannelException x) {
-            log.warn("Unable to send TCP ping.",x);
+            log.warn(sm.getString("tcpPingInterceptor.ping.failed"),x);
         }
     }
 
@@ -182,7 +185,7 @@ public class TcpPingInterceptor extends
                     // In the highly unlikely event it was a different trigger,
                     // simply ignore it and continue.
                 }catch ( Exception x )  {
-                    log.warn("Unable to send ping from TCP ping thread.",x);
+                    log.warn(sm.getString("tcpPingInterceptor.pingFailed.pingThread"),x);
                 }
             }
         }

Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java?rev=1680802&r1=1680801&r2=1680802&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/ThroughputInterceptor.java Thu May 21 10:14:50 2015
@@ -27,6 +27,7 @@ import org.apache.catalina.tribes.group.
 import org.apache.catalina.tribes.group.InterceptorPayload;
 import org.apache.catalina.tribes.io.ChannelData;
 import org.apache.catalina.tribes.io.XByteBuffer;
+import org.apache.catalina.tribes.util.StringManager;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 
@@ -39,6 +40,8 @@ import org.apache.juli.logging.LogFactor
  */
 public class ThroughputInterceptor extends ChannelInterceptorBase {
     private static final Log log = LogFactory.getLog(ThroughputInterceptor.class);
+    protected static final StringManager sm =
+            StringManager.getManager(ThroughputInterceptor.class.getPackage().getName());
 
     double mbTx = 0;
     double mbAppTx = 0;
@@ -91,25 +94,12 @@ public class ThroughputInterceptor exten
     }
 
     public void report(double timeTx) {
-        StringBuilder buf = new StringBuilder("ThroughputInterceptor Report[\n\tTx Msg:");
-        buf.append(msgTxCnt).append(" messages\n\tSent:");
-        buf.append(df.format(mbTx));
-        buf.append(" MB (total)\n\tSent:");
-        buf.append(df.format(mbAppTx));
-        buf.append(" MB (application)\n\tTime:");
-        buf.append(df.format(timeTx));
-        buf.append(" seconds\n\tTx Speed:");
-        buf.append(df.format(mbTx/timeTx));
-        buf.append(" MB/sec (total)\n\tTxSpeed:");
-        buf.append(df.format(mbAppTx/timeTx));
-        buf.append(" MB/sec (application)\n\tError Msg:");
-        buf.append(msgTxErr).append("\n\tRx Msg:");
-        buf.append(msgRxCnt);
-        buf.append(" messages\n\tRx Speed:");
-        buf.append(df.format(mbRx/((System.currentTimeMillis()-rxStart)/1000)));
-        buf.append(" MB/sec (since 1st msg)\n\tReceived:");
-        buf.append(df.format(mbRx)).append(" MB]\n");
-        if ( log.isInfoEnabled() ) log.info(buf);
+        
+        if ( log.isInfoEnabled() )
+            log.info(sm.getString("throughputInterceptor.report", 
+                    msgTxCnt, df.format(mbTx), df.format(mbAppTx), df.format(timeTx), df.format(mbTx/timeTx),
+                    df.format(mbAppTx/timeTx), msgTxErr, msgRxCnt, df.format(mbRx/((System.currentTimeMillis()-rxStart)/1000)),
+                    df.format(mbRx)));
     }
 
     public void setInterval(int interval) {

Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TwoPhaseCommitInterceptor.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TwoPhaseCommitInterceptor.java?rev=1680802&r1=1680801&r2=1680802&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TwoPhaseCommitInterceptor.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/group/interceptors/TwoPhaseCommitInterceptor.java Thu May 21 10:14:50 2015
@@ -26,13 +26,18 @@ import org.apache.catalina.tribes.Unique
 import org.apache.catalina.tribes.group.ChannelInterceptorBase;
 import org.apache.catalina.tribes.group.InterceptorPayload;
 import org.apache.catalina.tribes.util.Arrays;
+import org.apache.catalina.tribes.util.StringManager;
 import org.apache.catalina.tribes.util.UUIDGenerator;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
 
 public class TwoPhaseCommitInterceptor extends ChannelInterceptorBase {
 
     private static final byte[] START_DATA = new byte[] {113, 1, -58, 2, -34, -60, 75, -78, -101, -12, 32, -29, 32, 111, -40, 4};
     private static final byte[] END_DATA = new byte[] {54, -13, 90, 110, 47, -31, 75, -24, -81, -29, 36, 52, -58, 77, -110, 56};
-    private static final org.apache.juli.logging.Log log = org.apache.juli.logging.LogFactory.getLog(TwoPhaseCommitInterceptor.class);
+    private static final Log log = LogFactory.getLog(TwoPhaseCommitInterceptor.class);
+    protected static final StringManager sm =
+            StringManager.getManager(TwoPhaseCommitInterceptor.class.getPackage().getName());
 
     protected final HashMap<UniqueId, MapEntry> messages = new HashMap<>();
     protected long expire = 1000 * 60; //one minute expiration
@@ -75,7 +80,7 @@ public class TwoPhaseCommitInterceptor e
                 if ( original != null ) {
                     super.messageReceived(original.msg);
                     messages.remove(id);
-                } else log.warn("Received a confirmation, but original message is missing. Id:"+Arrays.toString(id.getBytes()));
+                } else log.warn(sm.getString("twoPhaseCommitInterceptor.originalMessage.missing", Arrays.toString(id.getBytes())));
             } else {
                 UniqueId id = new UniqueId(msg.getUniqueId());
                 MapEntry entry = new MapEntry((ChannelMessage)msg.deepclone(),id,System.currentTimeMillis());
@@ -117,7 +122,7 @@ public class TwoPhaseCommitInterceptor e
                 }//end if
             }
         } catch ( Exception x ) {
-            log.warn("Unable to perform heartbeat on the TwoPhaseCommit interceptor.",x);
+            log.warn(sm.getString("twoPhaseCommitInterceptor.heartbeat.failed"),x);
         } finally {
             super.heartbeat();
         }

Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/io/BufferPool.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/io/BufferPool.java?rev=1680802&r1=1680801&r2=1680802&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/io/BufferPool.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/io/BufferPool.java Thu May 21 10:14:50 2015
@@ -17,6 +17,7 @@
 package org.apache.catalina.tribes.io;
 
 
+import org.apache.catalina.tribes.util.StringManager;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 
@@ -30,6 +31,9 @@ public class BufferPool {
 
     public static final int DEFAULT_POOL_SIZE = 100*1024*1024; //100MB
 
+    protected static final StringManager sm =
+            StringManager.getManager(BufferPool.class.getPackage().getName());
+
 
 
     protected static volatile BufferPool instance = null;
@@ -59,9 +63,7 @@ public class BufferPool {
                 if (instance == null) {
                    BufferPoolAPI pool = new BufferPool15Impl();
                    pool.setMaxSize(DEFAULT_POOL_SIZE);
-                   log.info("Created a buffer pool with max size:" +
-                           DEFAULT_POOL_SIZE + " bytes of type: " +
-                           pool.getClass().getName());
+                   log.info(sm.getString("bufferPool.created", DEFAULT_POOL_SIZE, pool.getClass().getName()));
                    instance = new BufferPool(pool);
                 }
             }

Added: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/io/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/io/LocalStrings.properties?rev=1680802&view=auto
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/io/LocalStrings.properties (added)
+++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/io/LocalStrings.properties Thu May 21 10:14:50 2015
@@ -0,0 +1,24 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+bufferPool.created=Created a buffer pool with max size:{0} bytes of type: {1}
+objectReader.retrieveFailed.socketReceiverBufferSize=Unable to retrieve the socket receiver buffer size, setting to default 43800 bytes.
+replicationStream.conflict=conflicting non-public interface class loaders
+xByteBuffer.size.larger.buffer=Size is larger than existing buffer.
+xByteBuffer.unableTrim=Can''t trim more bytes than are available. length:{0} trim:{1}
+xByteBuffer.discarded.invalidHeader=Discarded the package, invalid header
+xByteBuffer.no.package=No package exists in XByteBuffer
+xByteBuffer.unableCreate=Unable to create data package, buffer is too small.
+xByteBuffer.wrong.class=Message has the wrong class. It should implement Serializable, instead it is:{0}
\ No newline at end of file

Propchange: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/io/LocalStrings.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/io/ObjectReader.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/io/ObjectReader.java?rev=1680802&r1=1680801&r2=1680802&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/io/ObjectReader.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/io/ObjectReader.java Thu May 21 10:14:50 2015
@@ -22,6 +22,7 @@ import java.nio.ByteBuffer;
 import java.nio.channels.SocketChannel;
 
 import org.apache.catalina.tribes.ChannelMessage;
+import org.apache.catalina.tribes.util.StringManager;
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
 
@@ -37,6 +38,8 @@ import org.apache.juli.logging.LogFactor
 public class ObjectReader {
 
     private static final Log log = LogFactory.getLog(ObjectReader.class);
+    protected static final StringManager sm =
+            StringManager.getManager(ObjectReader.class.getPackage().getName());
 
     private XByteBuffer buffer;
 
@@ -65,7 +68,7 @@ public class ObjectReader {
             this.buffer = new XByteBuffer(socket.getReceiveBufferSize(), true);
         }catch ( IOException x ) {
             //unable to get buffer size
-            log.warn("Unable to retrieve the socket receiver buffer size, setting to default 43800 bytes.");
+            log.warn(sm.getString("objectReader.retrieveFailed.socketReceiverBufferSize"));
             this.buffer = new XByteBuffer(43800,true);
         }
     }

Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/io/ReplicationStream.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/io/ReplicationStream.java?rev=1680802&r1=1680801&r2=1680802&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/io/ReplicationStream.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/io/ReplicationStream.java Thu May 21 10:14:50 2015
@@ -25,6 +25,8 @@ import java.io.ObjectStreamClass;
 import java.lang.reflect.Modifier;
 import java.lang.reflect.Proxy;
 
+import org.apache.catalina.tribes.util.StringManager;
+
 /**
  * Custom subclass of <code>ObjectInputStream</code> that loads from the
  * class loader for this web application.  This allows classes defined only
@@ -35,6 +37,8 @@ import java.lang.reflect.Proxy;
  */
 public final class ReplicationStream extends ObjectInputStream {
 
+    protected static final StringManager sm =
+            StringManager.getManager(ReplicationStream.class.getPackage().getName());
 
     /**
      * The class loader we will use to resolve classes.
@@ -119,7 +123,7 @@ public final class ReplicationStream ext
                 if (hasNonPublicInterface) {
                     if (nonPublicLoader != cl.getClassLoader()) {
                         throw new IllegalAccessError(
-                                "conflicting non-public interface class loaders");
+                                sm.getString("replicationStream.conflict"));
                     }
                 } else {
                     nonPublicLoader = cl.getClassLoader();

Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/io/XByteBuffer.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/io/XByteBuffer.java?rev=1680802&r1=1680801&r2=1680802&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/io/XByteBuffer.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/io/XByteBuffer.java Thu May 21 10:14:50 2015
@@ -27,6 +27,10 @@ import java.io.Serializable;
 import java.nio.ByteBuffer;
 import java.util.concurrent.atomic.AtomicInteger;
 
+import org.apache.catalina.tribes.util.StringManager;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
+
 /**
  * The XByteBuffer provides a dual functionality.
  * One, it stores message bytes and automatically extends the byte buffer if needed.<BR>
@@ -46,9 +50,10 @@ import java.util.concurrent.atomic.Atomi
 public class XByteBuffer
 {
 
-    private static final org.apache.juli.logging.Log log =
-        org.apache.juli.logging.LogFactory.getLog( XByteBuffer.class );
-
+    private static final Log log = LogFactory.getLog( XByteBuffer.class );
+    protected static final StringManager sm =
+            StringManager.getManager(XByteBuffer.class.getPackage().getName());
+    
     /**
      * This is a package header, 7 bytes (FLT2002)
      */
@@ -105,13 +110,13 @@ public class XByteBuffer
     }
 
     public void setLength(int size) {
-        if ( size > buf.length ) throw new ArrayIndexOutOfBoundsException("Size is larger than existing buffer.");
+        if ( size > buf.length ) throw new ArrayIndexOutOfBoundsException(sm.getString("xByteBuffer.size.larger.buffer"));
         bufSize = size;
     }
 
     public void trim(int length) {
         if ( (bufSize - length) < 0 )
-            throw new ArrayIndexOutOfBoundsException("Can't trim more bytes than are available. length:"+bufSize+" trim:"+length);
+            throw new ArrayIndexOutOfBoundsException(sm.getString("xByteBuffer.unableTrim", bufSize, length));
         bufSize -= length;
     }
 
@@ -158,7 +163,7 @@ public class XByteBuffer
         if ( discard ) {
             if (bufSize > START_DATA.length && (firstIndexOf(buf, 0, START_DATA) == -1)) {
                 bufSize = 0;
-                log.error("Discarded the package, invalid header");
+                log.error(sm.getString("xByteBuffer.discarded.invalidHeader"));
                 return false;
             }
         }
@@ -225,7 +230,7 @@ public class XByteBuffer
         if ( discard ) {
             if (bufSize > START_DATA.length && (firstIndexOf(buf, 0, START_DATA) == -1)) {
                 bufSize = 0;
-                log.error("Discarded the package, invalid header");
+                log.error(sm.getString("xByteBuffer.discarded.invalidHeader"));
                 return false;
             }
         }
@@ -304,7 +309,7 @@ public class XByteBuffer
     public XByteBuffer extractDataPackage(boolean clearFromBuffer) {
         int psize = countPackages(true);
         if (psize == 0) {
-            throw new java.lang.IllegalStateException("No package exists in XByteBuffer");
+            throw new java.lang.IllegalStateException(sm.getString("xByteBuffer.no.package"));
         }
         int size = toInt(buf, START_DATA.length);
         XByteBuffer xbuf = BufferPool.getBufferPool().getBuffer(size,false);
@@ -350,7 +355,7 @@ public class XByteBuffer
 
     public static byte[] createDataPackage(byte[] data, int doff, int dlength, byte[] buffer, int bufoff) {
         if ( (buffer.length-bufoff) > getDataPackageLength(dlength) ) {
-            throw new ArrayIndexOutOfBoundsException("Unable to create data package, buffer is too small.");
+            throw new ArrayIndexOutOfBoundsException(sm.getString("xByteBuffer.unableCreate"));
         }
         System.arraycopy(START_DATA, 0, buffer, bufoff, START_DATA.length);
         toBytes(data.length,buffer, bufoff+START_DATA.length);
@@ -553,7 +558,7 @@ public class XByteBuffer
         } else if (message instanceof Serializable)
             return (Serializable) message;
         else {
-            throw new ClassCastException("Message has the wrong class. It should implement Serializable, instead it is:"+message.getClass().getName());
+            throw new ClassCastException(sm.getString("xByteBuffer.wrong.class", message.getClass().getName()));
         }
     }
 

Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/LocalStrings.properties
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/LocalStrings.properties?rev=1680802&r1=1680801&r2=1680802&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/LocalStrings.properties (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/LocalStrings.properties Thu May 21 10:14:50 2015
@@ -18,3 +18,35 @@ McastService.parseSoTimeout=Unable to pa
 McastService.stopFail=Unable to stop the mcast service, level: [{0}]
 McastService.payload=Unable to send payload update
 McastService.domain=Unable to send domain update
+mcastService.missing.property=McastService:Required property "{0}" is missing.
+mcastService.noStart=Multicast send is not started or enabled.
+mcastService.exceed.maxPacketSize=Packet length[{0}] exceeds max packet size of {1} bytes.
+mcastServiceImpl.bind=Attempting to bind the multicast socket to {0}:{1}
+mcastServiceImpl.bind.failed=Binding to multicast address, failed. Binding to port only.
+mcastServiceImpl.setInterface=Setting multihome multicast interface to:{0}
+mcastServiceImpl.setSoTimeout=Setting cluster mcast soTimeout to {0}
+mcastServiceImpl.setTTL=Setting cluster mcast TTL to {0}
+mcastServiceImpl.receive.running=McastService.receive already running.
+mcastServiceImpl.unable.join=Unable to join multicast group, make sure your system has multicasting enabled.
+mcastServiceImpl.send.running=McastService.send already running.
+mcastServiceImpl.invalid.startLevel=Invalid start level. Only acceptable levels are Channel.MBR_RX_SEQ and Channel.MBR_TX_SEQ
+mcastServiceImpl.waitForMembers.start=Sleeping for {0} milliseconds to establish cluster membership, start level:{1}
+mcastServiceImpl.waitForMembers.done=Done sleeping, membership established, start level:{0}
+mcastServiceImpl.invalid.stopLevel=Invalid stop level. Only acceptable levels are Channel.MBR_RX_SEQ and Channel.MBR_TX_SEQ
+mcastServiceImpl.packet.tooLong=Multicast packet received was too long, dropping package:{0}
+mcastServiceImpl.unableReceive.broadcastMessage=Unable to receive broadcast message.
+mcastServiceImpl.memberDisappeared.failed=Unable to process member disappeared message.
+mcastServiceImpl.error.receiving=Error receiving mcast package. Sleeping 500ms
+mcastServiceImpl.send.failed=Unable to send mcast message.
+mcastServiceImpl.recovery.stopFailed=Recovery thread failed to stop membership service.
+mcastServiceImpl.recovery.startFailed=Recovery thread failed to start membership service.
+mcastServiceImpl.recovery=Tribes membership, running recovery thread, multicasting is not functional.
+mcastServiceImpl.recovery.successful=Membership recovery was successful.
+mcastServiceImpl.recovery.failed=Recovery attempt {0} failed, trying again in {1} seconds
+memberImpl.invalid.package.begin=Invalid package, should start with:{0}
+memberImpl.package.small=Member package to small to validate.
+memberImpl.notEnough.bytes=Not enough bytes in member package.
+memberImpl.invalid.package.end=Invalid package, should end with:{0}
+memberImpl.unableParse.hostname=Unable to parse hostname.
+memberImpl.large.payload=Payload is to large for tribes to handle.
+staticMember.invalid.uuidLength=UUID must be exactly 16 bytes, not:{0}
\ No newline at end of file

Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/McastService.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/McastService.java?rev=1680802&r1=1680801&r2=1680802&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/McastService.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/McastService.java Thu May 21 10:14:50 2015
@@ -268,7 +268,7 @@ public class McastService implements Mem
      * @param name The property to check for
      */
     protected void hasProperty(Properties properties, String name){
-        if ( properties.getProperty(name)==null) throw new IllegalArgumentException("McastService:Required property \""+name+"\" is missing.");
+        if ( properties.getProperty(name)==null) throw new IllegalArgumentException(sm.getString("mcastService.missing.property", name));
     }
 
     /**
@@ -333,7 +333,7 @@ public class McastService implements Mem
             try {
                 soTimeout = Integer.parseInt(properties.getProperty("mcastSoTimeout"));
             } catch ( Exception x ) {
-                log.error(sm.getString("McastService.parseTTL",
+                log.error(sm.getString("McastService.parseSoTimeout",
                         properties.getProperty("mcastSoTimeout")), x);
             }
         }
@@ -483,11 +483,11 @@ public class McastService implements Mem
     @Override
     public void broadcast(ChannelMessage message) throws ChannelException {
         if (impl==null || (impl.startLevel & Channel.MBR_TX_SEQ)!=Channel.MBR_TX_SEQ )
-            throw new ChannelException("Multicast send is not started or enabled.");
+            throw new ChannelException(sm.getString("mcastService.noStart"));
 
         byte[] data = XByteBuffer.createDataPackage((ChannelData)message);
         if (data.length>McastServiceImpl.MAX_PACKET_SIZE) {
-            throw new ChannelException("Packet length["+data.length+"] exceeds max packet size of "+McastServiceImpl.MAX_PACKET_SIZE+" bytes.");
+            throw new ChannelException(sm.getString("mcastService.exceed.maxPacketSize", data.length,McastServiceImpl.MAX_PACKET_SIZE));
         }
         DatagramPacket packet = new DatagramPacket(data,0,data.length);
         try {

Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/McastServiceImpl.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/McastServiceImpl.java?rev=1680802&r1=1680801&r2=1680802&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/McastServiceImpl.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/McastServiceImpl.java Thu May 21 10:14:50 2015
@@ -37,6 +37,9 @@ import org.apache.catalina.tribes.Messag
 import org.apache.catalina.tribes.io.ChannelData;
 import org.apache.catalina.tribes.io.XByteBuffer;
 import org.apache.catalina.tribes.util.ExecutorFactory;
+import org.apache.catalina.tribes.util.StringManager;
+import org.apache.juli.logging.Log;
+import org.apache.juli.logging.LogFactory;
 
 /**
  * A <b>membership</b> implementation using simple multicast.
@@ -49,10 +52,12 @@ import org.apache.catalina.tribes.util.E
  */
 public class McastServiceImpl
 {
-    private static final org.apache.juli.logging.Log log =
-        org.apache.juli.logging.LogFactory.getLog( McastService.class );
+    private static final Log log = LogFactory.getLog( McastService.class );
 
     protected static final int MAX_PACKET_SIZE = 65535;
+
+    protected static final StringManager sm = StringManager.getManager(Constants.Package);
+
     /**
      * Internal flag used for the listen thread that listens to the multicasting socket.
      */
@@ -206,7 +211,7 @@ public class McastServiceImpl
     protected void setupSocket() throws IOException {
         if (mcastBindAddress != null) {
             try {
-                log.info("Attempting to bind the multicast socket to "+address+":"+port);
+                log.info(sm.getString("mcastServiceImpl.bind", address, port));
                 socket = new MulticastSocket(new InetSocketAddress(address,port));
             } catch (BindException e) {
                 /*
@@ -214,7 +219,7 @@ public class McastServiceImpl
                  * to the multicast address. In this case only bind to the
                  * port.
                  */
-                log.info("Binding to multicast address, failed. Binding to port only.");
+                log.info(sm.getString("mcastServiceImpl.bind.failed"));
                 socket = new MulticastSocket(port);
             }
         } else {
@@ -223,18 +228,18 @@ public class McastServiceImpl
         socket.setLoopbackMode(localLoopbackDisabled); //hint if we want disable loop back(local machine) messages
         if (mcastBindAddress != null) {
             if(log.isInfoEnabled())
-                log.info("Setting multihome multicast interface to:" +mcastBindAddress);
+                log.info(sm.getString("mcastServiceImpl.setInterface", mcastBindAddress));
             socket.setInterface(mcastBindAddress);
         } //end if
         //force a so timeout so that we don't block forever
         if ( mcastSoTimeout <= 0 ) mcastSoTimeout = (int)sendFrequency;
         if(log.isInfoEnabled())
-            log.info("Setting cluster mcast soTimeout to "+mcastSoTimeout);
+            log.info(sm.getString("mcastServiceImpl.setSoTimeout", mcastSoTimeout));
         socket.setSoTimeout(mcastSoTimeout);
 
         if ( mcastTTL >= 0 ) {
             if(log.isInfoEnabled())
-                log.info("Setting cluster mcast TTL to " + mcastTTL);
+                log.info(sm.getString("mcastServiceImpl.setTTL", mcastTTL));
             socket.setTimeToLive(mcastTTL);
         }
     }
@@ -249,11 +254,11 @@ public class McastServiceImpl
     public synchronized void start(int level) throws IOException {
         boolean valid = false;
         if ( (level & Channel.MBR_RX_SEQ)==Channel.MBR_RX_SEQ ) {
-            if ( receiver != null ) throw new IllegalStateException("McastService.receive already running.");
+            if ( receiver != null ) throw new IllegalStateException(sm.getString("mcastServiceImpl.receive.running"));
             try {
                 if ( sender == null ) socket.joinGroup(address);
             }catch (IOException iox) {
-                log.error("Unable to join multicast group, make sure your system has multicasting enabled.");
+                log.error(sm.getString("mcastServiceImpl.unable.join"));
                 throw iox;
             }
             doRunReceiver = true;
@@ -263,7 +268,7 @@ public class McastServiceImpl
             valid = true;
         }
         if ( (level & Channel.MBR_TX_SEQ)==Channel.MBR_TX_SEQ ) {
-            if ( sender != null ) throw new IllegalStateException("McastService.send already running.");
+            if ( sender != null ) throw new IllegalStateException(sm.getString("mcastServiceImpl.send.running"));
             if ( receiver == null ) socket.joinGroup(address);
             //make sure at least one packet gets out there
             send(false);
@@ -275,7 +280,7 @@ public class McastServiceImpl
             valid = true;
         }
         if (!valid) {
-            throw new IllegalArgumentException("Invalid start level. Only acceptable levels are Channel.MBR_RX_SEQ and Channel.MBR_TX_SEQ");
+            throw new IllegalArgumentException(sm.getString("mcastServiceImpl.invalid.startLevel"));
         }
         //pause, once or twice
         waitForMembers(level);
@@ -285,10 +290,10 @@ public class McastServiceImpl
     private void waitForMembers(int level) {
         long memberwait = sendFrequency*2;
         if(log.isInfoEnabled())
-            log.info("Sleeping for "+memberwait+" milliseconds to establish cluster membership, start level:"+level);
+            log.info(sm.getString("mcastServiceImpl.waitForMembers.start", memberwait, level));
         try {Thread.sleep(memberwait);}catch (InterruptedException ignore){}
         if(log.isInfoEnabled())
-            log.info("Done sleeping, membership established, start level:"+level);
+            log.info(sm.getString("mcastServiceImpl.waitForMembers.done", level));
     }
 
     /**
@@ -312,7 +317,7 @@ public class McastServiceImpl
         }
 
         if (!valid) {
-            throw new IllegalArgumentException("Invalid stop level. Only acceptable levels are Channel.MBR_RX_SEQ and Channel.MBR_TX_SEQ");
+            throw new IllegalArgumentException(sm.getString("mcastServiceImpl.invalid.stopLevel"));
         }
         startLevel = (startLevel & (~level));
         //we're shutting down, send a shutdown message and close the socket
@@ -339,7 +344,7 @@ public class McastServiceImpl
 
             socket.receive(receivePacket);
             if(receivePacket.getLength() > MAX_PACKET_SIZE) {
-                log.error("Multicast packet received was too long, dropping package:"+receivePacket.getLength());
+                log.error(sm.getString("mcastServiceImpl.packet.tooLong", receivePacket.getLength()));
             } else {
                 byte[] data = new byte[receivePacket.getLength()];
                 System.arraycopy(receivePacket.getData(), receivePacket.getOffset(), data, 0, data.length);
@@ -428,7 +433,7 @@ public class McastServiceImpl
                                 if (t instanceof VirtualMachineError) {
                                     throw (VirtualMachineError) t;
                                 }
-                                log.error("Unable to receive broadcast message.",t);
+                                log.error(sm.getString("mcastServiceImpl.unableReceive.broadcastMessage"),t);
                             }
                         }
                     }finally {
@@ -464,7 +469,7 @@ public class McastServiceImpl
                     };
                     executor.execute(t);
                 } catch (Exception x) {
-                    log.error("Unable to process member disappeared message.", x);
+                    log.error(sm.getString("mcastServiceImpl.memberDisappeared.failed"), x);
                 }
             }
         }
@@ -537,7 +542,7 @@ public class McastServiceImpl
                     if ( log.isDebugEnabled() )
                         log.debug("Invalid member mcast package.",ax);
                 } catch ( Exception x ) {
-                    if (errorCounter==0 && doRunReceiver) log.warn("Error receiving mcast package. Sleeping 500ms",x);
+                    if (errorCounter==0 && doRunReceiver) log.warn(sm.getString("mcastServiceImpl.error.receiving"),x);
                     else if (log.isDebugEnabled()) log.debug("Error receiving mcast package"+(doRunReceiver?". Sleeping 500ms":"."),x);
                     if (doRunReceiver) {
                         try { Thread.sleep(500); } catch ( Exception ignore ){}
@@ -566,7 +571,7 @@ public class McastServiceImpl
                     send(true);
                     errorCounter = 0;
                 } catch ( Exception x ) {
-                    if (errorCounter==0) log.warn("Unable to send mcast message.",x);
+                    if (errorCounter==0) log.warn(sm.getString("mcastServiceImpl.send.failed"),x);
                     else log.debug("Unable to send mcast message.",x);
                     if ( (++errorCounter)>=recoveryCounter ) {
                         errorCounter=0;
@@ -610,7 +615,7 @@ public class McastServiceImpl
                 parent.stop(Channel.MBR_RX_SEQ | Channel.MBR_TX_SEQ);
                 return true;
             } catch (Exception x) {
-                log.warn("Recovery thread failed to stop membership service.", x);
+                log.warn(sm.getString("mcastServiceImpl.recovery.stopFailed"), x);
                 return false;
             }
         }
@@ -620,7 +625,7 @@ public class McastServiceImpl
                 parent.start(Channel.MBR_RX_SEQ | Channel.MBR_TX_SEQ);
                 return true;
             } catch (Exception x) {
-                log.warn("Recovery thread failed to start membership service.", x);
+                log.warn(sm.getString("mcastServiceImpl.recovery.startFailed"), x);
                 return false;
             }
         }
@@ -631,16 +636,16 @@ public class McastServiceImpl
             try {
                 while (!success) {
                     if(log.isInfoEnabled())
-                        log.info("Tribes membership, running recovery thread, multicasting is not functional.");
+                        log.info(sm.getString("mcastServiceImpl.recovery"));
                     if (stopService() & startService()) {
                         success = true;
                         if(log.isInfoEnabled())
-                            log.info("Membership recovery was successful.");
+                            log.info(sm.getString("mcastServiceImpl.recovery.successful"));
                     }
                     try {
                         if (!success) {
                             if(log.isInfoEnabled())
-                                log.info("Recovery attempt "+(++attempt)+" failed, trying again in " +parent.recoverySleepTime+ " seconds");
+                                log.info(sm.getString("mcastServiceImpl.recovery.failed", ++attempt, parent.recoverySleepTime));
                             Thread.sleep(parent.recoverySleepTime);
                         }
                     }catch (InterruptedException ignore) {

Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/MemberImpl.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/MemberImpl.java?rev=1680802&r1=1680801&r2=1680802&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/MemberImpl.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/MemberImpl.java Thu May 21 10:14:50 2015
@@ -25,6 +25,7 @@ import java.util.Arrays;
 import org.apache.catalina.tribes.Member;
 import org.apache.catalina.tribes.io.XByteBuffer;
 import org.apache.catalina.tribes.transport.SenderState;
+import org.apache.catalina.tribes.util.StringManager;
 
 /**
  * A <b>membership</b> implementation using simple multicast.
@@ -41,6 +42,7 @@ public class MemberImpl implements Membe
 
     public static final transient byte[] TRIBES_MBR_BEGIN = new byte[] {84, 82, 73, 66, 69, 83, 45, 66, 1, 0};
     public static final transient byte[] TRIBES_MBR_END   = new byte[] {84, 82, 73, 66, 69, 83, 45, 69, 1, 0};
+    protected static final StringManager sm = StringManager.getManager(Constants.Package);
 
     /**
      * The listen host for this member
@@ -315,11 +317,11 @@ public class MemberImpl implements Membe
         int pos = offset;
 
         if (XByteBuffer.firstIndexOf(data,offset,TRIBES_MBR_BEGIN)!=pos) {
-            throw new IllegalArgumentException("Invalid package, should start with:"+org.apache.catalina.tribes.util.Arrays.toString(TRIBES_MBR_BEGIN));
+            throw new IllegalArgumentException(sm.getString("memberImpl.invalid.package.begin", org.apache.catalina.tribes.util.Arrays.toString(TRIBES_MBR_BEGIN)));
         }
 
         if ( length < (TRIBES_MBR_BEGIN.length+4) ) {
-            throw new ArrayIndexOutOfBoundsException("Member package to small to validate.");
+            throw new ArrayIndexOutOfBoundsException(sm.getString("memberImpl.package.small"));
         }
 
         pos += TRIBES_MBR_BEGIN.length;
@@ -328,12 +330,12 @@ public class MemberImpl implements Membe
         pos += 4;
 
         if ( length < (bodylength+4+TRIBES_MBR_BEGIN.length+TRIBES_MBR_END.length) ) {
-            throw new ArrayIndexOutOfBoundsException("Not enough bytes in member package.");
+            throw new ArrayIndexOutOfBoundsException(sm.getString("memberImpl.notEnough.bytes"));
         }
 
         int endpos = pos+bodylength;
         if (XByteBuffer.firstIndexOf(data,endpos,TRIBES_MBR_END)!=endpos) {
-            throw new IllegalArgumentException("Invalid package, should end with:"+org.apache.catalina.tribes.util.Arrays.toString(TRIBES_MBR_END));
+            throw new IllegalArgumentException(sm.getString("memberImpl.invalid.package.end", org.apache.catalina.tribes.util.Arrays.toString(TRIBES_MBR_END)));
         }
 
 
@@ -444,7 +446,7 @@ public class MemberImpl implements Membe
                     this.hostname = org.apache.catalina.tribes.util.Arrays.toString(host,0,host.length,true);
                 return this.hostname;
             }catch ( IOException x ) {
-                throw new RuntimeException("Unable to parse hostname.",x);
+                throw new RuntimeException(sm.getString("memberImpl.unableParse.hostname"),x);
             }
         }
     }
@@ -599,7 +601,7 @@ public class MemberImpl implements Membe
         this.payload = payload!=null?payload:new byte[0];
         if ( this.getData(true,true).length > McastServiceImpl.MAX_PACKET_SIZE ) {
             this.payload = oldpayload;
-            throw new IllegalArgumentException("Payload is to large for tribes to handle.");
+            throw new IllegalArgumentException(sm.getString("memberImpl.large.payload"));
         }
 
     }

Modified: tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/StaticMember.java
URL: http://svn.apache.org/viewvc/tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/StaticMember.java?rev=1680802&r1=1680801&r2=1680802&view=diff
==============================================================================
--- tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/StaticMember.java (original)
+++ tomcat/tc8.0.x/trunk/java/org/apache/catalina/tribes/membership/StaticMember.java Thu May 21 10:14:50 2015
@@ -59,7 +59,7 @@ public class StaticMember extends Member
      */
     public void setUniqueId(String id) {
         byte[] uuid = Arrays.fromString(id);
-        if ( uuid==null || uuid.length != 16 ) throw new RuntimeException("UUID must be exactly 16 bytes, not:"+id);
+        if ( uuid==null || uuid.length != 16 ) throw new RuntimeException(sm.getString("staticMember.invalid.uuidLength", id));
         setUniqueId(uuid);
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message