From 8a02e9d6735d3b5ef88ac2cf2c1f11ba953d87b4 Mon Sep 17 00:00:00 2001 From: remm Date: Sat, 9 Sep 2006 21:14:11 +0000 Subject: [PATCH] - Port patch. git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@441857 13f79535-47bb-0310-9956-ffa450edef68 --- java/org/apache/catalina/core/AprLifecycleListener.java | 16 ++++++++++++++-- java/org/apache/catalina/core/LocalStrings.properties | 1 + 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/java/org/apache/catalina/core/AprLifecycleListener.java b/java/org/apache/catalina/core/AprLifecycleListener.java index be5c76ef2..0805f35a1 100644 --- a/java/org/apache/catalina/core/AprLifecycleListener.java +++ b/java/org/apache/catalina/core/AprLifecycleListener.java @@ -31,7 +31,7 @@ import org.apache.commons.logging.LogFactory; * and destroy APR. * * @author Remy Maucherat - * @version $Revision: 374878 $ $Date: 2006-02-04 16:02:39 +0100 (sam., 04 févr. 2006) $ + * @version $Revision: 441786 $ $Date: 2006-09-09 14:26:11 +0200 (sam., 09 sept. 2006) $ * @since 4.1 */ @@ -52,7 +52,8 @@ public class AprLifecycleListener protected static final int REQUIRED_MAJOR = 1; protected static final int REQUIRED_MINOR = 1; - protected static final int REQUIRED_PATCH = 4; + protected static final int REQUIRED_PATCH = 3; + protected static final int RECOMMENDED_PV = 4; // ---------------------------------------------- LifecycleListener Methods @@ -97,6 +98,17 @@ public class AprLifecycleListener + minor + "." + patch, REQUIRED_MAJOR + "." + REQUIRED_MINOR + "." + REQUIRED_PATCH)); } + if (patch < RECOMMENDED_PV) { + if (!log.isDebugEnabled()) { + log.info(sm.getString("aprListener.tcnVersion", major + "." + + minor + "." + patch, REQUIRED_MAJOR + "." + + REQUIRED_MINOR + "." + RECOMMENDED_PV)); + } else { + log.debug(sm.getString("aprListener.tcnVersion", major + "." + + minor + "." + patch, REQUIRED_MAJOR + "." + + REQUIRED_MINOR + "." + RECOMMENDED_PV)); + } + } } else if (Lifecycle.AFTER_STOP_EVENT.equals(event.getType())) { try { String methodName = "terminate"; diff --git a/java/org/apache/catalina/core/LocalStrings.properties b/java/org/apache/catalina/core/LocalStrings.properties index 86bb70295..bc9474fd5 100644 --- a/java/org/apache/catalina/core/LocalStrings.properties +++ b/java/org/apache/catalina/core/LocalStrings.properties @@ -16,6 +16,7 @@ applicationResponse.badParent=Cannot locate parent Response implementation applicationResponse.badResponse=Response is not a javax.servlet.ServletResponseWrapper aprListener.aprInit=The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: {0} aprListener.tcnInvalid=An incompatible version {0} of the Apache Tomcat Native library is installed, while Tomcat requires version {1} +aprListener.tcnVersion=An older version {0} of the Apache Tomcat Native library is installed, while Tomcat recommends version greater then {1} aprListener.aprDestroy=Failed shutdown of Apache Portable Runtime containerBase.addDefaultMapper=Exception configuring default mapper of class {0} containerBase.alreadyStarted=Container {0} has already been started -- 2.11.0