From: markt Date: Wed, 8 Dec 2010 13:06:46 +0000 (+0000) Subject: Re-factoring in support of https://issues.apache.org/bugzilla/show_bug.cgi?id=50360 X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=7c9fcd78dc07f94c211e1d8e56b026d3bd2f535b;p=tomcat7.0 Re-factoring in support of https://issues.apache.org/bugzilla/show_bug.cgi?id=50360 Pull up stop() git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1043399 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/java/org/apache/coyote/AbstractProtocolHandler.java b/java/org/apache/coyote/AbstractProtocolHandler.java index 9c50e5368..23f5c4c22 100644 --- a/java/org/apache/coyote/AbstractProtocolHandler.java +++ b/java/org/apache/coyote/AbstractProtocolHandler.java @@ -365,13 +365,28 @@ public abstract class AbstractProtocolHandler implements ProtocolHandler, endpoint.resume(); } catch (Exception ex) { getLog().error(sm.getString("abstractProtocolHandler.actionError", - "resule", getName()), ex); + "resume", getName()), ex); throw ex; } } @Override + public final void stop() throws Exception { + try { + endpoint.stop(); + } catch (Exception ex) { + getLog().error(sm.getString("abstractProtocolHandler.action", + "Stopping"), ex); + throw ex; + } + if(getLog().isInfoEnabled()) + getLog().info(sm.getString("abstractProtocolHandler.actionError", + "stop", getName())); + } + + + @Override public final void destroy() { if(getLog().isInfoEnabled()) { getLog().info(sm.getString("abstractProtocolHandler.action", diff --git a/java/org/apache/coyote/ajp/AbstractAjpProtocol.java b/java/org/apache/coyote/ajp/AbstractAjpProtocol.java index 225e7eeef..9d0999014 100644 --- a/java/org/apache/coyote/ajp/AbstractAjpProtocol.java +++ b/java/org/apache/coyote/ajp/AbstractAjpProtocol.java @@ -71,19 +71,4 @@ public abstract class AbstractAjpProtocol extends AbstractProtocolHandler { protected String getNamePrefix() { return ("ajp"); } - - - // ------------------------------------------------------- Lifecycle methods - - @Override - public void stop() throws Exception { - try { - endpoint.stop(); - } catch (Exception ex) { - getLog().error(sm.getString("ajpprotocol.endpoint.stoperror"), ex); - throw ex; - } - if (getLog().isInfoEnabled()) - getLog().info(sm.getString("ajpprotocol.stop", getName())); - } } diff --git a/java/org/apache/coyote/ajp/LocalStrings.properties b/java/org/apache/coyote/ajp/LocalStrings.properties index ce4ad7430..f7559cb51 100644 --- a/java/org/apache/coyote/ajp/LocalStrings.properties +++ b/java/org/apache/coyote/ajp/LocalStrings.properties @@ -29,7 +29,6 @@ ajpprotocol.endpoint.stoperror=Error stopping endpoint ajpprotocol.init=Initializing Coyote AJP/1.3 on {0} ajpprotocol.proto.error=Error reading request, ignored ajpprotocol.start=Starting Coyote AJP/1.3 on {0} -ajpprotocol.stop=Stopping Coyote AJP/1.3 on {0} ajpprotocol.failedread=Socket read failed ajpprotocol.failedwrite=Socket write failed ajpprotocol.request.register=Error registering request processor in JMX diff --git a/java/org/apache/coyote/ajp/LocalStrings_es.properties b/java/org/apache/coyote/ajp/LocalStrings_es.properties index 46256fcd0..9695d669a 100644 --- a/java/org/apache/coyote/ajp/LocalStrings_es.properties +++ b/java/org/apache/coyote/ajp/LocalStrings_es.properties @@ -18,7 +18,6 @@ ajpprotocol.endpoint.starterror = Error arrancando punto final ajpprotocol.init = Inicializando Coyote AJP/1.3 en {0} ajpprotocol.proto.error = Error leyendo requerimiento, ignorado ajpprotocol.start = Arrancando Coyote AJP/1.3 en {0} -ajpprotocol.stop = Parando Coyote AJP/1.3 en {0} ajpprotocol.failedread = Fallo en lectura de Conector ajpprotocol.failedwrite = Fallo en escritura de Conector ajpprotocol.request.register = Error registrando procesador de requerimiento en JMX diff --git a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java index 88ff9da98..3b9748de0 100644 --- a/java/org/apache/coyote/http11/AbstractHttp11Protocol.java +++ b/java/org/apache/coyote/http11/AbstractHttp11Protocol.java @@ -189,20 +189,4 @@ public abstract class AbstractHttp11Protocol extends AbstractProtocolHandler { protected String getNamePrefix() { return ("http"); } - - - // ------------------------------------------------------- Lifecycle methods - - @Override - public void stop() throws Exception { - try { - endpoint.stop(); - } catch (Exception ex) { - getLog().error(sm.getString("http11protocol.endpoint.stoperror"), - ex); - throw ex; - } - if(getLog().isInfoEnabled()) - getLog().info(sm.getString("http11protocol.stop", getName())); - } } diff --git a/java/org/apache/coyote/http11/LocalStrings.properties b/java/org/apache/coyote/http11/LocalStrings.properties index e51345d68..17b330fe9 100644 --- a/java/org/apache/coyote/http11/LocalStrings.properties +++ b/java/org/apache/coyote/http11/LocalStrings.properties @@ -25,7 +25,6 @@ http11protocol.proto.socketexception.debug=SocketException reading request http11protocol.proto.socketexception.info=SocketException reading request, ignored http11protocol.socketfactory.initerror=Error initializing socket factory http11protocol.start=Starting Coyote HTTP/1.1 on {0} -http11protocol.stop=Stopping Coyote HTTP/1.1 on {0} http11processor.regexp.error=Error parsing regular expression {0} http11processor.filter.unknown=Unknown filter {0} diff --git a/java/org/apache/coyote/http11/LocalStrings_es.properties b/java/org/apache/coyote/http11/LocalStrings_es.properties index 13258c442..4e3218ca9 100644 --- a/java/org/apache/coyote/http11/LocalStrings_es.properties +++ b/java/org/apache/coyote/http11/LocalStrings_es.properties @@ -23,7 +23,6 @@ http11protocol.proto.socketexception.debug = SocketException leyendo requerimien http11protocol.proto.socketexception.info = SocketException leyendo requerimiento, ignorada http11protocol.socketfactory.initerror = Error inicializando f\u00E1brica de enchufes (sockets) http11protocol.start = Arrancando Coyote HTTP/1.1 en puerto {0} -http11protocol.stop = Parando Coyote HTTP/1.1 en puerto {0} http11processor.regexp.error = Error al analizar expresi\u00F3n regular {0} http11processor.filter.unknown = Filtro desconocido {0} diff --git a/java/org/apache/coyote/http11/LocalStrings_fr.properties b/java/org/apache/coyote/http11/LocalStrings_fr.properties index ed98dec1f..a451d43c9 100644 --- a/java/org/apache/coyote/http11/LocalStrings_fr.properties +++ b/java/org/apache/coyote/http11/LocalStrings_fr.properties @@ -23,7 +23,6 @@ http11protocol.proto.socketexception.debug=Exception "Socket" (SocketException) http11protocol.proto.socketexception.info=Exception "Socket" (SocketException) \u00e0 la lecture de la requ\u00eate, ignor\u00e9 http11protocol.socketfactory.initerror=Erreur \u00e0 l'initialisation du cr\u00e9ateur de socket (socket factory) http11protocol.start=D\u00e9marrage de Coyote HTTP/1.1 sur {0} -http11protocol.stop=Arr\u00eat de Coyote HTTP/1.1 sur {0} iib.eof.error=Fin de flux (EOF) inattendue \u00e0 la lecture sur la socket iib.requestheadertoolarge.error=L'ent\u00eate de requ\u00eate est trop important diff --git a/java/org/apache/coyote/http11/LocalStrings_ja.properties b/java/org/apache/coyote/http11/LocalStrings_ja.properties index a87cd9dec..cc71e2e59 100644 --- a/java/org/apache/coyote/http11/LocalStrings_ja.properties +++ b/java/org/apache/coyote/http11/LocalStrings_ja.properties @@ -23,7 +23,6 @@ http11protocol.proto.socketexception.debug=\u30ea\u30af\u30a8\u30b9\u30c8\u3092\ http11protocol.proto.socketexception.info=\u30ea\u30af\u30a8\u30b9\u30c8\u3092\u8aad\u307f\u8fbc\u307f\u4e2d\u306eSocketException\u3067\u3059\u304c\u3001\u7121\u8996\u3055\u308c\u307e\u3057\u305f http11protocol.socketfactory.initerror=\u30bd\u30b1\u30c3\u30c8\u30d5\u30a1\u30af\u30c8\u30ea\u3092\u521d\u671f\u5316\u4e2d\u306e\u30a8\u30e9\u30fc\u3067\u3059 http11protocol.start=Coyote HTTP/1.1\u3092 {0} \u3067\u8d77\u52d5\u3057\u307e\u3059 -http11protocol.stop=Coyote HTTP/1.1\u3092 {0} \u3067\u505c\u6b62\u3057\u307e\u3059 iib.eof.error=\u30bd\u30b1\u30c3\u30c8\u304b\u3089\u4e88\u671f\u3057\u306a\u3044EOF\u3092\u8aad\u307f\u8fbc\u307f\u307e\u3057\u305f iib.requestheadertoolarge.error=\u30ea\u30af\u30a8\u30b9\u30c8\u30d8\u30c3\u30c0\u304c\u9577\u3059\u304e\u307e\u3059