You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2010/07/08 17:48:49 UTC
svn commit: r961819 - in /tomcat/trunk:
java/org/apache/catalina/connector/Connector.java webapps/docs/changelog.xml
Author: markt
Date: Thu Jul 8 15:48:48 2010
New Revision: 961819
URL: http://svn.apache.org/viewvc?rev=961819&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49503
Revert the protocol handler component of r940656. Subsequent lifecycle fixes have resolved the issues that required this change
Modified:
tomcat/trunk/java/org/apache/catalina/connector/Connector.java
tomcat/trunk/webapps/docs/changelog.xml
Modified: tomcat/trunk/java/org/apache/catalina/connector/Connector.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/Connector.java?rev=961819&r1=961818&r2=961819&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/connector/Connector.java (original)
+++ tomcat/trunk/java/org/apache/catalina/connector/Connector.java Thu Jul 8 15:48:48 2010
@@ -840,6 +840,14 @@ public class Connector extends Lifecycle
IntrospectionUtils.setProperty(protocolHandler, "jkHome",
System.getProperty("catalina.base"));
+ try {
+ protocolHandler.init();
+ } catch (Exception e) {
+ throw new LifecycleException
+ (sm.getString
+ ("coyoteConnector.protocolHandlerInitializationFailed", e));
+ }
+
onameProtocolHandler = register(protocolHandler,
createObjectNameKeyProperties("ProtocolHandler"));
@@ -860,16 +868,6 @@ public class Connector extends Lifecycle
setState(LifecycleState.STARTING);
- // Protocol handlers do not follow Lifecycle conventions.
- // protocolHandler.init() needs to wait until the connector.start()
- try {
- protocolHandler.init();
- } catch (Exception e) {
- throw new LifecycleException
- (sm.getString
- ("coyoteConnector.protocolHandlerInitializationFailed", e));
- }
-
try {
protocolHandler.start();
} catch (Exception e) {
@@ -883,7 +881,7 @@ public class Connector extends Lifecycle
("coyoteConnector.protocolHandlerStartFailed", e));
}
- // MapperListener doesn't follow Lifecycle conventions either
+ // MapperListener doesn't follow Lifecycle conventions
mapperListener.init();
}
@@ -898,17 +896,7 @@ public class Connector extends Lifecycle
setState(LifecycleState.STOPPING);
- // Protocol handlers do not follow Lifecycle conventions.
- // protocolHandler.destroy() needs to be called in connector.stop()
- try {
- protocolHandler.destroy();
- } catch (Exception e) {
- throw new LifecycleException
- (sm.getString
- ("coyoteConnector.protocolHandlerDestroyFailed", e));
- }
-
- // MapperListener doesn't follow Lifecycle conventions either
+ // MapperListener doesn't follow Lifecycle conventions
mapperListener.destroy();
}
@@ -918,6 +906,14 @@ public class Connector extends Lifecycle
unregister(onameMapper);
unregister(onameProtocolHandler);
+ try {
+ protocolHandler.destroy();
+ } catch (Exception e) {
+ throw new LifecycleException
+ (sm.getString
+ ("coyoteConnector.protocolHandlerDestroyFailed", e));
+ }
+
if (getService() != null) {
getService().removeConnector(this);
}
Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=961819&r1=961818&r2=961819&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Thu Jul 8 15:48:48 2010
@@ -80,6 +80,12 @@
guess user passwords by brute-force. (markt)
</add>
<fix>
+ <bug>49503</bug>: Make sure connectors bind to their associated ports
+ sufficiently early to allow jsvc and the
+ org.apache.catalina.startup.EXIT_ON_INIT_FAILURE system property to
+ operate correctly. (markt)
+ </fix>
+ <fix>
<bug>49525</bug>: Ensure cookies for the ROOT context have a path of /
rather than an empty string. (markt)
</fix>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org