JBossWeb SVN: r2134 - in branches: 7.0.x/webapps/docs and 2 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-11-27 07:53:37 -0500 (Tue, 27 Nov 2012)
New Revision: 2134
Modified:
branches/7.0.x/java/org/apache/coyote/http11/Constants.java
branches/7.0.x/java/org/apache/coyote/http11/Http11AprProtocol.java
branches/7.0.x/java/org/apache/coyote/http11/Http11Protocol.java
branches/7.0.x/webapps/docs/sysprops.xml
branches/7.2.x/src/main/java/org/apache/coyote/http11/Constants.java
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11AprProtocol.java
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11Protocol.java
branches/7.2.x/webapps/docs/sysprops.xml
Log:
Clarify the two socket timeouts used, and add a system property for the keepalive one.
Modified: branches/7.0.x/java/org/apache/coyote/http11/Constants.java
===================================================================
--- branches/7.0.x/java/org/apache/coyote/http11/Constants.java 2012-11-23 15:03:32 UTC (rev 2133)
+++ branches/7.0.x/java/org/apache/coyote/http11/Constants.java 2012-11-27 12:53:37 UTC (rev 2134)
@@ -39,6 +39,8 @@
public static final int DEFAULT_CONNECTION_LINGER = -1;
public static final int DEFAULT_CONNECTION_TIMEOUT =
Integer.valueOf(System.getProperty("org.apache.coyote.http11.DEFAULT_CONNECTION_TIMEOUT", "60000")).intValue();
+ public static final int DEFAULT_KEEP_ALIVE_TIMEOUT =
+ Integer.valueOf(System.getProperty("org.apache.coyote.http11.DEFAULT_KEEP_ALIVE_TIMEOUT", "-1")).intValue();
public static final int DEFAULT_CONNECTION_UPLOAD_TIMEOUT = 300000;
public static final int DEFAULT_SERVER_SOCKET_TIMEOUT = 0;
public static final boolean DEFAULT_TCP_NO_DELAY = true;
Modified: branches/7.0.x/java/org/apache/coyote/http11/Http11AprProtocol.java
===================================================================
--- branches/7.0.x/java/org/apache/coyote/http11/Http11AprProtocol.java 2012-11-23 15:03:32 UTC (rev 2133)
+++ branches/7.0.x/java/org/apache/coyote/http11/Http11AprProtocol.java 2012-11-27 12:53:37 UTC (rev 2134)
@@ -71,6 +71,7 @@
setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
//setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT);
setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
+ setKeepAliveTimeout(Constants.DEFAULT_KEEP_ALIVE_TIMEOUT);
}
/** Pass config info
Modified: branches/7.0.x/java/org/apache/coyote/http11/Http11Protocol.java
===================================================================
--- branches/7.0.x/java/org/apache/coyote/http11/Http11Protocol.java 2012-11-23 15:03:32 UTC (rev 2133)
+++ branches/7.0.x/java/org/apache/coyote/http11/Http11Protocol.java 2012-11-27 12:53:37 UTC (rev 2134)
@@ -81,6 +81,7 @@
setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
//setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT);
setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
+ setKeepAliveTimeout(Constants.DEFAULT_KEEP_ALIVE_TIMEOUT);
}
Modified: branches/7.0.x/webapps/docs/sysprops.xml
===================================================================
--- branches/7.0.x/webapps/docs/sysprops.xml 2012-11-23 15:03:32 UTC (rev 2133)
+++ branches/7.0.x/webapps/docs/sysprops.xml 2012-11-27 12:53:37 UTC (rev 2134)
@@ -174,6 +174,15 @@
web server. The default value is <code>true</code>.</p>
</property>
+ <property name="org.apache.coyote.http11.DEFAULT_CONNECTION_TIMEOUT">
+ <p>Default socket timeout. The default value is <code>60000</code> ms.</p>
+ </property>
+
+ <property name="org.apache.coyote.http11.DEFAULT_KEEP_ALIVE_TIMEOUT">
+ <p>Default socket timeout for keep alive. The default value is <code>-1</code> ms,
+ which means it will use the default socket timeout.</p>
+ </property>
+
</properties>
</section>
Modified: branches/7.2.x/src/main/java/org/apache/coyote/http11/Constants.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/coyote/http11/Constants.java 2012-11-23 15:03:32 UTC (rev 2133)
+++ branches/7.2.x/src/main/java/org/apache/coyote/http11/Constants.java 2012-11-27 12:53:37 UTC (rev 2134)
@@ -39,6 +39,8 @@
public static final int DEFAULT_CONNECTION_LINGER = -1;
public static final int DEFAULT_CONNECTION_TIMEOUT =
Integer.valueOf(System.getProperty("org.apache.coyote.http11.DEFAULT_CONNECTION_TIMEOUT", "60000")).intValue();
+ public static final int DEFAULT_KEEP_ALIVE_TIMEOUT =
+ Integer.valueOf(System.getProperty("org.apache.coyote.http11.DEFAULT_KEEP_ALIVE_TIMEOUT", "-1")).intValue();
public static final int DEFAULT_CONNECTION_UPLOAD_TIMEOUT = 300000;
public static final int DEFAULT_SERVER_SOCKET_TIMEOUT = 0;
public static final boolean DEFAULT_TCP_NO_DELAY = true;
Modified: branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11AprProtocol.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11AprProtocol.java 2012-11-23 15:03:32 UTC (rev 2133)
+++ branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11AprProtocol.java 2012-11-27 12:53:37 UTC (rev 2134)
@@ -58,6 +58,7 @@
setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
//setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT);
setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
+ setKeepAliveTimeout(Constants.DEFAULT_KEEP_ALIVE_TIMEOUT);
}
/** Pass config info
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-23 15:03:32 UTC (rev 2133)
+++ branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java 2012-11-27 12:53:37 UTC (rev 2134)
@@ -63,6 +63,7 @@
setSoLinger(Constants.DEFAULT_CONNECTION_LINGER);
setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
+ setKeepAliveTimeout(Constants.DEFAULT_KEEP_ALIVE_TIMEOUT);
}
/*
Modified: branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11Protocol.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11Protocol.java 2012-11-23 15:03:32 UTC (rev 2133)
+++ branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11Protocol.java 2012-11-27 12:53:37 UTC (rev 2134)
@@ -68,6 +68,7 @@
setSoTimeout(Constants.DEFAULT_CONNECTION_TIMEOUT);
//setServerSoTimeout(Constants.DEFAULT_SERVER_SOCKET_TIMEOUT);
setTcpNoDelay(Constants.DEFAULT_TCP_NO_DELAY);
+ setKeepAliveTimeout(Constants.DEFAULT_KEEP_ALIVE_TIMEOUT);
}
Modified: branches/7.2.x/webapps/docs/sysprops.xml
===================================================================
--- branches/7.2.x/webapps/docs/sysprops.xml 2012-11-23 15:03:32 UTC (rev 2133)
+++ branches/7.2.x/webapps/docs/sysprops.xml 2012-11-27 12:53:37 UTC (rev 2134)
@@ -158,6 +158,15 @@
<code>2048</code> bytes.</p>
</property>
+ <property name="org.apache.coyote.http11.DEFAULT_CONNECTION_TIMEOUT">
+ <p>Default socket timeout. The default value is <code>60000</code> ms.</p>
+ </property>
+
+ <property name="org.apache.coyote.http11.DEFAULT_KEEP_ALIVE_TIMEOUT">
+ <p>Default socket timeout for keep alive. The default value is <code>-1</code> ms,
+ which means it will use the default socket timeout.</p>
+ </property>
+
</properties>
</section>
12 years
JBossWeb SVN: r2133 - tags.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-11-23 10:03:32 -0500 (Fri, 23 Nov 2012)
New Revision: 2133
Added:
tags/JBOSSWEB_7_2_0_ALPHA5/
Log:
Same as Web 7.2 Alpha 4
12 years, 1 month
JBossWeb SVN: r2132 - branches/7.2.x.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-11-23 10:02:58 -0500 (Fri, 23 Nov 2012)
New Revision: 2132
Modified:
branches/7.2.x/pom.xml
Log:
Oooops ...
Modified: branches/7.2.x/pom.xml
===================================================================
(Binary files differ)
12 years, 1 month
JBossWeb SVN: r2131 - tags.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-11-23 09:36:24 -0500 (Fri, 23 Nov 2012)
New Revision: 2131
Added:
tags/JBOSSWEB_7_2_0_ALPHA4/
Log:
Web 7.2 Alpha 4
12 years, 1 month
JBossWeb SVN: r2130 - in branches/7.2.x: webapps/docs and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-11-23 06:30:39 -0500 (Fri, 23 Nov 2012)
New Revision: 2130
Modified:
branches/7.2.x/src/main/java/org/apache/tomcat/util/net/jsse/NioJSSESupport.java
branches/7.2.x/src/main/java/org/apache/tomcat/util/net/jsse/SecureNioChannel.java
branches/7.2.x/webapps/docs/changelog.xml
Log:
Fix client-cert with NIO2.
Modified: branches/7.2.x/src/main/java/org/apache/tomcat/util/net/jsse/NioJSSESupport.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/tomcat/util/net/jsse/NioJSSESupport.java 2012-11-21 09:54:34 UTC (rev 2129)
+++ branches/7.2.x/src/main/java/org/apache/tomcat/util/net/jsse/NioJSSESupport.java 2012-11-23 11:30:39 UTC (rev 2130)
@@ -217,12 +217,8 @@
* @throws IOException
*/
protected void handShake() throws IOException {
- if (channel != null && channel.handshakeComplete) {
- return;
- }
-
if (channel != null) {
- channel.handshake();
+ channel.reHandshake();
}
}
}
Modified: branches/7.2.x/src/main/java/org/apache/tomcat/util/net/jsse/SecureNioChannel.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/tomcat/util/net/jsse/SecureNioChannel.java 2012-11-21 09:54:34 UTC (rev 2129)
+++ branches/7.2.x/src/main/java/org/apache/tomcat/util/net/jsse/SecureNioChannel.java 2012-11-23 11:30:39 UTC (rev 2130)
@@ -38,6 +38,7 @@
import javax.net.ssl.SSLSession;
import org.apache.tomcat.util.net.NioChannel;
+import org.jboss.web.CoyoteLogger;
/**
* {@code SecureNioChannel}
@@ -652,6 +653,15 @@
* @throws SSLException
*/
protected void reHandshake() throws SSLException {
+ if (sslEngine.getWantClientAuth()) {
+ CoyoteLogger.UTIL_LOGGER.debug("No client cert sent for want");
+ } else {
+ if (!sslEngine.getNeedClientAuth()) {
+ sslEngine.setNeedClientAuth(true);
+ } else {
+ CoyoteLogger.UTIL_LOGGER.debug("Already need client cert");
+ }
+ }
handshakeComplete = false;
handshakeStatus = sslEngine.getHandshakeStatus();
try {
Modified: branches/7.2.x/webapps/docs/changelog.xml
===================================================================
--- branches/7.2.x/webapps/docs/changelog.xml 2012-11-21 09:54:34 UTC (rev 2129)
+++ branches/7.2.x/webapps/docs/changelog.xml 2012-11-23 11:30:39 UTC (rev 2130)
@@ -29,6 +29,9 @@
<fix>
Additional NIO2 event fixes. (remm)
</fix>
+ <fix>
+ Fix NIO2 client certificate renegociation. (remm)
+ </fix>
</changelog>
</subsection>
</section>
12 years, 1 month
JBossWeb SVN: r2129 - in branches/7.2.x: src/main/java/org/jboss/web and 1 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-11-21 04:54:34 -0500 (Wed, 21 Nov 2012)
New Revision: 2129
Modified:
branches/7.2.x/src/main/java/org/apache/catalina/core/ApplicationFilterConfig.java
branches/7.2.x/src/main/java/org/apache/catalina/core/StandardContext.java
branches/7.2.x/src/main/java/org/jboss/web/CatalinaMessages.java
branches/7.2.x/webapps/docs/changelog.xml
Log:
Harmonize with other components: catch exceptions on filter destroy.
Modified: branches/7.2.x/src/main/java/org/apache/catalina/core/ApplicationFilterConfig.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/catalina/core/ApplicationFilterConfig.java 2012-11-19 18:28:07 UTC (rev 2128)
+++ branches/7.2.x/src/main/java/org/apache/catalina/core/ApplicationFilterConfig.java 2012-11-21 09:54:34 UTC (rev 2129)
@@ -462,15 +462,15 @@
if (this.filter != null)
{
- if (Globals.IS_SECURITY_ENABLED) {
- try {
+ try {
+ if (Globals.IS_SECURITY_ENABLED) {
SecurityUtil.doAsPrivilege("destroy", filter);
- } catch(java.lang.Exception ex){
- context.getLogger().error(MESSAGES.doAsPrivilegeException(), ex);
+ SecurityUtil.remove(filter);
+ } else {
+ filter.destroy();
}
- SecurityUtil.remove(filter);
- } else {
- filter.destroy();
+ } catch(java.lang.Exception ex){
+ context.getLogger().error(MESSAGES.errorDestroyingFilter(getFilterName()), ex);
}
try {
((StandardContext) context).getInstanceManager().destroyInstance(this.filter);
Modified: branches/7.2.x/src/main/java/org/apache/catalina/core/StandardContext.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/catalina/core/StandardContext.java 2012-11-19 18:28:07 UTC (rev 2128)
+++ branches/7.2.x/src/main/java/org/apache/catalina/core/StandardContext.java 2012-11-21 09:54:34 UTC (rev 2129)
@@ -3244,16 +3244,22 @@
protected boolean filterStop() {
// Release all Filter and FilterConfig instances
+ boolean ok = true;
Iterator<String> names = filterConfigs.keySet().iterator();
while (names.hasNext()) {
String name = names.next();
CatalinaLogger.CORE_LOGGER.stoppingFilter(name);
ApplicationFilterConfig filterConfig =
(ApplicationFilterConfig) filterConfigs.get(name);
- filterConfig.release();
+ try {
+ filterConfig.release();
+ } catch (Throwable t) {
+ getLogger().error(MESSAGES.errorStoppingFilter(name), t);
+ ok = false;
+ }
}
filterConfigs.clear();
- return (true);
+ return (ok);
}
Modified: branches/7.2.x/src/main/java/org/jboss/web/CatalinaMessages.java
===================================================================
--- branches/7.2.x/src/main/java/org/jboss/web/CatalinaMessages.java 2012-11-19 18:28:07 UTC (rev 2128)
+++ branches/7.2.x/src/main/java/org/jboss/web/CatalinaMessages.java 2012-11-21 09:54:34 UTC (rev 2129)
@@ -627,8 +627,8 @@
@Message(id = 244, value = "Illegal null or empty argument specified")
IllegalArgumentException invalidServletRegistrationArguments();
- @Message(id = 245, value = "Priveleged action exception")
- String doAsPrivilegeException();
+ @Message(id = 245, value = "Error destroying filter %s")
+ String errorDestroyingFilter(String filterName);
@Message(id = 246, value = "Exception processing component pre destroy")
String preDestroyException();
@@ -969,4 +969,7 @@
@Message(id = 358, value = "Message digest non initialized")
IllegalStateException uninitializedMessageDigest();
+ @Message(id = 359, value = "Exception releasing filter %s")
+ String errorStoppingFilter(String filterName);
+
}
Modified: branches/7.2.x/webapps/docs/changelog.xml
===================================================================
--- branches/7.2.x/webapps/docs/changelog.xml 2012-11-19 18:28:07 UTC (rev 2128)
+++ branches/7.2.x/webapps/docs/changelog.xml 2012-11-21 09:54:34 UTC (rev 2129)
@@ -17,6 +17,13 @@
<body>
<section name="JBoss Web 7.2.0.Alpha4 (remm)">
+ <subsection name="Catalina">
+ <changelog>
+ <fix>
+ Catch filter destroy errors. (remm)
+ </fix>
+ </changelog>
+ </subsection>
<subsection name="Coyote">
<changelog>
<fix>
12 years, 1 month
JBossWeb SVN: r2128 - in branches/7.2.x/src/main/java/org: apache/tomcat/util/net and 1 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-11-19 13:28:07 -0500 (Mon, 19 Nov 2012)
New Revision: 2128
Modified:
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java
branches/7.2.x/src/main/java/org/apache/tomcat/util/net/NioEndpoint.java
branches/7.2.x/src/main/java/org/jboss/web/CoyoteLogger.java
Log:
- Fix the new flag (oops).
- Allow adding with no events (only timeout and wait for wakeup, basically) so that real Servlet 3 async actually works.
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-19 15:40:31 UTC (rev 2127)
+++ branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java 2012-11-19 18:28:07 UTC (rev 2128)
@@ -917,6 +917,7 @@
} else {
recycledProcessors.offer(processor);
}
+ processor.endProcessing();
return state;
} catch (IOException e) {
Modified: branches/7.2.x/src/main/java/org/apache/tomcat/util/net/NioEndpoint.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/tomcat/util/net/NioEndpoint.java 2012-11-19 15:40:31 UTC (rev 2127)
+++ branches/7.2.x/src/main/java/org/apache/tomcat/util/net/NioEndpoint.java 2012-11-19 18:28:07 UTC (rev 2128)
@@ -1335,12 +1335,6 @@
} else if (info.wakeup()) {
remove(info);
// TODO
- } else {
- CoyoteLogger.UTIL_LOGGER.unknownEvent();
- remove(info);
- if (!processChannel(ch, SocketStatus.ERROR)) {
- closeChannel(ch);
- }
}
// Wake up all waiting threads
Modified: branches/7.2.x/src/main/java/org/jboss/web/CoyoteLogger.java
===================================================================
--- branches/7.2.x/src/main/java/org/jboss/web/CoyoteLogger.java 2012-11-19 15:40:31 UTC (rev 2127)
+++ branches/7.2.x/src/main/java/org/jboss/web/CoyoteLogger.java 2012-11-19 18:28:07 UTC (rev 2128)
@@ -179,9 +179,9 @@
@Message(id = 3025, value = "Error awaiting read")
void errorAwaitingRead(@Cause Throwable exception);
- @LogMessage(level = DEBUG)
- @Message(id = 3026, value = "Unknown event")
- void unknownEvent();
+ @LogMessage(level = ERROR)
+ @Message(id = 3026, value = "Error loading %s")
+ void errorLoading(Object source);
@LogMessage(level = WARN)
@Message(id = 3027, value = "Failed loading HTTP messages strings")
@@ -495,8 +495,4 @@
@Message(id = 3104, value = "Error registering MBean %s")
void errorRegisteringMbean(Object objectName, @Cause Throwable t);
- @LogMessage(level = ERROR)
- @Message(id = 3105, value = "Error loading %s")
- void errorLoading(Object source);
-
}
12 years, 1 month
JBossWeb SVN: r2127 - in branches/7.2.x: webapps/docs and 1 other directory.
by jbossweb-commits@lists.jboss.org
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>
12 years, 1 month
JBossWeb SVN: r2126 - tags.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-11-16 07:37:27 -0500 (Fri, 16 Nov 2012)
New Revision: 2126
Added:
tags/JBOSSWEB_7_2_0_ALPHA3/
Log:
Web 7.2 Alpha 3
12 years, 1 month
JBossWeb SVN: r2125 - in branches/7.2.x: webapps/docs and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-11-16 06:50:32 -0500 (Fri, 16 Nov 2012)
New Revision: 2125
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/InternalNioOutputBuffer.java
branches/7.2.x/webapps/docs/changelog.xml
Log:
- Fix setting timeout with the NIO2 connector (doh).
- Set last write when using non blocking writes (otherwise they will never stop coming, creating a loop).
The behavior (= amount of data written) looks rather similar to the APR connector now.
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-14 15:18:42 UTC (rev 2124)
+++ branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProcessor.java 2012-11-16 11:50:32 UTC (rev 2125)
@@ -853,7 +853,7 @@
} else if (actionCode == ActionCode.ACTION_EVENT_WRITE) {
// Write event
writeEvent(param);
- } else if (actionCode == ActionCode.ACTION_EVENT_WRITE) {
+ } else if (actionCode == ActionCode.ACTION_EVENT_TIMEOUT) {
// Timeout event
timeoutEvent(param);
} else if (actionCode == ActionCode.UPGRADE) {
Modified: branches/7.2.x/src/main/java/org/apache/coyote/http11/InternalNioOutputBuffer.java
===================================================================
--- branches/7.2.x/src/main/java/org/apache/coyote/http11/InternalNioOutputBuffer.java 2012-11-14 15:18:42 UTC (rev 2124)
+++ branches/7.2.x/src/main/java/org/apache/coyote/http11/InternalNioOutputBuffer.java 2012-11-16 11:50:32 UTC (rev 2125)
@@ -23,6 +23,7 @@
import java.io.IOException;
import java.nio.channels.ClosedChannelException;
import java.nio.channels.CompletionHandler;
+import java.nio.channels.WritePendingException;
import java.util.concurrent.TimeUnit;
import org.apache.coyote.ActionCode;
@@ -87,10 +88,16 @@
if (nBytes < 0) {
failed(new ClosedChannelException(), attachment);
return;
+ } else {
+ response.setLastWrite(nBytes);
}
if (bbuf.hasRemaining()) {
- attachment.write(bbuf, writeTimeout, TimeUnit.MILLISECONDS, attachment, this);
+ try {
+ attachment.write(bbuf, writeTimeout, TimeUnit.MILLISECONDS, attachment, this);
+ } catch (WritePendingException e) {
+ response.setLastWrite(0);
+ }
} else {
// Clear the buffer when all bytes are written
clearBuffer();
Modified: branches/7.2.x/webapps/docs/changelog.xml
===================================================================
--- branches/7.2.x/webapps/docs/changelog.xml 2012-11-14 15:18:42 UTC (rev 2124)
+++ branches/7.2.x/webapps/docs/changelog.xml 2012-11-16 11:50:32 UTC (rev 2125)
@@ -33,6 +33,9 @@
<fix>
<jira>250</jira>: Fix remote address, submitted by Cheng Fang. (remm)
</fix>
+ <fix>
+ Fix various issues in the NIO2 connector related to async and event. (remm)
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">
12 years, 1 month