Author: remy.maucherat(a)jboss.com
Date: 2010-12-09 05:11:51 -0500 (Thu, 09 Dec 2010)
New Revision: 1612
Modified:
branches/3.0.x/java/org/apache/coyote/Constants.java
branches/3.0.x/java/org/apache/coyote/ajp/AjpAprProtocol.java
branches/3.0.x/java/org/apache/coyote/ajp/AjpProtocol.java
branches/3.0.x/java/org/apache/coyote/http11/Http11AprProtocol.java
branches/3.0.x/java/org/apache/coyote/http11/Http11Protocol.java
branches/3.0.x/java/org/apache/naming/resources/ProxyDirContext.java
branches/3.0.x/java/org/jboss/web/rewrite/TomcatResolver.java
branches/3.0.x/webapps/docs/changelog.xml
Log:
- Add back 3 patches to 3.0.
Modified: branches/3.0.x/java/org/apache/coyote/Constants.java
===================================================================
--- branches/3.0.x/java/org/apache/coyote/Constants.java 2010-12-09 10:09:24 UTC (rev
1611)
+++ branches/3.0.x/java/org/apache/coyote/Constants.java 2010-12-09 10:11:51 UTC (rev
1612)
@@ -68,4 +68,7 @@
"org.apache.coyote.USE_CUSTOM_STATUS_MSG_IN_HEADER",
"false")).booleanValue();
+ public static final int MAX_PAUSE_WAIT =
+ Integer.valueOf(System.getProperty("org.apache.coyote.MAX_PAUSE_WAIT",
"60")).intValue();
+
}
Modified: branches/3.0.x/java/org/apache/coyote/ajp/AjpAprProtocol.java
===================================================================
--- branches/3.0.x/java/org/apache/coyote/ajp/AjpAprProtocol.java 2010-12-09 10:09:24 UTC
(rev 1611)
+++ branches/3.0.x/java/org/apache/coyote/ajp/AjpAprProtocol.java 2010-12-09 10:11:51 UTC
(rev 1612)
@@ -210,12 +210,13 @@
log.error(sm.getString("ajpprotocol.endpoint.pauseerror"), ex);
throw ex;
}
- // Wait for a while until all the processors are idle
+ // Wait for a while until all the processors are no longer processing requests
RequestInfo[] states = cHandler.global.getRequestProcessors();
int retry = 0;
boolean done = false;
- while (!done && retry < 20) {
+ while (!done && retry < org.apache.coyote.Constants.MAX_PAUSE_WAIT) {
retry++;
+ done = true;
for (int i = 0; i < states.length; i++) {
if (states[i].getStage() == org.apache.coyote.Constants.STAGE_SERVICE) {
try {
@@ -223,10 +224,10 @@
} catch (InterruptedException e) {
;
}
- continue;
+ done = false;
+ break;
}
}
- done = true;
}
if (log.isInfoEnabled())
log.info(sm.getString("ajpprotocol.pause", getName()));
Modified: branches/3.0.x/java/org/apache/coyote/ajp/AjpProtocol.java
===================================================================
--- branches/3.0.x/java/org/apache/coyote/ajp/AjpProtocol.java 2010-12-09 10:09:24 UTC
(rev 1611)
+++ branches/3.0.x/java/org/apache/coyote/ajp/AjpProtocol.java 2010-12-09 10:11:51 UTC
(rev 1612)
@@ -210,12 +210,13 @@
log.error(sm.getString("ajpprotocol.endpoint.pauseerror"), ex);
throw ex;
}
- // Wait for a while until all the processors are idle
+ // Wait for a while until all the processors are no longer processing requests
RequestInfo[] states = cHandler.global.getRequestProcessors();
int retry = 0;
boolean done = false;
- while (!done && retry < 20) {
+ while (!done && retry < org.apache.coyote.Constants.MAX_PAUSE_WAIT) {
retry++;
+ done = true;
for (int i = 0; i < states.length; i++) {
if (states[i].getStage() == org.apache.coyote.Constants.STAGE_SERVICE) {
try {
@@ -223,10 +224,10 @@
} catch (InterruptedException e) {
;
}
- continue;
+ done = false;
+ break;
}
}
- done = true;
}
if (log.isInfoEnabled())
log.info(sm.getString("ajpprotocol.pause", getName()));
Modified: branches/3.0.x/java/org/apache/coyote/http11/Http11AprProtocol.java
===================================================================
--- branches/3.0.x/java/org/apache/coyote/http11/Http11AprProtocol.java 2010-12-09
10:09:24 UTC (rev 1611)
+++ branches/3.0.x/java/org/apache/coyote/http11/Http11AprProtocol.java 2010-12-09
10:11:51 UTC (rev 1612)
@@ -158,12 +158,13 @@
log.error(sm.getString("http11protocol.endpoint.pauseerror"), ex);
throw ex;
}
- // Wait for a while until all the processors are idle
+ // Wait for a while until all the processors are no longer processing requests
RequestInfo[] states = cHandler.global.getRequestProcessors();
int retry = 0;
boolean done = false;
- while (!done && retry < 20) {
+ while (!done && retry < org.apache.coyote.Constants.MAX_PAUSE_WAIT) {
retry++;
+ done = true;
for (int i = 0; i < states.length; i++) {
if (states[i].getStage() == org.apache.coyote.Constants.STAGE_SERVICE) {
try {
@@ -171,10 +172,10 @@
} catch (InterruptedException e) {
;
}
- continue;
+ done = false;
+ break;
}
}
- done = true;
}
if(log.isInfoEnabled())
log.info(sm.getString("http11protocol.pause", getName()));
Modified: branches/3.0.x/java/org/apache/coyote/http11/Http11Protocol.java
===================================================================
--- branches/3.0.x/java/org/apache/coyote/http11/Http11Protocol.java 2010-12-09 10:09:24
UTC (rev 1611)
+++ branches/3.0.x/java/org/apache/coyote/http11/Http11Protocol.java 2010-12-09 10:11:51
UTC (rev 1612)
@@ -230,8 +230,9 @@
RequestInfo[] states = cHandler.global.getRequestProcessors();
int retry = 0;
boolean done = false;
- while (!done && retry < 20) {
+ while (!done && retry < org.apache.coyote.Constants.MAX_PAUSE_WAIT) {
retry++;
+ done = true;
for (int i = 0; i < states.length; i++) {
if (states[i].getStage() == org.apache.coyote.Constants.STAGE_SERVICE) {
try {
@@ -239,10 +240,10 @@
} catch (InterruptedException e) {
;
}
- continue;
+ done = false;
+ break;
}
}
- done = true;
}
if (log.isInfoEnabled())
log.info(sm.getString("http11protocol.pause", getName()));
Modified: branches/3.0.x/java/org/apache/naming/resources/ProxyDirContext.java
===================================================================
--- branches/3.0.x/java/org/apache/naming/resources/ProxyDirContext.java 2010-12-09
10:09:24 UTC (rev 1611)
+++ branches/3.0.x/java/org/apache/naming/resources/ProxyDirContext.java 2010-12-09
10:11:51 UTC (rev 1612)
@@ -1686,7 +1686,7 @@
if (((!entry.exists)
|| (entry.context != null)
|| ((entry.resource != null)
- && (entry.resource.getContent() != null)))
+ && (entry.resource.getContent() != null || entry.timestamp ==
Long.MAX_VALUE)))
&& (System.currentTimeMillis() < entry.timestamp)) {
return true;
}
Modified: branches/3.0.x/java/org/jboss/web/rewrite/TomcatResolver.java
===================================================================
--- branches/3.0.x/java/org/jboss/web/rewrite/TomcatResolver.java 2010-12-09 10:09:24 UTC
(rev 1611)
+++ branches/3.0.x/java/org/jboss/web/rewrite/TomcatResolver.java 2010-12-09 10:11:51 UTC
(rev 1612)
@@ -132,7 +132,8 @@
}
public String resolveEnv(String key) {
- return System.getProperty(key);
+ Object result = request.getAttribute(key);
+ return (result != null) ? result.toString() : System.getProperty(key);
}
public String resolveSsl(String key) {
Modified: branches/3.0.x/webapps/docs/changelog.xml
===================================================================
--- branches/3.0.x/webapps/docs/changelog.xml 2010-12-09 10:09:24 UTC (rev 1611)
+++ branches/3.0.x/webapps/docs/changelog.xml 2010-12-09 10:11:51 UTC (rev 1612)
@@ -16,6 +16,26 @@
<body>
+<section name="JBoss Web 3.0.0.Final (remm)">
+ <subsection name="Catalina">
+ <changelog>
+ <fix>
+ <jira>189</jira>: Overlay timestamps need special treatment. (remm)
+ </fix>
+ <fix>
+ <jira>190</jira>: The rewrite resolver should look at request
attributes. (remm)
+ </fix>
+ </changelog>
+ </subsection>
+ <subsection name="Coyote">
+ <changelog>
+ <fix>
+ <jira>186</jira>: Fix wait logic in pause() and add configuration.
(jfclere)
+ </fix>
+ </changelog>
+ </subsection>
+</section>
+
<section name="JBoss Web 3.0.0.Beta7 (remm)">
<subsection name="Genral">
<changelog>
Show replies by date