Author: remy.maucherat(a)jboss.com
Date: 2012-11-19 10:40:31 -0500 (Mon, 19 Nov 2012)
New Revision: 2127
Modified:
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11AbstractProcessor.java
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProcessor.java
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java
branches/7.2.x/webapps/docs/changelog.xml
Log:
- The NIO2 connector is sensitive to my "processing" flag trick when using fake
async (= when async is used in tests
to do the same as a more classic forward). It is possible this hides a real issue, but I
don't see it right now
(however, no port to the other connectors yet).
Modified:
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11AbstractProcessor.java
===================================================================
---
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11AbstractProcessor.java 2012-11-16
12:37:27 UTC (rev 2126)
+++
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11AbstractProcessor.java 2012-11-19
15:40:31 UTC (rev 2127)
@@ -210,9 +210,9 @@
protected boolean writeNotification = false;
/**
- * Event processing.
+ * Processing.
*/
- protected boolean eventProcessing = true;
+ protected boolean processing = false;
/**
* Timeout.
@@ -483,7 +483,6 @@
readNotifications = false;
writeNotification = false;
resumeNotification = false;
- eventProcessing = true;
}
/**
@@ -1140,25 +1139,6 @@
}
/**
- * Getter for eventProcessing
- *
- * @return the eventProcessing
- */
- public boolean getEventProcessing() {
- return this.eventProcessing;
- }
-
- /**
- * Setter for the eventProcessing
- *
- * @param eventProcessing
- * the eventProcessing to set
- */
- public void setEventProcessing(boolean eventProcessing) {
- this.eventProcessing = eventProcessing;
- }
-
- /**
* Getter for timeout
*
* @return the timeout
Modified: branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProcessor.java
===================================================================
---
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProcessor.java 2012-11-16
12:37:27 UTC (rev 2126)
+++
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProcessor.java 2012-11-19
15:40:31 UTC (rev 2127)
@@ -121,14 +121,14 @@
* Mark the start of processing
*/
public void startProcessing() {
- eventProcessing = true;
+ processing = true;
}
/**
* Mark the end of processing
*/
public void endProcessing() {
- eventProcessing = false;
+ processing = false;
}
/**
@@ -415,7 +415,6 @@
recycle();
return SocketState.CLOSED;
} else {
- eventProcessing = false;
return SocketState.LONG;
}
} else {
@@ -738,7 +737,7 @@
// An event is being processed already: adding for resume will be
// done
// when the channel gets back to the poller
- if (!eventProcessing && !resumeNotification) {
+ if (!processing && !resumeNotification) {
endpoint.addEventChannel(channel, keepAliveTimeout, false, false, true, true);
}
resumeNotification = true;
@@ -753,7 +752,7 @@
// An event is being processed already: adding for write will be
// done
// when the channel gets back to the poller
- if (!eventProcessing && !writeNotification) {
+ if (!processing && !writeNotification) {
endpoint.addEventChannel(channel, timeout, false, true, false, true);
}
writeNotification = true;
Modified: branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java
===================================================================
---
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java 2012-11-16
12:37:27 UTC (rev 2126)
+++
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java 2012-11-19
15:40:31 UTC (rev 2127)
@@ -890,6 +890,7 @@
if (processor == null) {
processor = createProcessor();
}
+ processor.startProcessing();
if (proto.secure && (proto.sslImplementation != null)) {
processor.setSSLSupport(((NioJSSEImplementation)
proto.sslImplementation).getSSLSupport(channel));
@@ -936,6 +937,7 @@
// less-than-verbose logs.
CoyoteLogger.HTTP_LOGGER.socketError(e);
}
+ processor.endProcessing();
recycledProcessors.offer(processor);
return SocketState.CLOSED;
}
Modified: branches/7.2.x/webapps/docs/changelog.xml
===================================================================
--- branches/7.2.x/webapps/docs/changelog.xml 2012-11-16 12:37:27 UTC (rev 2126)
+++ branches/7.2.x/webapps/docs/changelog.xml 2012-11-19 15:40:31 UTC (rev 2127)
@@ -16,8 +16,17 @@
<body>
+<section name="JBoss Web 7.2.0.Alpha4 (remm)">
+ <subsection name="Coyote">
+ <changelog>
+ <fix>
+ Additional NIO2 event fixes. (remm)
+ </fix>
+ </changelog>
+ </subsection>
+</section>
+
<section name="JBoss Web 7.2.0.Alpha3 (remm)">
- <subsection name="General">
<subsection name="Catalina">
<changelog>
<fix>