Author: kfujino Date: Mon May 18 05:10:03 2015 New Revision: 1679934 URL: http://svn.apache.org/r1679934 Log: Use StringManager to provide i18n support in the org.apache.catalina.ha.authenticator package.
Added: tomcat/trunk/java/org/apache/catalina/ha/authenticator/LocalStrings.properties (with props) Modified: tomcat/trunk/java/org/apache/catalina/ha/authenticator/ClusterSingleSignOn.java Modified: tomcat/trunk/java/org/apache/catalina/ha/authenticator/ClusterSingleSignOn.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/authenticator/ClusterSingleSignOn.java?rev=1679934&r1=1679933&r2=1679934&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/catalina/ha/authenticator/ClusterSingleSignOn.java (original) +++ tomcat/trunk/java/org/apache/catalina/ha/authenticator/ClusterSingleSignOn.java Mon May 18 05:10:03 2015 @@ -31,6 +31,7 @@ import org.apache.catalina.tribes.Channe import org.apache.catalina.tribes.tipis.AbstractReplicatedMap.MapOwner; import org.apache.catalina.tribes.tipis.ReplicatedMap; import org.apache.tomcat.util.ExceptionUtils; +import org.apache.tomcat.util.res.StringManager; /** * A <strong>Valve</strong> that supports a "single sign on" user experience on @@ -53,6 +54,8 @@ import org.apache.tomcat.util.ExceptionU */ public class ClusterSingleSignOn extends SingleSignOn implements ClusterValve, MapOwner { + private static final StringManager sm = StringManager.getManager(ClusterSingleSignOn.class); + // -------------------------------------------------------------- Properties private CatalinaCluster cluster = null; @@ -151,8 +154,7 @@ public class ClusterSingleSignOn extends } } if (cluster == null) { - throw new LifecycleException( - "There is no Cluster for ClusterSingleSignOn"); + throw new LifecycleException(sm.getString("clusterSingleSignOn.nocluster")); } ClassLoader[] cls = new ClassLoader[] { this.getClass().getClassLoader() }; @@ -164,8 +166,7 @@ public class ClusterSingleSignOn extends this.cache = cache; } catch (Throwable t) { ExceptionUtils.handleThrowable(t); - throw new LifecycleException( - "ClusterSingleSignOn exception during clusterLoad " + t); + throw new LifecycleException(sm.getString("clusterSingleSignOn.clusterLoad.fail"), t); } super.startInternal(); Added: tomcat/trunk/java/org/apache/catalina/ha/authenticator/LocalStrings.properties URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/authenticator/LocalStrings.properties?rev=1679934&view=auto ============================================================================== --- tomcat/trunk/java/org/apache/catalina/ha/authenticator/LocalStrings.properties (added) +++ tomcat/trunk/java/org/apache/catalina/ha/authenticator/LocalStrings.properties Mon May 18 05:10:03 2015 @@ -0,0 +1,17 @@ +# 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. + +clusterSingleSignOn.nocluster=There is no Cluster for ClusterSingleSignOn +clusterSingleSignOn.clusterLoad.fail=ClusterSingleSignOn exception during clusterLoad \ No newline at end of file Propchange: tomcat/trunk/java/org/apache/catalina/ha/authenticator/LocalStrings.properties ------------------------------------------------------------------------------ svn:eol-style = native --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org