JBossWeb SVN: r2373 - tags.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2014-02-26 09:33:13 -0500 (Wed, 26 Feb 2014)
New Revision: 2373
Added:
tags/JBOSSWEB_7_4_0_BETA4/
Log:
Web 7.4 Beta 4
10 years, 10 months
JBossWeb SVN: r2372 - branches/7.4.x.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2014-02-26 09:28:34 -0500 (Wed, 26 Feb 2014)
New Revision: 2372
Modified:
branches/7.4.x/pom.xml
Log:
New build
Modified: branches/7.4.x/pom.xml
===================================================================
--- branches/7.4.x/pom.xml 2014-02-26 13:33:47 UTC (rev 2371)
+++ branches/7.4.x/pom.xml 2014-02-26 14:28:34 UTC (rev 2372)
@@ -33,7 +33,7 @@
<groupId>org.jboss.web</groupId>
<artifactId>jbossweb</artifactId>
- <version>7.4.0.Beta3</version>
+ <version>7.4.0.Beta4</version>
<name>JBoss Web</name>
<description>Servlet 3.0 container</description>
10 years, 10 months
JBossWeb SVN: r2371 - in branches/7.4.x/src/main/java/org: jboss/web and 1 other directory.
by jbossweb-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2014-02-26 08:33:47 -0500 (Wed, 26 Feb 2014)
New Revision: 2371
Modified:
branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11AprProtocol.java
branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java
branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11Protocol.java
branches/7.4.x/src/main/java/org/jboss/web/CoyoteLogger.java
Log:
BZ 1010497: Logger at the classname.
Modified: branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11AprProtocol.java
===================================================================
--- branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11AprProtocol.java 2014-02-25 17:12:41 UTC (rev 2370)
+++ branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11AprProtocol.java 2014-02-26 13:33:47 UTC (rev 2371)
@@ -103,10 +103,10 @@
try {
endpoint.init();
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.errorInitializingEndpoint(ex);
+ CoyoteLogger.HTTP_APR_LOGGER.errorInitializingEndpoint(ex);
throw ex;
}
- CoyoteLogger.HTTP_LOGGER.initHttpConnector(getName());
+ CoyoteLogger.HTTP_APR_LOGGER.initHttpConnector(getName());
}
@@ -122,7 +122,7 @@
Registry.getRegistry(null, null)
.registerComponent(endpoint, tpOname, null );
} catch (Exception e) {
- CoyoteLogger.HTTP_LOGGER.errorRegisteringPool(e);
+ CoyoteLogger.HTTP_APR_LOGGER.errorRegisteringPool(e);
}
rgOname=new ObjectName
(domain + ":type=GlobalRequestProcessor,name=" + getJmxName());
@@ -133,17 +133,17 @@
try {
endpoint.start();
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.errorStartingEndpoint(ex);
+ CoyoteLogger.HTTP_APR_LOGGER.errorStartingEndpoint(ex);
throw ex;
}
- CoyoteLogger.HTTP_LOGGER.startHttpConnector(getName());
+ CoyoteLogger.HTTP_APR_LOGGER.startHttpConnector(getName());
}
public void pause() throws Exception {
try {
endpoint.pause();
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.errorPausingEndpoint(ex);
+ CoyoteLogger.HTTP_APR_LOGGER.errorPausingEndpoint(ex);
throw ex;
}
canDestroy = false;
@@ -169,25 +169,25 @@
canDestroy = true;
}
}
- CoyoteLogger.HTTP_LOGGER.pauseHttpConnector(getName());
+ CoyoteLogger.HTTP_APR_LOGGER.pauseHttpConnector(getName());
}
public void resume() throws Exception {
try {
endpoint.resume();
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.errorResumingEndpoint(ex);
+ CoyoteLogger.HTTP_APR_LOGGER.errorResumingEndpoint(ex);
throw ex;
}
- CoyoteLogger.HTTP_LOGGER.resumeHttpConnector(getName());
+ CoyoteLogger.HTTP_APR_LOGGER.resumeHttpConnector(getName());
}
public void destroy() throws Exception {
- CoyoteLogger.HTTP_LOGGER.stopHttpConnector(getName());
+ CoyoteLogger.HTTP_APR_LOGGER.stopHttpConnector(getName());
if (canDestroy) {
endpoint.destroy();
} else {
- CoyoteLogger.HTTP_LOGGER.cannotDestroyHttpProtocol(getName());
+ CoyoteLogger.HTTP_APR_LOGGER.cannotDestroyHttpProtocol(getName());
try {
RequestInfo[] states = cHandler.global.getRequestProcessors();
for (int i = 0; i < states.length; i++) {
@@ -196,7 +196,7 @@
}
}
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.cannotDestroyHttpProtocolWithException(getName(), ex);
+ CoyoteLogger.HTTP_APR_LOGGER.cannotDestroyHttpProtocolWithException(getName(), ex);
throw ex;
}
}
@@ -565,10 +565,10 @@
state = result.event(status);
} catch (java.net.SocketException e) {
// SocketExceptions are normal
- CoyoteLogger.HTTP_LOGGER.socketException(e);
+ CoyoteLogger.HTTP_APR_LOGGER.socketException(e);
} catch (java.io.IOException e) {
// IOExceptions are normal
- CoyoteLogger.HTTP_LOGGER.socketException(e);
+ CoyoteLogger.HTTP_APR_LOGGER.socketException(e);
}
// Future developers: if you discover any other
// rare-but-nonfatal exceptions, catch them here, and log as
@@ -577,7 +577,7 @@
// any other exception or error is odd. Here we log it
// with "ERROR" level, so it will show up even on
// less-than-verbose logs.
- CoyoteLogger.HTTP_LOGGER.socketError(e);
+ CoyoteLogger.HTTP_APR_LOGGER.socketError(e);
} finally {
if (state != SocketState.LONG) {
connections.remove(socket);
@@ -624,10 +624,10 @@
} catch (java.net.SocketException e) {
// SocketExceptions are normal
- CoyoteLogger.HTTP_LOGGER.socketException(e);
+ CoyoteLogger.HTTP_APR_LOGGER.socketException(e);
} catch (java.io.IOException e) {
// IOExceptions are normal
- CoyoteLogger.HTTP_LOGGER.socketException(e);
+ CoyoteLogger.HTTP_APR_LOGGER.socketException(e);
}
// Future developers: if you discover any other
// rare-but-nonfatal exceptions, catch them here, and log as
@@ -636,7 +636,7 @@
// any other exception or error is odd. Here we log it
// with "ERROR" level, so it will show up even on
// less-than-verbose logs.
- CoyoteLogger.HTTP_LOGGER.socketError(e);
+ CoyoteLogger.HTTP_APR_LOGGER.socketError(e);
}
recycledProcessors.offer(processor);
return SocketState.CLOSED;
@@ -674,7 +674,7 @@
Registry.getRegistry(null, null).registerComponent(rp, rpName, null);
rp.setRpName(rpName);
} catch (Exception e) {
- CoyoteLogger.HTTP_LOGGER.errorRegisteringRequest(e);
+ CoyoteLogger.HTTP_APR_LOGGER.errorRegisteringRequest(e);
}
}
}
@@ -690,7 +690,7 @@
Registry.getRegistry(null, null).unregisterComponent(rpName);
rp.setRpName(null);
} catch (Exception e) {
- CoyoteLogger.HTTP_LOGGER.errorUnregisteringRequest(e);
+ CoyoteLogger.HTTP_APR_LOGGER.errorUnregisteringRequest(e);
}
}
}
Modified: branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java
===================================================================
--- branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java 2014-02-25 17:12:41 UTC (rev 2370)
+++ branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java 2014-02-26 13:33:47 UTC (rev 2371)
@@ -95,7 +95,7 @@
endpoint.setServerSocketChannelFactory(socketFactory);
}
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.errorInitializingSocketFactory(ex);
+ CoyoteLogger.HTTP_NIO_LOGGER.errorInitializingSocketFactory(ex);
throw ex;
}
@@ -112,11 +112,11 @@
// endpoint.setKeepAliveTimeout(this.timeout);
endpoint.init();
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.errorInitializingEndpoint(ex);
+ CoyoteLogger.HTTP_NIO_LOGGER.errorInitializingEndpoint(ex);
throw ex;
}
- CoyoteLogger.HTTP_LOGGER.initHttpConnector(getName());
+ CoyoteLogger.HTTP_NIO_LOGGER.initHttpConnector(getName());
}
/*
@@ -132,7 +132,7 @@
tpOname = new ObjectName(domain + ":" + "type=ThreadPool,name=" + getJmxName());
Registry.getRegistry(null, null).registerComponent(endpoint, tpOname, null);
} catch (Exception e) {
- CoyoteLogger.HTTP_LOGGER.errorRegisteringPool(e);
+ CoyoteLogger.HTTP_NIO_LOGGER.errorRegisteringPool(e);
}
rgOname = new ObjectName(domain + ":type=GlobalRequestProcessor,name=" + getJmxName());
Registry.getRegistry(null, null).registerComponent(cHandler.global, rgOname, null);
@@ -141,10 +141,10 @@
try {
endpoint.start();
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.errorStartingEndpoint(ex);
+ CoyoteLogger.HTTP_NIO_LOGGER.errorStartingEndpoint(ex);
throw ex;
}
- CoyoteLogger.HTTP_LOGGER.startHttpConnector(getName());
+ CoyoteLogger.HTTP_NIO_LOGGER.startHttpConnector(getName());
}
/*
@@ -157,7 +157,7 @@
try {
endpoint.pause();
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.errorPausingEndpoint(ex);
+ CoyoteLogger.HTTP_NIO_LOGGER.errorPausingEndpoint(ex);
throw ex;
}
canDestroy = false;
@@ -183,7 +183,7 @@
canDestroy = true;
}
}
- CoyoteLogger.HTTP_LOGGER.pauseHttpConnector(getName());
+ CoyoteLogger.HTTP_NIO_LOGGER.pauseHttpConnector(getName());
}
/*
@@ -196,10 +196,10 @@
try {
endpoint.resume();
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.errorResumingEndpoint(ex);
+ CoyoteLogger.HTTP_NIO_LOGGER.errorResumingEndpoint(ex);
throw ex;
}
- CoyoteLogger.HTTP_LOGGER.resumeHttpConnector(getName());
+ CoyoteLogger.HTTP_NIO_LOGGER.resumeHttpConnector(getName());
}
/*
@@ -209,11 +209,11 @@
*/
@Override
public void destroy() throws Exception {
- CoyoteLogger.HTTP_LOGGER.stopHttpConnector(getName());
+ CoyoteLogger.HTTP_NIO_LOGGER.stopHttpConnector(getName());
if (canDestroy) {
endpoint.destroy();
} else {
- CoyoteLogger.HTTP_LOGGER.cannotDestroyHttpProtocol(getName());
+ CoyoteLogger.HTTP_NIO_LOGGER.cannotDestroyHttpProtocol(getName());
try {
RequestInfo[] states = cHandler.global.getRequestProcessors();
for (int i = 0; i < states.length; i++) {
@@ -222,7 +222,7 @@
}
}
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.cannotDestroyHttpProtocolWithException(getName(), ex);
+ CoyoteLogger.HTTP_NIO_LOGGER.cannotDestroyHttpProtocolWithException(getName(), ex);
throw ex;
}
}
@@ -818,10 +818,10 @@
state = processor.event(status);
} catch (java.net.SocketException e) {
// SocketExceptions are normal
- CoyoteLogger.HTTP_LOGGER.socketException(e);
+ CoyoteLogger.HTTP_NIO_LOGGER.socketException(e);
} catch (java.io.IOException e) {
// IOExceptions are normal
- CoyoteLogger.HTTP_LOGGER.socketException(e);
+ CoyoteLogger.HTTP_NIO_LOGGER.socketException(e);
}
// Future developers: if you discover any other
// rare-but-nonfatal exceptions, catch them here, and log as
@@ -830,7 +830,7 @@
// any other exception or error is odd. Here we log it
// with "ERROR" level, so it will show up even on
// less-than-verbose logs.
- CoyoteLogger.HTTP_LOGGER.socketError(e);
+ CoyoteLogger.HTTP_NIO_LOGGER.socketError(e);
} finally {
if (state != SocketState.LONG) {
connections.remove(channel.getId());
@@ -937,10 +937,10 @@
} catch (IOException e) {
if (e instanceof java.net.SocketException) {
// SocketExceptions are normal
- CoyoteLogger.HTTP_LOGGER.socketException(e);
+ CoyoteLogger.HTTP_NIO_LOGGER.socketException(e);
} else {
// IOExceptions are normal
- CoyoteLogger.HTTP_LOGGER.socketException(e);
+ CoyoteLogger.HTTP_NIO_LOGGER.socketException(e);
}
}
// Future developers: if you discover any other
@@ -950,7 +950,7 @@
// any other exception or error is odd. Here we log it
// with "ERROR" level, so it will show up even on
// less-than-verbose logs.
- CoyoteLogger.HTTP_LOGGER.socketError(e);
+ CoyoteLogger.HTTP_NIO_LOGGER.socketError(e);
}
processor.endProcessing();
recycledProcessors.offer(processor);
@@ -994,7 +994,7 @@
Registry.getRegistry(null, null).registerComponent(rp, rpName, null);
rp.setRpName(rpName);
} catch (Exception e) {
- CoyoteLogger.HTTP_LOGGER.errorRegisteringRequest(e);
+ CoyoteLogger.HTTP_NIO_LOGGER.errorRegisteringRequest(e);
}
}
}
@@ -1013,7 +1013,7 @@
Registry.getRegistry(null, null).unregisterComponent(rpName);
rp.setRpName(null);
} catch (Exception e) {
- CoyoteLogger.HTTP_LOGGER.errorUnregisteringRequest(e);
+ CoyoteLogger.HTTP_NIO_LOGGER.errorUnregisteringRequest(e);
}
}
}
Modified: branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11Protocol.java
===================================================================
--- branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11Protocol.java 2014-02-25 17:12:41 UTC (rev 2370)
+++ branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11Protocol.java 2014-02-26 13:33:47 UTC (rev 2371)
@@ -157,7 +157,7 @@
endpoint.setServerSocketFactory(socketFactory);
}
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.errorInitializingSocketFactory(ex);
+ CoyoteLogger.HTTP_BIO_LOGGER.errorInitializingSocketFactory(ex);
throw ex;
}
@@ -173,10 +173,10 @@
try {
endpoint.init();
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.errorInitializingEndpoint(ex);
+ CoyoteLogger.HTTP_BIO_LOGGER.errorInitializingEndpoint(ex);
throw ex;
}
- CoyoteLogger.HTTP_LOGGER.initHttpConnector(getName());
+ CoyoteLogger.HTTP_BIO_LOGGER.initHttpConnector(getName());
}
@@ -189,7 +189,7 @@
Registry.getRegistry(null, null)
.registerComponent(endpoint, tpOname, null );
} catch (Exception e) {
- CoyoteLogger.HTTP_LOGGER.errorRegisteringPool(e);
+ CoyoteLogger.HTTP_BIO_LOGGER.errorRegisteringPool(e);
}
rgOname=new ObjectName
(domain + ":type=GlobalRequestProcessor,name=" + getJmxName());
@@ -200,17 +200,17 @@
try {
endpoint.start();
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.errorStartingEndpoint(ex);
+ CoyoteLogger.HTTP_BIO_LOGGER.errorStartingEndpoint(ex);
throw ex;
}
- CoyoteLogger.HTTP_LOGGER.startHttpConnector(getName());
+ CoyoteLogger.HTTP_BIO_LOGGER.startHttpConnector(getName());
}
public void pause() throws Exception {
try {
endpoint.pause();
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.errorPausingEndpoint(ex);
+ CoyoteLogger.HTTP_BIO_LOGGER.errorPausingEndpoint(ex);
throw ex;
}
// Wait for a while until all the processors are no longer processing requests
@@ -232,21 +232,21 @@
}
}
}
- CoyoteLogger.HTTP_LOGGER.pauseHttpConnector(getName());
+ CoyoteLogger.HTTP_BIO_LOGGER.pauseHttpConnector(getName());
}
public void resume() throws Exception {
try {
endpoint.resume();
} catch (Exception ex) {
- CoyoteLogger.HTTP_LOGGER.errorResumingEndpoint(ex);
+ CoyoteLogger.HTTP_BIO_LOGGER.errorResumingEndpoint(ex);
throw ex;
}
- CoyoteLogger.HTTP_LOGGER.resumeHttpConnector(getName());
+ CoyoteLogger.HTTP_BIO_LOGGER.resumeHttpConnector(getName());
}
public void destroy() throws Exception {
- CoyoteLogger.HTTP_LOGGER.stopHttpConnector(getName());
+ CoyoteLogger.HTTP_BIO_LOGGER.stopHttpConnector(getName());
endpoint.destroy();
if (org.apache.tomcat.util.Constants.ENABLE_MODELER) {
if (tpOname!=null)
@@ -606,10 +606,10 @@
state = result.event(status);
} catch (java.net.SocketException e) {
// SocketExceptions are normal
- CoyoteLogger.HTTP_LOGGER.socketException(e);
+ CoyoteLogger.HTTP_BIO_LOGGER.socketException(e);
} catch (java.io.IOException e) {
// IOExceptions are normal
- CoyoteLogger.HTTP_LOGGER.socketException(e);
+ CoyoteLogger.HTTP_BIO_LOGGER.socketException(e);
}
// Future developers: if you discover any other
// rare-but-nonfatal exceptions, catch them here, and log as
@@ -618,7 +618,7 @@
// any other exception or error is odd. Here we log it
// with "ERROR" level, so it will show up even on
// less-than-verbose logs.
- CoyoteLogger.HTTP_LOGGER.socketError(e);
+ CoyoteLogger.HTTP_BIO_LOGGER.socketError(e);
} finally {
if (state != SocketState.LONG) {
connections.remove(socket);
@@ -665,10 +665,10 @@
} catch(java.net.SocketException e) {
// SocketExceptions are normal
- CoyoteLogger.HTTP_LOGGER.socketException(e);
+ CoyoteLogger.HTTP_BIO_LOGGER.socketException(e);
} catch (java.io.IOException e) {
// IOExceptions are normal
- CoyoteLogger.HTTP_LOGGER.socketException(e);
+ CoyoteLogger.HTTP_BIO_LOGGER.socketException(e);
}
// Future developers: if you discover any other
// rare-but-nonfatal exceptions, catch them here, and log as
@@ -677,7 +677,7 @@
// any other exception or error is odd. Here we log it
// with "ERROR" level, so it will show up even on
// less-than-verbose logs.
- CoyoteLogger.HTTP_LOGGER.socketError(e);
+ CoyoteLogger.HTTP_BIO_LOGGER.socketError(e);
}
recycledProcessors.offer(processor);
return SocketState.CLOSED;
@@ -716,7 +716,7 @@
Registry.getRegistry(null, null).registerComponent(rp, rpName, null);
rp.setRpName(rpName);
} catch (Exception e) {
- CoyoteLogger.HTTP_LOGGER.errorRegisteringRequest(e);
+ CoyoteLogger.HTTP_BIO_LOGGER.errorRegisteringRequest(e);
}
}
}
@@ -732,7 +732,7 @@
Registry.getRegistry(null, null).unregisterComponent(rpName);
rp.setRpName(null);
} catch (Exception e) {
- CoyoteLogger.HTTP_LOGGER.errorUnregisteringRequest(e);
+ CoyoteLogger.HTTP_BIO_LOGGER.errorUnregisteringRequest(e);
}
}
}
Modified: branches/7.4.x/src/main/java/org/jboss/web/CoyoteLogger.java
===================================================================
--- branches/7.4.x/src/main/java/org/jboss/web/CoyoteLogger.java 2014-02-25 17:12:41 UTC (rev 2370)
+++ branches/7.4.x/src/main/java/org/jboss/web/CoyoteLogger.java 2014-02-26 13:33:47 UTC (rev 2371)
@@ -61,10 +61,24 @@
CoyoteLogger HTTP_LOGGER = Logger.getMessageLogger(CoyoteLogger.class, "org.apache.coyote.http11");
/**
+ * A logger with the category of the class name.
+ */
+ CoyoteLogger HTTP_BIO_LOGGER = Logger.getMessageLogger(CoyoteLogger.class, "org.apache.coyote.http11.Http11Protocol");
+
+ /**
+ * A logger with the category of the class name.
+ */
+ CoyoteLogger HTTP_APR_LOGGER = Logger.getMessageLogger(CoyoteLogger.class, "org.apache.coyote.http11.Http11AprProtocol");
+
+ /**
+ * A logger with the category of the class name.
+ */
+ CoyoteLogger HTTP_NIO_LOGGER = Logger.getMessageLogger(CoyoteLogger.class, "org.apache.coyote.http11.Http11NioProtocol");
+
+ /**
* A logger with the category of the package name.
*/
CoyoteLogger AJP_LOGGER = Logger.getMessageLogger(CoyoteLogger.class, "org.apache.coyote.ajp");
-
/**
* A logger with the category of the package name.
*/
10 years, 10 months
JBossWeb SVN: r2370 - 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-02-25 12:12:41 -0500 (Tue, 25 Feb 2014)
New Revision: 2370
Modified:
branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11NioProcessor.java
branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java
Log:
Add some sync to avoid missing some event processing (hopefully).
Modified: branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11NioProcessor.java
===================================================================
--- branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11NioProcessor.java 2014-02-20 18:29:05 UTC (rev 2369)
+++ branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11NioProcessor.java 2014-02-25 17:12:41 UTC (rev 2370)
@@ -733,7 +733,7 @@
* @param param
* the vent parameter
*/
- private void resumeEvent(Object param, boolean read) {
+ private synchronized void resumeEvent(Object param, boolean read) {
if (read) {
readNotifications = true;
}
@@ -751,7 +751,7 @@
*
* @param param
*/
- private void writeEvent(Object param) {
+ private synchronized void writeEvent(Object param) {
// An event is being processed already: adding for write will be
// done
// when the channel gets back to the poller
Modified: branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java
===================================================================
--- branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java 2014-02-20 18:29:05 UTC (rev 2369)
+++ branches/7.4.x/src/main/java/org/apache/coyote/http11/Http11NioProtocol.java 2014-02-25 17:12:41 UTC (rev 2370)
@@ -807,7 +807,7 @@
*/
@Override
// FIXME: probably needs sync due to concurrent read/write possibilities
- public synchronized SocketState event(NioChannel channel, SocketStatus status) {
+ public SocketState event(NioChannel channel, SocketStatus status) {
Http11NioProcessor processor = connections.get(channel.getId());
SocketState state = SocketState.CLOSED;
@@ -864,18 +864,22 @@
// NOPE
}
}
+ processor.endProcessing();
} else {
if (processor.isAvailable() && processor.getReadNotifications()) {
// Call a read event right away
state = event(channel, SocketStatus.OPEN_READ);
+ processor.endProcessing();
} else if (proto.endpoint.isRunning()) {
- proto.endpoint.addEventChannel(channel, processor.getTimeout(),
- false,
- processor.getWriteNotification(),
- processor.getResumeNotification(), false);
+ synchronized (processor) {
+ proto.endpoint.addEventChannel(channel, processor.getTimeout(),
+ false,
+ processor.getWriteNotification(),
+ processor.getResumeNotification(), false);
+ processor.endProcessing();
+ }
}
}
- processor.endProcessing();
}
}
@@ -915,15 +919,19 @@
if (processor.isAvailable() && processor.getReadNotifications()) {
// Call a read event right away
state = event(channel, SocketStatus.OPEN_READ);
+ processor.endProcessing();
} else {
- proto.endpoint.addEventChannel(channel, processor.getTimeout(),
- processor.getReadNotifications(), false,
- processor.getResumeNotification(), false);
+ synchronized (processor) {
+ proto.endpoint.addEventChannel(channel, processor.getTimeout(),
+ processor.getReadNotifications(), false,
+ processor.getResumeNotification(), false);
+ processor.endProcessing();
+ }
}
} else {
recycledProcessors.offer(processor);
+ processor.endProcessing();
}
- processor.endProcessing();
return state;
} catch (IOException e) {
10 years, 10 months
JBossWeb SVN: r2368 - tags.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2014-02-18 11:15:58 -0500 (Tue, 18 Feb 2014)
New Revision: 2368
Added:
tags/JBOSSWEB_7_4_0_BETA3/
Log:
Web 7.4 Beta 3
10 years, 10 months
JBossWeb SVN: r2367 - branches/7.4.x.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2014-02-18 11:14:40 -0500 (Tue, 18 Feb 2014)
New Revision: 2367
Modified:
branches/7.4.x/pom.xml
Log:
Web 7.4 Beta 3
Modified: branches/7.4.x/pom.xml
===================================================================
--- branches/7.4.x/pom.xml 2014-02-17 10:33:49 UTC (rev 2366)
+++ branches/7.4.x/pom.xml 2014-02-18 16:14:40 UTC (rev 2367)
@@ -33,7 +33,7 @@
<groupId>org.jboss.web</groupId>
<artifactId>jbossweb</artifactId>
- <version>7.4.0.Beta2</version>
+ <version>7.4.0.Beta3</version>
<name>JBoss Web</name>
<description>Servlet 3.0 container</description>
10 years, 10 months
JBossWeb SVN: r2366 - branches/7.4.x/src/main/java/org/apache/tomcat/websocket.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2014-02-17 05:33:49 -0500 (Mon, 17 Feb 2014)
New Revision: 2366
Modified:
branches/7.4.x/src/main/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java
Log:
Port patch to avoid deadlock closing during a write.
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-02-14 13:12:02 UTC (rev 2365)
+++ branches/7.4.x/src/main/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java 2014-02-17 10:33:49 UTC (rev 2366)
@@ -250,6 +250,7 @@
MessagePart mp = new MessagePart(opCode, payload, last, handler, this);
+ boolean doWrite = false;
synchronized (messagePartLock) {
if (Constants.OPCODE_CLOSE == mp.getOpCode()) {
try {
@@ -260,30 +261,38 @@
}
if (messagePartInProgress) {
// When a control message is sent while another message is being
- // the control message is queued. Chances are the subsequent
- // data message part will end up queued while the control
- // message is sent. The logic in this class (state machine,
- // EndMessageHanlder, TextMessageSendHandler) ensures that there
- // will only ever be one data message part in the queue. There
- // could be multiple control messages in the queue.
+ // sent, the control message is queued. Chances are the
+ // subsequent data message part will end up queued while the
+ // control message is sent. The logic in this class (state
+ // machine, EndMessageHandler, TextMessageSendHandler) ensures
+ // that there will only ever be one data message part in the
+ // queue. There could be multiple control messages in the queue.
// Add it to the queue
messagePartQueue.add(mp);
} else {
messagePartInProgress = true;
- writeMessagePart(mp);
+ doWrite = true;
}
}
+ if (doWrite) {
+ // Actual write has to be outside sync block to avoid possible
+ // deadlock between messagePartLock and writeLock in
+ // o.a.coyote.http11.upgrade.AbstractServletOutputStream
+ writeMessagePart(mp);
+ }
}
void endMessage(SendHandler handler, SendResult result) {
+ boolean doWrite = false;
+ MessagePart mpNext = null;
synchronized (messagePartLock) {
fragmented = nextFragmented;
text = nextText;
- MessagePart mpNext = messagePartQueue.poll();
+ mpNext = messagePartQueue.poll();
if (mpNext == null) {
messagePartInProgress = false;
} else if (!closed){
@@ -291,9 +300,15 @@
// sending a fragmented message closing the endpoint. If this
// happens, clearly there is no point trying to send the rest of
// the message.
- writeMessagePart(mpNext);
+ doWrite = true;
}
}
+ if (doWrite) {
+ // Actual write has to be outside sync block to avoid possible
+ // deadlock between messagePartLock and writeLock in
+ // o.a.coyote.http11.upgrade.AbstractServletOutputStream
+ writeMessagePart(mpNext);
+ }
wsSession.updateLastActive();
10 years, 10 months
JBossWeb SVN: r2365 - branches/7.4.x/src/main/java/org/apache/tomcat/util/net.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2014-02-14 08:12:02 -0500 (Fri, 14 Feb 2014)
New Revision: 2365
Modified:
branches/7.4.x/src/main/java/org/apache/tomcat/util/net/NioEndpoint.java
Log:
Guard against NPE here (java.io avoids NPEs in that situation).
Modified: branches/7.4.x/src/main/java/org/apache/tomcat/util/net/NioEndpoint.java
===================================================================
--- branches/7.4.x/src/main/java/org/apache/tomcat/util/net/NioEndpoint.java 2014-02-11 14:47:00 UTC (rev 2364)
+++ branches/7.4.x/src/main/java/org/apache/tomcat/util/net/NioEndpoint.java 2014-02-14 13:12:02 UTC (rev 2365)
@@ -1108,6 +1108,9 @@
if (this.channelList.size() > this.size) {
return false;
}
+ if (channel == null) {
+ return false;
+ }
long date = timeout + System.currentTimeMillis();
ChannelInfo info = this.channelList.get(channel.getId());
10 years, 10 months
JBossWeb SVN: r2364 - tags.
by jbossweb-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2014-02-11 09:47:00 -0500 (Tue, 11 Feb 2014)
New Revision: 2364
Added:
tags/JBOSSWEB_2_1_15_GA/
Log:
Web 2.1.15.
10 years, 10 months
JBossWeb SVN: r2363 - branches/2.1.x.
by jbossweb-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2014-02-11 09:23:25 -0500 (Tue, 11 Feb 2014)
New Revision: 2363
Modified:
branches/2.1.x/build.properties.default
Log:
Web 2.1.15.
Modified: branches/2.1.x/build.properties.default
===================================================================
--- branches/2.1.x/build.properties.default 2014-02-11 14:13:10 UTC (rev 2362)
+++ branches/2.1.x/build.properties.default 2014-02-11 14:23:25 UTC (rev 2363)
@@ -12,9 +12,9 @@
# ----- Version Control Flags -----
version.major=2
version.minor=1
-version.build=12
+version.build=15
version.patch=0
-version.tag=SNAPSHOT
+version.tag=GA
# ----- Default Base Path for Dependent Packages -----
# Please note this path must be absolute, not relative,
10 years, 10 months