Author: kfujino
Date: Thu Apr 12 06:42:42 2012
New Revision: 1325134
URL: http://svn.apache.org/viewvc?rev=1325134&view=rev
Log:
use StringManager.
Modified:
tomcat/trunk/java/org/apache/catalina/ha/session/BackupManager.java
tomcat/trunk/java/org/apache/catalina/ha/session/LocalStrings.properties
Modified: tomcat/trunk/java/org/apache/catalina/ha/session/BackupManager.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/BackupManager.java?rev=1325134&r1=1325133&r2=1325134&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/session/BackupManager.java
(original)
+++ tomcat/trunk/java/org/apache/catalina/ha/session/BackupManager.java Thu Apr
12 06:42:42 2012
@@ -33,6 +33,7 @@ import org.apache.catalina.tribes.tipis.
import org.apache.catalina.tribes.tipis.LazyReplicatedMap;
import org.apache.juli.logging.Log;
import org.apache.juli.logging.LogFactory;
+import org.apache.tomcat.util.res.StringManager;
/**
*@author Filip Hanik
@@ -43,6 +44,11 @@ public class BackupManager extends Clust
private static final Log log = LogFactory.getLog(BackupManager.class);
+ /**
+ * The string manager for this package.
+ */
+ protected static final StringManager sm =
StringManager.getManager(Constants.Package);
+
protected static long DEFAULT_REPL_TIMEOUT = 15000;//15 seconds
/** Set to true if we don't want the sessions to expire on shutdown */
@@ -151,7 +157,7 @@ public class BackupManager extends Clust
setCluster((CatalinaCluster)cluster);
} else {
throw new LifecycleException(
- "no cluster associated with this context: " +
getName());
+ sm.getString("backupManager.noCluster",
getName()));
}
}
cluster.registerManager(this);
@@ -162,8 +168,8 @@ public class BackupManager extends Clust
map.setChannelSendOptions(mapSendOptions);
this.sessions = map;
} catch ( Exception x ) {
- log.error("Unable to start BackupManager",x);
- throw new LifecycleException("Failed to start BackupManager",x);
+ log.error(sm.getString("backupManager.startUnable", getName()),x);
+ throw new
LifecycleException(sm.getString("backupManager.startFailed", getName()),x);
}
setState(LifecycleState.STARTING);
}
@@ -189,7 +195,7 @@ public class BackupManager extends Clust
protected synchronized void stopInternal() throws LifecycleException {
if (log.isDebugEnabled())
- log.debug("Stopping");
+ log.debug(sm.getString("backupManager.stopped", getName()));
setState(LifecycleState.STOPPING);
Modified:
tomcat/trunk/java/org/apache/catalina/ha/session/LocalStrings.properties
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/ha/session/LocalStrings.properties?rev=1325134&r1=1325133&r2=1325134&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/ha/session/LocalStrings.properties
(original)
+++ tomcat/trunk/java/org/apache/catalina/ha/session/LocalStrings.properties
Thu Apr 12 06:42:42 2012
@@ -81,3 +81,7 @@ standardSession.notSerializable=Cannot s
standardSession.removeAttribute.ise=removeAttribute: Session already
invalidated
standardSession.setAttribute.namenull=setAttribute: name parameter cannot be
null
serializablePrincipal.readPrincipal.cnfe=readPrincipal: Failed to recreate
user Principal
+backupManager.noCluster=no cluster associated with this context: [{0}]
+backupManager.startUnable=Unable to start BackupManager: [{0}]
+backupManager.startFailed=Failed to start BackupManager: [{0}]
+backupManager.stopped=Manager [{0}] is stopping
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]