JBossWeb SVN: r2450 - in branches/JBOSSWEB_7_2_0_FINAL_BZ-1105394: src/main/java/org/apache/coyote/ajp and 1 other directories.
by jbossweb-commits@lists.jboss.org
Author: aogburn
Date: 2014-06-05 23:53:03 -0400 (Thu, 05 Jun 2014)
New Revision: 2450
Modified:
branches/JBOSSWEB_7_2_0_FINAL_BZ-1105394/
branches/JBOSSWEB_7_2_0_FINAL_BZ-1105394/src/main/java/org/apache/coyote/ajp/AjpAprProtocol.java
branches/JBOSSWEB_7_2_0_FINAL_BZ-1105394/src/main/java/org/apache/coyote/http11/Http11AprProtocol.java
branches/JBOSSWEB_7_2_0_FINAL_BZ-1105394/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java
Log:
[BZ-1105394] merge fix
Property changes on: branches/JBOSSWEB_7_2_0_FINAL_BZ-1105394
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/7.2.x:2319
Modified: branches/JBOSSWEB_7_2_0_FINAL_BZ-1105394/src/main/java/org/apache/coyote/ajp/AjpAprProtocol.java
===================================================================
--- branches/JBOSSWEB_7_2_0_FINAL_BZ-1105394/src/main/java/org/apache/coyote/ajp/AjpAprProtocol.java 2014-06-06 03:33:04 UTC (rev 2449)
+++ branches/JBOSSWEB_7_2_0_FINAL_BZ-1105394/src/main/java/org/apache/coyote/ajp/AjpAprProtocol.java 2014-06-06 03:53:03 UTC (rev 2450)
@@ -166,14 +166,14 @@
if (this.domain != null ) {
try {
tpOname = new ObjectName
- (domain + ":" + "type=ThreadPool,name=" + getName());
+ (domain + ":" + "type=ThreadPool,name=" + getJmxName());
Registry.getRegistry(null, null)
.registerComponent(endpoint, tpOname, null );
} catch (Exception e) {
CoyoteLogger.AJP_LOGGER.errorRegisteringPool(e);
}
rgOname = new ObjectName
- (domain + ":type=GlobalRequestProcessor,name=" + getName());
+ (domain + ":type=GlobalRequestProcessor,name=" + getJmxName());
Registry.getRegistry(null, null).registerComponent(cHandler.global, rgOname, null);
}
}
Modified: branches/JBOSSWEB_7_2_0_FINAL_BZ-1105394/src/main/java/org/apache/coyote/http11/Http11AprProtocol.java
===================================================================
--- branches/JBOSSWEB_7_2_0_FINAL_BZ-1105394/src/main/java/org/apache/coyote/http11/Http11AprProtocol.java 2014-06-06 03:33:04 UTC (rev 2449)
+++ branches/JBOSSWEB_7_2_0_FINAL_BZ-1105394/src/main/java/org/apache/coyote/http11/Http11AprProtocol.java 2014-06-06 03:53:03 UTC (rev 2450)
@@ -118,14 +118,14 @@
if( this.domain != null ) {
try {
tpOname=new ObjectName
- (domain + ":" + "type=ThreadPool,name=" + getName());
+ (domain + ":" + "type=ThreadPool,name=" + getJmxName());
Registry.getRegistry(null, null)
.registerComponent(endpoint, tpOname, null );
} catch (Exception e) {
CoyoteLogger.HTTP_LOGGER.errorRegisteringPool(e);
}
rgOname=new ObjectName
- (domain + ":type=GlobalRequestProcessor,name=" + getName());
+ (domain + ":type=GlobalRequestProcessor,name=" + getJmxName());
Registry.getRegistry(null, null).registerComponent
( cHandler.global, rgOname, null );
}
Modified: branches/JBOSSWEB_7_2_0_FINAL_BZ-1105394/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java
===================================================================
--- branches/JBOSSWEB_7_2_0_FINAL_BZ-1105394/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java 2014-06-06 03:33:04 UTC (rev 2449)
+++ branches/JBOSSWEB_7_2_0_FINAL_BZ-1105394/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java 2014-06-06 03:53:03 UTC (rev 2450)
@@ -129,12 +129,12 @@
if (org.apache.tomcat.util.Constants.ENABLE_MODELER) {
if (this.domain != null) {
try {
- tpOname = new ObjectName(domain + ":" + "type=ThreadPool,name=" + getName());
+ tpOname = new ObjectName(domain + ":" + "type=ThreadPool,name=" + getJmxName());
Registry.getRegistry(null, null).registerComponent(endpoint, tpOname, null);
} catch (Exception e) {
CoyoteLogger.HTTP_LOGGER.errorRegisteringPool(e);
}
- rgOname = new ObjectName(domain + ":type=GlobalRequestProcessor,name=" + getName());
+ rgOname = new ObjectName(domain + ":type=GlobalRequestProcessor,name=" + getJmxName());
Registry.getRegistry(null, null).registerComponent(cHandler.global, rgOname, null);
}
}
10 years, 7 months
JBossWeb SVN: r2449 - branches.
by jbossweb-commits@lists.jboss.org
Author: aogburn
Date: 2014-06-05 23:33:04 -0400 (Thu, 05 Jun 2014)
New Revision: 2449
Added:
branches/JBOSSWEB_7_2_0_FINAL_BZ-1105394/
Log:
[BZ-1105394] create one-off branch
10 years, 7 months
JBossWeb SVN: r2448 - in branches/7.4.x/src/main/java/org: jboss/web and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2014-06-05 17:51:29 -0400 (Thu, 05 Jun 2014)
New Revision: 2448
Modified:
branches/7.4.x/src/main/java/org/apache/tomcat/websocket/server/WsServerContainer.java
branches/7.4.x/src/main/java/org/jboss/web/WebsocketsMessages.java
Log:
Port Tomcat patch: fix again executor configuration.
Modified: branches/7.4.x/src/main/java/org/apache/tomcat/websocket/server/WsServerContainer.java
===================================================================
--- branches/7.4.x/src/main/java/org/apache/tomcat/websocket/server/WsServerContainer.java 2014-06-05 21:50:35 UTC (rev 2447)
+++ branches/7.4.x/src/main/java/org/apache/tomcat/websocket/server/WsServerContainer.java 2014-06-05 21:51:29 UTC (rev 2448)
@@ -30,6 +30,7 @@
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.LinkedBlockingQueue;
+import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
@@ -135,7 +136,6 @@
}
// Executor config
int executorCoreSize = 0;
- int executorMaxSize = 200;
long executorKeepAliveTimeSeconds = 60;
value = servletContext.getInitParameter(
Constants.EXECUTOR_CORE_SIZE_INIT_PARAM);
@@ -143,11 +143,6 @@
executorCoreSize = Integer.parseInt(value);
}
value = servletContext.getInitParameter(
- Constants.EXECUTOR_MAX_SIZE_INIT_PARAM);
- if (value != null) {
- executorMaxSize = Integer.parseInt(value);
- }
- value = servletContext.getInitParameter(
Constants.EXECUTOR_KEEPALIVETIME_SECONDS_INIT_PARAM);
if (value != null) {
executorKeepAliveTimeSeconds = Long.parseLong(value);
@@ -175,8 +170,8 @@
WsThreadFactory wsThreadFactory = new WsThreadFactory(threadGroup);
executorService = new ThreadPoolExecutor(executorCoreSize,
- executorMaxSize, executorKeepAliveTimeSeconds, TimeUnit.SECONDS,
- new LinkedBlockingQueue<Runnable>(), wsThreadFactory);
+ Integer.MAX_VALUE, executorKeepAliveTimeSeconds, TimeUnit.SECONDS,
+ new SynchronousQueue<Runnable>(), wsThreadFactory);
}
Modified: branches/7.4.x/src/main/java/org/jboss/web/WebsocketsMessages.java
===================================================================
--- branches/7.4.x/src/main/java/org/jboss/web/WebsocketsMessages.java 2014-06-05 21:50:35 UTC (rev 2447)
+++ branches/7.4.x/src/main/java/org/jboss/web/WebsocketsMessages.java 2014-06-05 21:51:29 UTC (rev 2448)
@@ -308,4 +308,7 @@
@Message(id = 8590, value = "Closing session following IO error")
String closeAfterError();
+ @Message(id = 8591, value = "Unknown scheme %s")
+ IllegalArgumentException unknownScheme(String scheme);
+
}
10 years, 7 months
JBossWeb SVN: r2447 - in branches/7.4.x/src/main/java/org/apache/tomcat/websocket: server and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2014-06-05 17:50:35 -0400 (Thu, 05 Jun 2014)
New Revision: 2447
Modified:
branches/7.4.x/src/main/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java
branches/7.4.x/src/main/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
Log:
BZ1100491: Cleanup (better looking sync).
Modified: branches/7.4.x/src/main/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java
===================================================================
--- branches/7.4.x/src/main/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java 2014-06-05 21:49:52 UTC (rev 2446)
+++ branches/7.4.x/src/main/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java 2014-06-05 21:50:35 UTC (rev 2447)
@@ -671,8 +671,7 @@
}
public void write() {
- // FIXME: this sync should be useless
- synchronized (buffer) {
+ synchronized (endpoint) {
buffer.clear();
CoderResult cr = encoder.encode(message, buffer, true);
if (cr.isError()) {
Modified: branches/7.4.x/src/main/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
===================================================================
--- branches/7.4.x/src/main/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java 2014-06-05 21:49:52 UTC (rev 2446)
+++ branches/7.4.x/src/main/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java 2014-06-05 21:50:35 UTC (rev 2447)
@@ -81,7 +81,7 @@
}
- public void onWritePossible(boolean useDispatch, boolean block) {
+ public synchronized void onWritePossible(boolean useDispatch, boolean block) {
if (buffers == null) {
// Servlet 3.1 will call the write listener once even if nothing
// was written
@@ -93,16 +93,12 @@
while (block || sos.isReady()) {
complete = true;
for (ByteBuffer buffer : buffers) {
- // FIXME: this sync should be useless, an unwanted onWritePossible
- // seems to be causing this
- synchronized (buffer) {
- if (buffer.hasRemaining()) {
- complete = false;
- sos.write(buffer.array(), buffer.arrayOffset(),
- buffer.limit());
- buffer.position(buffer.limit());
- break;
- }
+ if (buffer.hasRemaining()) {
+ complete = false;
+ sos.write(buffer.array(), buffer.arrayOffset(),
+ buffer.limit());
+ buffer.position(buffer.limit());
+ break;
}
}
if (complete) {
10 years, 7 months
JBossWeb SVN: r2446 - branches/7.4.x/src/main/java/org/apache/tomcat/websocket/server.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2014-06-05 17:49:52 -0400 (Thu, 05 Jun 2014)
New Revision: 2446
Modified:
branches/7.4.x/src/main/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java
Log:
Port patch from Tomcat: better URI handling.
Modified: branches/7.4.x/src/main/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java
===================================================================
--- branches/7.4.x/src/main/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java 2014-06-04 10:20:06 UTC (rev 2445)
+++ branches/7.4.x/src/main/java/org/apache/tomcat/websocket/server/WsHandshakeRequest.java 2014-06-05 21:49:52 UTC (rev 2446)
@@ -16,6 +16,8 @@
*/
package org.apache.tomcat.websocket.server;
+import static org.jboss.web.WebsocketsMessages.MESSAGES;
+
import java.net.URI;
import java.net.URISyntaxException;
import java.security.Principal;
@@ -54,9 +56,30 @@
httpSession = request.getSession(false);
// URI
- StringBuilder sb = new StringBuilder(request.getRequestURI());
+ // Based on request.getRequestURL() implementation
+ StringBuilder sb = new StringBuilder();
+ String scheme = request.getScheme();
+ int port = request.getServerPort();
+ if (port < 0)
+ port = 80; // Work around java.net.URL bug
+
+ if (scheme.equals("http")) {
+ sb.append("ws");
+ } else if (scheme.equals("https")) {
+ sb.append("wss");
+ } else {
+ throw MESSAGES.unknownScheme(scheme);
+ }
+ sb.append("://");
+ sb.append(request.getServerName());
+ if ((scheme.equals("http") && (port != 80))
+ || (scheme.equals("https") && (port != 443))) {
+ sb.append(':');
+ sb.append(port);
+ }
+ sb.append(request.getRequestURI());
if (queryString != null) {
- sb.append("?");
+ sb.append('?');
sb.append(queryString);
}
try {
10 years, 7 months
JBossWeb SVN: r2445 - tags.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2014-06-04 06:20:06 -0400 (Wed, 04 Jun 2014)
New Revision: 2445
Added:
tags/JBOSSWEB_7_3_2_FINAL/
Log:
Web 7.3.2
10 years, 7 months
JBossWeb SVN: r2444 - branches/7.3.x.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2014-06-04 06:19:33 -0400 (Wed, 04 Jun 2014)
New Revision: 2444
Modified:
branches/7.3.x/pom.xml
Log:
New web build.
Modified: branches/7.3.x/pom.xml
===================================================================
--- branches/7.3.x/pom.xml 2014-06-03 13:20:45 UTC (rev 2443)
+++ branches/7.3.x/pom.xml 2014-06-04 10:19:33 UTC (rev 2444)
@@ -33,7 +33,7 @@
<groupId>org.jboss.web</groupId>
<artifactId>jbossweb</artifactId>
- <version>7.3.1.Final</version>
+ <version>7.3.2.Final</version>
<name>JBoss Web</name>
<description>Servlet 3.0 container</description>
10 years, 7 months
JBossWeb SVN: r2443 - tags.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2014-06-03 09:20:45 -0400 (Tue, 03 Jun 2014)
New Revision: 2443
Added:
tags/JBOSSWEB_7_4_5_FINAL/
Log:
Web 7.4.5
10 years, 7 months
JBossWeb SVN: r2442 - branches/7.4.x.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2014-06-03 09:17:37 -0400 (Tue, 03 Jun 2014)
New Revision: 2442
Modified:
branches/7.4.x/pom.xml
Log:
Web 7.4.5
Modified: branches/7.4.x/pom.xml
===================================================================
--- branches/7.4.x/pom.xml 2014-06-03 12:16:02 UTC (rev 2441)
+++ branches/7.4.x/pom.xml 2014-06-03 13:17:37 UTC (rev 2442)
@@ -33,7 +33,7 @@
<groupId>org.jboss.web</groupId>
<artifactId>jbossweb</artifactId>
- <version>7.4.4.Final</version>
+ <version>7.4.5.Final</version>
<name>JBoss Web</name>
<description>Servlet 3.0 container</description>
10 years, 7 months
JBossWeb SVN: r2441 - branches/7.4.x/src/main/java/org/apache/coyote/http11.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2014-06-03 08:16:02 -0400 (Tue, 03 Jun 2014)
New Revision: 2441
Modified:
branches/7.4.x/src/main/java/org/apache/coyote/http11/AbstractInternalInputBuffer.java
branches/7.4.x/src/main/java/org/apache/coyote/http11/InternalNioInputBuffer.java
branches/7.4.x/src/main/java/org/apache/coyote/http11/InternalNioOutputBuffer.java
Log:
BZ1104139: Tomcat sets an infinite timeout for IO on upgraded connections, so do the same.
Modified: branches/7.4.x/src/main/java/org/apache/coyote/http11/AbstractInternalInputBuffer.java
===================================================================
--- branches/7.4.x/src/main/java/org/apache/coyote/http11/AbstractInternalInputBuffer.java 2014-06-03 11:55:52 UTC (rev 2440)
+++ branches/7.4.x/src/main/java/org/apache/coyote/http11/AbstractInternalInputBuffer.java 2014-06-03 12:16:02 UTC (rev 2441)
@@ -205,6 +205,7 @@
activeFilters[i].recycle();
}
lastActiveFilter = -1;
+ readTimeout = Integer.MAX_VALUE;
}
/**
Modified: branches/7.4.x/src/main/java/org/apache/coyote/http11/InternalNioInputBuffer.java
===================================================================
--- branches/7.4.x/src/main/java/org/apache/coyote/http11/InternalNioInputBuffer.java 2014-06-03 11:55:52 UTC (rev 2440)
+++ branches/7.4.x/src/main/java/org/apache/coyote/http11/InternalNioInputBuffer.java 2014-06-03 12:16:02 UTC (rev 2441)
@@ -197,6 +197,8 @@
bbuf.clear();
channel = null;
available = true;
+ readTimeout = (endpoint.getSoTimeout() > 0 ? endpoint.getSoTimeout()
+ : Integer.MAX_VALUE);
}
/*
Modified: branches/7.4.x/src/main/java/org/apache/coyote/http11/InternalNioOutputBuffer.java
===================================================================
--- branches/7.4.x/src/main/java/org/apache/coyote/http11/InternalNioOutputBuffer.java 2014-06-03 11:55:52 UTC (rev 2440)
+++ branches/7.4.x/src/main/java/org/apache/coyote/http11/InternalNioOutputBuffer.java 2014-06-03 12:16:02 UTC (rev 2441)
@@ -445,6 +445,7 @@
activeFilters[i].recycle();
}
lastActiveFilter = -1;
+ writeTimeout = Integer.MAX_VALUE;
}
/**
@@ -478,6 +479,8 @@
lastActiveFilter = -1;
committed = false;
finished = false;
+ writeTimeout = (endpoint.getSoTimeout() > 0 ? endpoint.getSoTimeout()
+ : Integer.MAX_VALUE);
}
/**
10 years, 7 months