JBossWeb SVN: r2033 - branches/7.0.x/java/org/apache/coyote/http11 and 2 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-04-26 12:23:56 -0400 (Thu, 26 Apr 2012)
New Revision: 2033
Modified:
branches/7.0.x/java/org/apache/coyote/ajp/AjpAprProtocol.java
branches/7.0.x/java/org/apache/coyote/ajp/AjpProtocol.java
branches/7.0.x/java/org/apache/coyote/http11/Http11AprProtocol.java
branches/7.0.x/java/org/apache/coyote/http11/Http11Protocol.java
trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
trunk/java/org/apache/coyote/ajp/AjpProtocol.java
trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
trunk/java/org/apache/coyote/http11/Http11Protocol.java
Log:
Separate the JMX name for the regular name for better addresses.
Modified: branches/7.0.x/java/org/apache/coyote/ajp/AjpAprProtocol.java
===================================================================
--- branches/7.0.x/java/org/apache/coyote/ajp/AjpAprProtocol.java 2012-04-26 13:33:04 UTC (rev 2032)
+++ branches/7.0.x/java/org/apache/coyote/ajp/AjpAprProtocol.java 2012-04-26 16:23:56 UTC (rev 2033)
@@ -284,8 +284,7 @@
}
}
- // *
- public String getName() {
+ public String getJmxName() {
String encodedAddr = "";
if (getAddress() != null) {
encodedAddr = "" + getAddress();
@@ -294,6 +293,14 @@
return ("ajp-" + encodedAddr + endpoint.getPort());
}
+ public String getName() {
+ String encodedAddr = "";
+ if (getAddress() != null) {
+ encodedAddr = getAddress() + ":";
+ }
+ return ("ajp-" + encodedAddr + endpoint.getPort());
+ }
+
/**
* Processor cache.
*/
@@ -533,7 +540,7 @@
long count = registerCount.incrementAndGet();
ObjectName rpName = new ObjectName
(proto.getDomain() + ":type=RequestProcessor,worker="
- + proto.getName() + ",name=AjpRequest" + count);
+ + proto.getJmxName() + ",name=AjpRequest" + count);
if (log.isDebugEnabled()) {
log.debug("Register " + rpName);
}
Modified: branches/7.0.x/java/org/apache/coyote/ajp/AjpProtocol.java
===================================================================
--- branches/7.0.x/java/org/apache/coyote/ajp/AjpProtocol.java 2012-04-26 13:33:04 UTC (rev 2032)
+++ branches/7.0.x/java/org/apache/coyote/ajp/AjpProtocol.java 2012-04-26 16:23:56 UTC (rev 2033)
@@ -261,8 +261,7 @@
}
}
- // *
- public String getName() {
+ public String getJmxName() {
String encodedAddr = "";
if (getAddress() != null) {
encodedAddr = "" + getAddress();
@@ -271,6 +270,14 @@
return ("ajp-" + encodedAddr + endpoint.getPort());
}
+ public String getName() {
+ String encodedAddr = "";
+ if (getAddress() != null) {
+ encodedAddr = getAddress() + ":";
+ }
+ return ("ajp-" + encodedAddr + endpoint.getPort());
+ }
+
/**
* Processor cache.
*/
@@ -499,7 +506,7 @@
long count = registerCount.incrementAndGet();
ObjectName rpName = new ObjectName
(proto.getDomain() + ":type=RequestProcessor,worker="
- + proto.getName() + ",name=AjpRequest" + count);
+ + proto.getJmxName() + ",name=AjpRequest" + count);
if (log.isDebugEnabled()) {
log.debug("Register " + rpName);
}
Modified: branches/7.0.x/java/org/apache/coyote/http11/Http11AprProtocol.java
===================================================================
--- branches/7.0.x/java/org/apache/coyote/http11/Http11AprProtocol.java 2012-04-26 13:33:04 UTC (rev 2032)
+++ branches/7.0.x/java/org/apache/coyote/http11/Http11AprProtocol.java 2012-04-26 16:23:56 UTC (rev 2033)
@@ -230,7 +230,7 @@
}
}
- public String getName() {
+ public String getJmxName() {
String encodedAddr = "";
if (getAddress() != null) {
encodedAddr = "" + getAddress();
@@ -239,6 +239,14 @@
return ("http-" + encodedAddr + endpoint.getPort());
}
+ public String getName() {
+ String encodedAddr = "";
+ if (getAddress() != null) {
+ encodedAddr = getAddress() + ":";
+ }
+ return ("http-" + encodedAddr + endpoint.getPort());
+ }
+
protected AprEndpoint endpoint=new AprEndpoint();
protected HashMap<String, Object> attributes = new HashMap<String, Object>();
@@ -694,7 +702,7 @@
long count = registerCount.incrementAndGet();
ObjectName rpName = new ObjectName
(proto.getDomain() + ":type=RequestProcessor,worker="
- + proto.getName() + ",name=HttpRequest" + count);
+ + proto.getJmxName() + ",name=HttpRequest" + count);
if (log.isDebugEnabled()) {
log.debug("Register " + rpName);
}
Modified: branches/7.0.x/java/org/apache/coyote/http11/Http11Protocol.java
===================================================================
--- branches/7.0.x/java/org/apache/coyote/http11/Http11Protocol.java 2012-04-26 13:33:04 UTC (rev 2032)
+++ branches/7.0.x/java/org/apache/coyote/http11/Http11Protocol.java 2012-04-26 16:23:56 UTC (rev 2033)
@@ -277,7 +277,7 @@
}
}
- public String getName() {
+ public String getJmxName() {
String encodedAddr = "";
if (getAddress() != null) {
encodedAddr = "" + getAddress();
@@ -286,6 +286,14 @@
return ("http-" + encodedAddr + endpoint.getPort());
}
+ public String getName() {
+ String encodedAddr = "";
+ if (getAddress() != null) {
+ encodedAddr = getAddress() + ":";
+ }
+ return ("http-" + encodedAddr + endpoint.getPort());
+ }
+
// ------------------------------------------------------------- Properties
@@ -735,7 +743,7 @@
long count = registerCount.incrementAndGet();
ObjectName rpName = new ObjectName
(proto.getDomain() + ":type=RequestProcessor,worker="
- + proto.getName() + ",name=HttpRequest" + count);
+ + proto.getJmxName() + ",name=HttpRequest" + count);
if (log.isDebugEnabled()) {
log.debug("Register " + rpName);
}
Modified: trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java
===================================================================
--- trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java 2012-04-26 13:33:04 UTC (rev 2032)
+++ trunk/java/org/apache/coyote/ajp/AjpAprProtocol.java 2012-04-26 16:23:56 UTC (rev 2033)
@@ -284,8 +284,7 @@
}
}
- // *
- public String getName() {
+ public String getJmxName() {
String encodedAddr = "";
if (getAddress() != null) {
encodedAddr = "" + getAddress();
@@ -294,6 +293,14 @@
return ("ajp-" + encodedAddr + endpoint.getPort());
}
+ public String getName() {
+ String encodedAddr = "";
+ if (getAddress() != null) {
+ encodedAddr = getAddress() + ":";
+ }
+ return ("ajp-" + encodedAddr + endpoint.getPort());
+ }
+
/**
* Processor cache.
*/
@@ -533,7 +540,7 @@
long count = registerCount.incrementAndGet();
ObjectName rpName = new ObjectName
(proto.getDomain() + ":type=RequestProcessor,worker="
- + proto.getName() + ",name=AjpRequest" + count);
+ + proto.getJmxName() + ",name=AjpRequest" + count);
if (log.isDebugEnabled()) {
log.debug("Register " + rpName);
}
Modified: trunk/java/org/apache/coyote/ajp/AjpProtocol.java
===================================================================
--- trunk/java/org/apache/coyote/ajp/AjpProtocol.java 2012-04-26 13:33:04 UTC (rev 2032)
+++ trunk/java/org/apache/coyote/ajp/AjpProtocol.java 2012-04-26 16:23:56 UTC (rev 2033)
@@ -261,8 +261,7 @@
}
}
- // *
- public String getName() {
+ public String getJmxName() {
String encodedAddr = "";
if (getAddress() != null) {
encodedAddr = "" + getAddress();
@@ -271,6 +270,14 @@
return ("ajp-" + encodedAddr + endpoint.getPort());
}
+ public String getName() {
+ String encodedAddr = "";
+ if (getAddress() != null) {
+ encodedAddr = getAddress() + ":";
+ }
+ return ("ajp-" + encodedAddr + endpoint.getPort());
+ }
+
/**
* Processor cache.
*/
@@ -499,7 +506,7 @@
long count = registerCount.incrementAndGet();
ObjectName rpName = new ObjectName
(proto.getDomain() + ":type=RequestProcessor,worker="
- + proto.getName() + ",name=AjpRequest" + count);
+ + proto.getJmxName() + ",name=AjpRequest" + count);
if (log.isDebugEnabled()) {
log.debug("Register " + rpName);
}
Modified: trunk/java/org/apache/coyote/http11/Http11AprProtocol.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Http11AprProtocol.java 2012-04-26 13:33:04 UTC (rev 2032)
+++ trunk/java/org/apache/coyote/http11/Http11AprProtocol.java 2012-04-26 16:23:56 UTC (rev 2033)
@@ -230,7 +230,7 @@
}
}
- public String getName() {
+ public String getJmxName() {
String encodedAddr = "";
if (getAddress() != null) {
encodedAddr = "" + getAddress();
@@ -239,6 +239,14 @@
return ("http-" + encodedAddr + endpoint.getPort());
}
+ public String getName() {
+ String encodedAddr = "";
+ if (getAddress() != null) {
+ encodedAddr = getAddress() + ":";
+ }
+ return ("http-" + encodedAddr + endpoint.getPort());
+ }
+
protected AprEndpoint endpoint=new AprEndpoint();
protected HashMap<String, Object> attributes = new HashMap<String, Object>();
@@ -694,7 +702,7 @@
long count = registerCount.incrementAndGet();
ObjectName rpName = new ObjectName
(proto.getDomain() + ":type=RequestProcessor,worker="
- + proto.getName() + ",name=HttpRequest" + count);
+ + proto.getJmxName() + ",name=HttpRequest" + count);
if (log.isDebugEnabled()) {
log.debug("Register " + rpName);
}
Modified: trunk/java/org/apache/coyote/http11/Http11Protocol.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Http11Protocol.java 2012-04-26 13:33:04 UTC (rev 2032)
+++ trunk/java/org/apache/coyote/http11/Http11Protocol.java 2012-04-26 16:23:56 UTC (rev 2033)
@@ -277,7 +277,7 @@
}
}
- public String getName() {
+ public String getJmxName() {
String encodedAddr = "";
if (getAddress() != null) {
encodedAddr = "" + getAddress();
@@ -286,6 +286,14 @@
return ("http-" + encodedAddr + endpoint.getPort());
}
+ public String getName() {
+ String encodedAddr = "";
+ if (getAddress() != null) {
+ encodedAddr = getAddress() + ":";
+ }
+ return ("http-" + encodedAddr + endpoint.getPort());
+ }
+
// ------------------------------------------------------------- Properties
@@ -735,7 +743,7 @@
long count = registerCount.incrementAndGet();
ObjectName rpName = new ObjectName
(proto.getDomain() + ":type=RequestProcessor,worker="
- + proto.getName() + ",name=HttpRequest" + count);
+ + proto.getJmxName() + ",name=HttpRequest" + count);
if (log.isDebugEnabled()) {
log.debug("Register " + rpName);
}
12 years, 8 months
JBossWeb SVN: r2032 - branches/7.0.x/java/org/apache/coyote/http11 and 4 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-04-26 09:33:04 -0400 (Thu, 26 Apr 2012)
New Revision: 2032
Modified:
branches/7.0.x/java/org/apache/coyote/ajp/Constants.java
branches/7.0.x/java/org/apache/coyote/http11/Constants.java
branches/7.0.x/webapps/docs/changelog.xml
trunk/java/org/apache/coyote/ajp/Constants.java
trunk/java/org/apache/coyote/http11/Constants.java
trunk/webapps/docs/changelog.xml
Log:
AS7-4566: Add system property to configure connection timeout
Modified: branches/7.0.x/java/org/apache/coyote/ajp/Constants.java
===================================================================
--- branches/7.0.x/java/org/apache/coyote/ajp/Constants.java 2012-04-25 16:51:10 UTC (rev 2031)
+++ branches/7.0.x/java/org/apache/coyote/ajp/Constants.java 2012-04-26 13:33:04 UTC (rev 2032)
@@ -39,7 +39,8 @@
public static final String Package = "org.apache.coyote.ajp";
public static final int DEFAULT_CONNECTION_LINGER = -1;
- public static final int DEFAULT_CONNECTION_TIMEOUT = -1;
+ public static final int DEFAULT_CONNECTION_TIMEOUT =
+ Integer.valueOf(System.getProperty("org.apache.coyote.ajp.DEFAULT_CONNECTION_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/Constants.java
===================================================================
--- branches/7.0.x/java/org/apache/coyote/http11/Constants.java 2012-04-25 16:51:10 UTC (rev 2031)
+++ branches/7.0.x/java/org/apache/coyote/http11/Constants.java 2012-04-26 13:33:04 UTC (rev 2032)
@@ -37,7 +37,8 @@
public static final String Package = "org.apache.coyote.http11";
public static final int DEFAULT_CONNECTION_LINGER = -1;
- public static final int DEFAULT_CONNECTION_TIMEOUT = 60000;
+ 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_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/webapps/docs/changelog.xml
===================================================================
--- branches/7.0.x/webapps/docs/changelog.xml 2012-04-25 16:51:10 UTC (rev 2031)
+++ branches/7.0.x/webapps/docs/changelog.xml 2012-04-26 13:33:04 UTC (rev 2032)
@@ -22,6 +22,9 @@
<jboss-jira>AS7-4151</jboss-jira>: Add system property to configure AJP packet size, and another
for endpoint max threads. (remm)
</fix>
+ <fix>
+ <jboss-jira>AS7-4566</jboss-jira>: Add system property to configure connection timeout. (remm)
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">
Modified: trunk/java/org/apache/coyote/ajp/Constants.java
===================================================================
--- trunk/java/org/apache/coyote/ajp/Constants.java 2012-04-25 16:51:10 UTC (rev 2031)
+++ trunk/java/org/apache/coyote/ajp/Constants.java 2012-04-26 13:33:04 UTC (rev 2032)
@@ -39,7 +39,8 @@
public static final String Package = "org.apache.coyote.ajp";
public static final int DEFAULT_CONNECTION_LINGER = -1;
- public static final int DEFAULT_CONNECTION_TIMEOUT = -1;
+ public static final int DEFAULT_CONNECTION_TIMEOUT =
+ Integer.valueOf(System.getProperty("org.apache.coyote.ajp.DEFAULT_CONNECTION_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: trunk/java/org/apache/coyote/http11/Constants.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Constants.java 2012-04-25 16:51:10 UTC (rev 2031)
+++ trunk/java/org/apache/coyote/http11/Constants.java 2012-04-26 13:33:04 UTC (rev 2032)
@@ -37,7 +37,8 @@
public static final String Package = "org.apache.coyote.http11";
public static final int DEFAULT_CONNECTION_LINGER = -1;
- public static final int DEFAULT_CONNECTION_TIMEOUT = 60000;
+ 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_CONNECTION_UPLOAD_TIMEOUT = 300000;
public static final int DEFAULT_SERVER_SOCKET_TIMEOUT = 0;
public static final boolean DEFAULT_TCP_NO_DELAY = true;
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2012-04-25 16:51:10 UTC (rev 2031)
+++ trunk/webapps/docs/changelog.xml 2012-04-26 13:33:04 UTC (rev 2032)
@@ -48,6 +48,9 @@
<jboss-jira>AS7-4151</jboss-jira>: Add system property to configure AJP packet size, and another
for endpoint max threads. (remm)
</fix>
+ <fix>
+ <jboss-jira>AS7-4566</jboss-jira>: Add system property to configure connection timeout. (remm)
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">
12 years, 8 months
JBossWeb SVN: r2031 - branches/7.0.x/java/org/apache/coyote/http11 and 6 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-04-25 12:51:10 -0400 (Wed, 25 Apr 2012)
New Revision: 2031
Modified:
branches/7.0.x/java/org/apache/coyote/ajp/Constants.java
branches/7.0.x/java/org/apache/coyote/http11/Constants.java
branches/7.0.x/java/org/apache/tomcat/util/net/AprEndpoint.java
branches/7.0.x/java/org/apache/tomcat/util/net/Constants.java
branches/7.0.x/java/org/apache/tomcat/util/net/JIoEndpoint.java
branches/7.0.x/webapps/docs/changelog.xml
trunk/java/org/apache/coyote/ajp/Constants.java
trunk/java/org/apache/coyote/http11/Constants.java
trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
trunk/java/org/apache/tomcat/util/net/Constants.java
trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
trunk/webapps/docs/changelog.xml
Log:
AS7-4151: Add system property to configure AJP packet size, and another for endpoint max threads.
Modified: branches/7.0.x/java/org/apache/coyote/ajp/Constants.java
===================================================================
--- branches/7.0.x/java/org/apache/coyote/ajp/Constants.java 2012-04-23 15:52:44 UTC (rev 2030)
+++ branches/7.0.x/java/org/apache/coyote/ajp/Constants.java 2012-04-25 16:51:10 UTC (rev 2031)
@@ -96,7 +96,9 @@
/**
* Default maximum total byte size for a AJP packet
*/
- public static final int MAX_PACKET_SIZE = 8192;
+ public static final int MAX_PACKET_SIZE =
+ Integer.valueOf(System.getProperty("org.apache.coyote.ajp.MAX_PACKET_SIZE", "8192")).intValue();
+
/**
* Size of basic packet header
*/
Modified: branches/7.0.x/java/org/apache/coyote/http11/Constants.java
===================================================================
--- branches/7.0.x/java/org/apache/coyote/http11/Constants.java 2012-04-23 15:52:44 UTC (rev 2030)
+++ branches/7.0.x/java/org/apache/coyote/http11/Constants.java 2012-04-25 16:51:10 UTC (rev 2031)
@@ -125,7 +125,8 @@
/**
* Default HTTP header buffer size.
*/
- public static final int DEFAULT_HTTP_HEADER_BUFFER_SIZE = 48 * 1024;
+ public static final int DEFAULT_HTTP_HEADER_BUFFER_SIZE =
+ Integer.valueOf(System.getProperty("org.apache.coyote.http11.DEFAULT_HTTP_HEADER_BUFFER_SIZE", "8192")).intValue();
/* Various constant "strings" */
Modified: branches/7.0.x/java/org/apache/tomcat/util/net/AprEndpoint.java
===================================================================
--- branches/7.0.x/java/org/apache/tomcat/util/net/AprEndpoint.java 2012-04-23 15:52:44 UTC (rev 2030)
+++ branches/7.0.x/java/org/apache/tomcat/util/net/AprEndpoint.java 2012-04-25 16:51:10 UTC (rev 2031)
@@ -148,7 +148,7 @@
/**
* Maximum amount of worker threads.
*/
- protected int maxThreads = (org.apache.tomcat.util.Constants.LOW_MEMORY) ? 32 : 32 * Runtime.getRuntime().availableProcessors();
+ protected int maxThreads = (org.apache.tomcat.util.Constants.LOW_MEMORY) ? 32 : ((Constants.MAX_THREADS == -1) ? 32 * Runtime.getRuntime().availableProcessors() : Constants.MAX_THREADS);
public void setMaxThreads(int maxThreads) { this.maxThreads = maxThreads; }
public int getMaxThreads() { return maxThreads; }
Modified: branches/7.0.x/java/org/apache/tomcat/util/net/Constants.java
===================================================================
--- branches/7.0.x/java/org/apache/tomcat/util/net/Constants.java 2012-04-23 15:52:44 UTC (rev 2030)
+++ branches/7.0.x/java/org/apache/tomcat/util/net/Constants.java 2012-04-25 16:51:10 UTC (rev 2031)
@@ -24,6 +24,8 @@
*/
public final class Constants {
+ public static final int MAX_THREADS =
+ Integer.valueOf(System.getProperty("org.apache.tomcat.util.net.MAX_THREADS", "-1")).intValue();
public static final boolean WAIT_FOR_THREAD =
Boolean.valueOf(System.getProperty("org.apache.tomcat.util.net.WAIT_FOR_THREAD", "false")).booleanValue();
@@ -49,5 +51,4 @@
*/
public static final String SESSION_ID_KEY = "javax.servlet.request.ssl_session_id";
-
}
Modified: branches/7.0.x/java/org/apache/tomcat/util/net/JIoEndpoint.java
===================================================================
--- branches/7.0.x/java/org/apache/tomcat/util/net/JIoEndpoint.java 2012-04-23 15:52:44 UTC (rev 2030)
+++ branches/7.0.x/java/org/apache/tomcat/util/net/JIoEndpoint.java 2012-04-25 16:51:10 UTC (rev 2031)
@@ -134,7 +134,7 @@
/**
* Maximum amount of worker threads.
*/
- protected int maxThreads = (org.apache.tomcat.util.Constants.LOW_MEMORY) ? 64 : 512 * Runtime.getRuntime().availableProcessors();
+ protected int maxThreads = (org.apache.tomcat.util.Constants.LOW_MEMORY) ? 64 : ((Constants.MAX_THREADS == -1) ? 512 * Runtime.getRuntime().availableProcessors() : Constants.MAX_THREADS);
public void setMaxThreads(int maxThreads) { this.maxThreads = maxThreads; }
public int getMaxThreads() { return maxThreads; }
Modified: branches/7.0.x/webapps/docs/changelog.xml
===================================================================
--- branches/7.0.x/webapps/docs/changelog.xml 2012-04-23 15:52:44 UTC (rev 2030)
+++ branches/7.0.x/webapps/docs/changelog.xml 2012-04-25 16:51:10 UTC (rev 2031)
@@ -16,6 +16,14 @@
<body>
<section name="JBoss Web 7.0.16.Final (remm)">
+ <subsection name="Coyote">
+ <changelog>
+ <fix>
+ <jboss-jira>AS7-4151</jboss-jira>: Add system property to configure AJP packet size, and another
+ for endpoint max threads. (remm)
+ </fix>
+ </changelog>
+ </subsection>
<subsection name="Jasper">
<changelog>
<fix>
Modified: trunk/java/org/apache/coyote/ajp/Constants.java
===================================================================
--- trunk/java/org/apache/coyote/ajp/Constants.java 2012-04-23 15:52:44 UTC (rev 2030)
+++ trunk/java/org/apache/coyote/ajp/Constants.java 2012-04-25 16:51:10 UTC (rev 2031)
@@ -96,7 +96,9 @@
/**
* Default maximum total byte size for a AJP packet
*/
- public static final int MAX_PACKET_SIZE = 8192;
+ public static final int MAX_PACKET_SIZE =
+ Integer.valueOf(System.getProperty("org.apache.coyote.ajp.MAX_PACKET_SIZE", "8192")).intValue();
+
/**
* Size of basic packet header
*/
Modified: trunk/java/org/apache/coyote/http11/Constants.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Constants.java 2012-04-23 15:52:44 UTC (rev 2030)
+++ trunk/java/org/apache/coyote/http11/Constants.java 2012-04-25 16:51:10 UTC (rev 2031)
@@ -125,7 +125,8 @@
/**
* Default HTTP header buffer size.
*/
- public static final int DEFAULT_HTTP_HEADER_BUFFER_SIZE = 48 * 1024;
+ public static final int DEFAULT_HTTP_HEADER_BUFFER_SIZE =
+ Integer.valueOf(System.getProperty("org.apache.coyote.http11.DEFAULT_HTTP_HEADER_BUFFER_SIZE", "8192")).intValue();
/* Various constant "strings" */
Modified: trunk/java/org/apache/tomcat/util/net/AprEndpoint.java
===================================================================
--- trunk/java/org/apache/tomcat/util/net/AprEndpoint.java 2012-04-23 15:52:44 UTC (rev 2030)
+++ trunk/java/org/apache/tomcat/util/net/AprEndpoint.java 2012-04-25 16:51:10 UTC (rev 2031)
@@ -148,7 +148,7 @@
/**
* Maximum amount of worker threads.
*/
- protected int maxThreads = (org.apache.tomcat.util.Constants.LOW_MEMORY) ? 32 : 32 * Runtime.getRuntime().availableProcessors();
+ protected int maxThreads = (org.apache.tomcat.util.Constants.LOW_MEMORY) ? 32 : ((Constants.MAX_THREADS == -1) ? 32 * Runtime.getRuntime().availableProcessors() : Constants.MAX_THREADS);
public void setMaxThreads(int maxThreads) { this.maxThreads = maxThreads; }
public int getMaxThreads() { return maxThreads; }
Modified: trunk/java/org/apache/tomcat/util/net/Constants.java
===================================================================
--- trunk/java/org/apache/tomcat/util/net/Constants.java 2012-04-23 15:52:44 UTC (rev 2030)
+++ trunk/java/org/apache/tomcat/util/net/Constants.java 2012-04-25 16:51:10 UTC (rev 2031)
@@ -24,6 +24,8 @@
*/
public final class Constants {
+ public static final int MAX_THREADS =
+ Integer.valueOf(System.getProperty("org.apache.tomcat.util.net.MAX_THREADS", "-1")).intValue();
public static final boolean WAIT_FOR_THREAD =
Boolean.valueOf(System.getProperty("org.apache.tomcat.util.net.WAIT_FOR_THREAD", "false")).booleanValue();
Modified: trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java
===================================================================
--- trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java 2012-04-23 15:52:44 UTC (rev 2030)
+++ trunk/java/org/apache/tomcat/util/net/JIoEndpoint.java 2012-04-25 16:51:10 UTC (rev 2031)
@@ -133,7 +133,7 @@
/**
* Maximum amount of worker threads.
*/
- protected int maxThreads = (org.apache.tomcat.util.Constants.LOW_MEMORY) ? 64 : 512 * Runtime.getRuntime().availableProcessors();
+ protected int maxThreads = (org.apache.tomcat.util.Constants.LOW_MEMORY) ? 64 : ((Constants.MAX_THREADS == -1) ? 512 * Runtime.getRuntime().availableProcessors() : Constants.MAX_THREADS);
public void setMaxThreads(int maxThreads) { this.maxThreads = maxThreads; }
public int getMaxThreads() { return maxThreads; }
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2012-04-23 15:52:44 UTC (rev 2030)
+++ trunk/webapps/docs/changelog.xml 2012-04-25 16:51:10 UTC (rev 2031)
@@ -44,6 +44,10 @@
<add>
Protocol upgrade API. (remm)
</add>
+ <fix>
+ <jboss-jira>AS7-4151</jboss-jira>: Add system property to configure AJP packet size, and another
+ for endpoint max threads. (remm)
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">
12 years, 8 months
JBossWeb SVN: r2030 - branches/7.0.x/webapps/docs/config.
by jbossweb-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2012-04-23 11:52:44 -0400 (Mon, 23 Apr 2012)
New Revision: 2030
Modified:
branches/7.0.x/webapps/docs/config/ajp.xml
branches/7.0.x/webapps/docs/config/http.xml
Log:
More missing stuff.
Modified: branches/7.0.x/webapps/docs/config/ajp.xml
===================================================================
--- branches/7.0.x/webapps/docs/config/ajp.xml 2012-04-23 15:19:53 UTC (rev 2029)
+++ branches/7.0.x/webapps/docs/config/ajp.xml 2012-04-23 15:52:44 UTC (rev 2030)
@@ -59,6 +59,14 @@
<p>This attribute value must be <code>AJP/1.3</code> to use the AJP
handler.</p>
</attribute>
+ <attribute name="scheme" required="true">
+ <p>This attribute value is the scheme used by the proxy (httpd/IIS/Iplanet).
+ The usual values are <code>http</code> and <code>https</code>.</p>
+ </attribute>
+ <attribute name="redirect-port" required="false">
+ <p>This attribute value is the ssl port used by the proxy (httpd/IIS/Iplanet).
+ The usual value is 443.</p>
+ </attribute>
</attributes>
Modified: branches/7.0.x/webapps/docs/config/http.xml
===================================================================
--- branches/7.0.x/webapps/docs/config/http.xml 2012-04-23 15:19:53 UTC (rev 2029)
+++ branches/7.0.x/webapps/docs/config/http.xml 2012-04-23 15:52:44 UTC (rev 2030)
@@ -55,6 +55,10 @@
<p>Name of the connector</p>
</attribute>
+ <attribute name="socket-binding" required="true">
+ <p>Name of the <code>socket-binding</code> to use for the connector</p>
+ </attribute>
+
<attribute name="enable-lookups" required="false">
<p>Set to <code>true</code> if you want calls to
<code>request.getRemoteHost()</code> to perform DNS lookups in
@@ -145,7 +149,7 @@
</p>
</attribute>
- <attribute name="scheme" required="false">
+ <attribute name="scheme" required="true">
<p>Set this attribute to the name of the protocol you wish to have
returned by calls to <code>request.getScheme()</code>. For
example, you would set this attribute to "<code>https</code>"
12 years, 8 months
JBossWeb SVN: r2029 - branches/7.0.x/webapps/docs/config.
by jbossweb-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2012-04-23 11:19:53 -0400 (Mon, 23 Apr 2012)
New Revision: 2029
Modified:
branches/7.0.x/webapps/docs/config/host.xml
branches/7.0.x/webapps/docs/config/http.xml
Log:
Arrange more stuff.
Modified: branches/7.0.x/webapps/docs/config/host.xml
===================================================================
--- branches/7.0.x/webapps/docs/config/host.xml 2012-04-23 13:47:24 UTC (rev 2028)
+++ branches/7.0.x/webapps/docs/config/host.xml 2012-04-23 15:19:53 UTC (rev 2029)
@@ -137,14 +137,14 @@
</subsection>
<subsection name="rewrite">
- <p><code>rewrite</code>describes how requests should be rewritten before processing.
+ <p><code>rewrite</code> describes how requests should be rewritten before processing.
It adds the <code>RewriteValve</code> to the Virtual Host defined by <code>virtual-server</code>
See <a href="../rewrite.html">URL Rewriting</a> for more information.
</p>
<attributes>
<attribute name="condition" required="true">
- <p>list of <code>condition</code>Elements. See condition below.</p>
+ <p>list of <code>condition</code> Elements. See condition below.</p>
</attribute>
<attribute name="pattern" required="true">
@@ -162,8 +162,9 @@
</subsection>
<subsection name="condition">
+ <p><code>condition</code> describes a condition of the conditions list to apply the pattern substitution</p>
+
<attributes>
- <p><code>condition</code>describes a condition of the conditions list to apply the pattern substitution</p>
<attribute name="test" required="true">
<p>a test string is first evaluated, before being matched against the specified pattern</p>
</attribute>
@@ -179,9 +180,10 @@
</subsection>
<subsection name="sso">
- <p><code>sso</code>describes how single sign on is processed.
+ <p><code>sso</code> describes how single sign on is processed.
It adds a <code>Valve</code> to the Virtual Host defined by <code>virtual-server</code>
</p>
+
<attributes>
<attribute name="cache-container" required="false">
<p>Name of the cache container to use for clusterised sso</p>
Modified: branches/7.0.x/webapps/docs/config/http.xml
===================================================================
--- branches/7.0.x/webapps/docs/config/http.xml 2012-04-23 13:47:24 UTC (rev 2028)
+++ branches/7.0.x/webapps/docs/config/http.xml 2012-04-23 15:19:53 UTC (rev 2029)
@@ -149,7 +149,7 @@
<p>Set this attribute to the name of the protocol you wish to have
returned by calls to <code>request.getScheme()</code>. For
example, you would set this attribute to "<code>https</code>"
- for an SSL Connector. The default value is "<code>http</code>".
+ for an SSL Connector. There are only 2 possible value "<code>http</code>" and "<code>https</code>".
</p>
</attribute>
12 years, 8 months
JBossWeb SVN: r2028 - branches/7.0.x/webapps/docs/config.
by jbossweb-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2012-04-23 09:47:24 -0400 (Mon, 23 Apr 2012)
New Revision: 2028
Modified:
branches/7.0.x/webapps/docs/config/host.xml
Log:
Add missing sso doc.
Modified: branches/7.0.x/webapps/docs/config/host.xml
===================================================================
--- branches/7.0.x/webapps/docs/config/host.xml 2012-04-18 08:24:35 UTC (rev 2027)
+++ branches/7.0.x/webapps/docs/config/host.xml 2012-04-23 13:47:24 UTC (rev 2028)
@@ -177,6 +177,26 @@
</attribute>
</attributes>
</subsection>
+
+ <subsection name="sso">
+ <p><code>sso</code>describes how single sign on is processed.
+ It adds a <code>Valve</code> to the Virtual Host defined by <code>virtual-server</code>
+ </p>
+ <attributes>
+ <attribute name="cache-container" required="false">
+ <p>Name of the cache container to use for clusterised sso</p>
+ </attribute>
+ <attribute name="cache-name" required="false">
+ <p>Name of the cache to use for clusterised sso</p>
+ </attribute>
+ <attribute name="domain" required="false">
+ <p>Cookie domain to use.</p>
+ </attribute>
+ <attribute name="reauthenticate" required="false">
+ <p>Whether each request should cause a reauthentication.</p>
+ </attribute>
+ </attributes>
+ </subsection>
</section>
12 years, 8 months
JBossWeb SVN: r2027 - in branches/7.0.x: java/org/apache/el/util and 3 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-04-18 04:24:35 -0400 (Wed, 18 Apr 2012)
New Revision: 2027
Modified:
branches/7.0.x/java/org/apache/el/parser/AstValue.java
branches/7.0.x/java/org/apache/el/util/ReflectionUtil.java
branches/7.0.x/java/org/apache/jasper/compiler/Generator.java
branches/7.0.x/java/org/apache/jasper/compiler/Validator.java
branches/7.0.x/java/org/apache/jasper/runtime/JspApplicationContextImpl.java
branches/7.0.x/webapps/docs/changelog.xml
Log:
- Port 3 Jasper patches.
- 52776: Fix cleanup after JspFragment.invoke. Sumitted by Karl von Randow.
- 52970: Fix enum as method invocation argument in EL.
- Use per webapp expression factory.
Modified: branches/7.0.x/java/org/apache/el/parser/AstValue.java
===================================================================
--- branches/7.0.x/java/org/apache/el/parser/AstValue.java 2012-04-16 12:46:31 UTC (rev 2026)
+++ branches/7.0.x/java/org/apache/el/parser/AstValue.java 2012-04-18 08:24:35 UTC (rev 2027)
@@ -230,7 +230,8 @@
@SuppressWarnings("rawtypes") Class[] paramTypes)
throws ELException {
Target t = getTarget(ctx);
- Method m = ReflectionUtil.getMethod(t.base, t.property, paramTypes);
+ Method m = ReflectionUtil.getMethod(
+ t.base, t.property, paramTypes, null);
return new MethodInfo(m.getName(), m.getReturnType(), m
.getParameterTypes());
}
@@ -244,19 +245,20 @@
Target t = getTarget(ctx);
Method m = null;
Object[] values = null;
+ Class<?>[] types = null;
if (isParametersProvided()) {
values = ((AstMethodParameters) this.jjtGetChild(
this.jjtGetNumChildren() - 1)).getParameters(ctx);
- Class<?>[] types = getTypesFromValues(values);
- m = ReflectionUtil.getMethod(t.base, t.property, types);
+ types = getTypesFromValues(values);
} else {
- m = ReflectionUtil.getMethod(t.base, t.property, paramTypes);
values = paramValues;
+ types = paramTypes;
}
- if (m.isVarArgs()) {
- // May need to convert values
- values = toVarArgs(values, m);
- }
+ m = ReflectionUtil.getMethod(t.base, t.property, types, values);
+
+ // Handle varArgs and any co-ercion required
+ values = convertArgs(values, m);
+
Object result = null;
try {
result = m.invoke(t.base, values);
@@ -277,17 +279,34 @@
return result;
}
- private Object[] toVarArgs(Object[] src, Method m) {
- int paramCount = m.getParameterTypes().length;
+ private Object[] convertArgs(Object[] src, Method m) {
+ Class<?>[] types = m.getParameterTypes();
+ if (types.length == 0) {
+ return new Object[0];
+ }
+ int paramCount = types.length;
+
Object[] dest = new Object[paramCount];
- Object[] varArgs = (Object[]) Array.newInstance(
- m.getParameterTypes()[paramCount - 1].getComponentType(),
- src.length - (paramCount - 1));
- System.arraycopy(src, 0, dest, 0, paramCount - 1);
- System.arraycopy(src, paramCount - 1, varArgs, 0,
- src.length - (paramCount - 1));
- dest[paramCount - 1] = varArgs;
+
+ for (int i = 0; i < paramCount - 1; i++) {
+ dest[i] = ELSupport.coerceToType(src[i], types[i]);
+ }
+
+ if (m.isVarArgs()) {
+ Object[] varArgs = (Object[]) Array.newInstance(
+ m.getParameterTypes()[paramCount - 1].getComponentType(),
+ src.length - (paramCount - 1));
+ for (int i = 0; i < src.length - (paramCount - 1); i ++) {
+ varArgs[i] = ELSupport.coerceToType(src[paramCount - 1 + i],
+ types[paramCount - 1].getComponentType());
+ }
+ dest[paramCount - 1] = varArgs;
+ } else {
+ dest[paramCount - 1] = ELSupport.coerceToType(
+ src[paramCount - 1], types[paramCount - 1]);
+ }
+
return dest;
}
Modified: branches/7.0.x/java/org/apache/el/util/ReflectionUtil.java
===================================================================
--- branches/7.0.x/java/org/apache/el/util/ReflectionUtil.java 2012-04-16 12:46:31 UTC (rev 2026)
+++ branches/7.0.x/java/org/apache/el/util/ReflectionUtil.java 2012-04-18 08:24:35 UTC (rev 2027)
@@ -23,9 +23,12 @@
import java.util.Map;
import java.util.Set;
+import javax.el.ELException;
import javax.el.MethodNotFoundException;
+import org.apache.el.lang.ELSupport;
+
/**
* Utilities for Managing Serialization and Reflection
*
@@ -106,12 +109,14 @@
* @param base the object that owns the method
* @param property the name of the method
* @param paramTypes the parameter types to use
+ * @param paramValues the parameter values
* @return the method specified
* @throws MethodNotFoundException
*/
@SuppressWarnings("null")
public static Method getMethod(Object base, Object property,
- Class<?>[] paramTypes) throws MethodNotFoundException {
+ Class<?>[] paramTypes, Object[] paramValues)
+ throws MethodNotFoundException {
if (base == null || property == null) {
throw new MethodNotFoundException(MessageFactory.get(
"error.method.notfound", base, property,
@@ -156,21 +161,37 @@
int exactMatch = 0;
boolean noMatch = false;
for (int i = 0; i < mParamCount; i++) {
- if (paramTypes[i] == null || mParamTypes[i].equals(paramTypes[i])) {
+ // Can't be null
+ if (mParamTypes[i].equals(paramTypes[i])) {
exactMatch++;
} else if (i == (mParamCount - 1) && m.isVarArgs()) {
Class<?> varType = mParamTypes[i].getComponentType();
for (int j = i; j < paramCount; j++) {
if (!isAssignableFrom(paramTypes[j], varType)) {
- break;
+ if (paramValues == null) {
+ noMatch = true;
+ break;
+ } else {
+ if (!isCoercibleFrom(paramValues[j], varType)) {
+ noMatch = true;
+ break;
+ }
+ }
}
// Don't treat a varArgs match as an exact match, it can
// lead to a varArgs method matching when the result
// should be ambiguous
}
} else if (!isAssignableFrom(paramTypes[i], mParamTypes[i])) {
- noMatch = true;
- break;
+ if (paramValues == null) {
+ noMatch = true;
+ break;
+ } else {
+ if (!isCoercibleFrom(paramValues[i], mParamTypes[i])) {
+ noMatch = true;
+ break;
+ }
+ }
}
}
if (noMatch) {
@@ -298,6 +319,17 @@
return targetClass.isAssignableFrom(src);
}
+ private static boolean isCoercibleFrom(Object src, Class<?> target) {
+ // TODO: This isn't pretty but it works. Significant refactoring would
+ // be required to avoid the exception.
+ try {
+ ELSupport.coerceToType(src, target);
+ } catch (ELException e) {
+ return false;
+ }
+ return true;
+ }
+
protected static final String paramString(Class<?>[] types) {
if (types != null) {
StringBuilder sb = new StringBuilder();
Modified: branches/7.0.x/java/org/apache/jasper/compiler/Generator.java
===================================================================
--- branches/7.0.x/java/org/apache/jasper/compiler/Generator.java 2012-04-16 12:46:31 UTC (rev 2026)
+++ branches/7.0.x/java/org/apache/jasper/compiler/Generator.java 2012-04-18 08:24:35 UTC (rev 2027)
@@ -2098,9 +2098,6 @@
out.println(");");
}
- // Restore EL context
- out.printil("jspContext.getELContext().putContext(JspContext.class,getJspContext());");
-
n.setEndJavaLine(out.getJavaLine());
}
@@ -4186,6 +4183,7 @@
out.printil("}");
out.printil("try {");
out.pushIndent();
+ out.printil("Object _jspx_saved_JspContext = this.jspContext.getELContext().getContext(javax.servlet.jsp.JspContext.class);");
out.printil("this.jspContext.getELContext().putContext(JspContext.class,this.jspContext);");
out.printil("switch( this.discriminator ) {");
out.pushIndent();
@@ -4198,6 +4196,10 @@
}
out.popIndent();
out.printil("}"); // switch
+
+ // restore nested JspContext on ELContext
+ out.printil("jspContext.getELContext().putContext(javax.servlet.jsp.JspContext.class,_jspx_saved_JspContext);");
+
out.popIndent();
out.printil("}"); // try
out.printil("catch( Throwable e ) {");
Modified: branches/7.0.x/java/org/apache/jasper/compiler/Validator.java
===================================================================
--- branches/7.0.x/java/org/apache/jasper/compiler/Validator.java 2012-04-16 12:46:31 UTC (rev 2026)
+++ branches/7.0.x/java/org/apache/jasper/compiler/Validator.java 2012-04-18 08:24:35 UTC (rev 2027)
@@ -27,6 +27,7 @@
import javax.el.ELException;
import javax.el.ExpressionFactory;
import javax.el.FunctionMapper;
+import javax.servlet.jsp.JspFactory;
import javax.servlet.jsp.tagext.FunctionInfo;
import javax.servlet.jsp.tagext.JspFragment;
import javax.servlet.jsp.tagext.PageData;
@@ -37,7 +38,6 @@
import javax.servlet.jsp.tagext.TagLibraryInfo;
import javax.servlet.jsp.tagext.ValidationMessage;
-import org.apache.el.lang.ELSupport;
import org.apache.jasper.JasperException;
import org.apache.jasper.el.ELContextImpl;
import org.xml.sax.Attributes;
@@ -497,8 +497,7 @@
new JspUtil.ValidAttribute("doctype-public"),
new JspUtil.ValidAttribute("doctype-system") };
- private static final ExpressionFactory EXPRESSION_FACTORY =
- ExpressionFactory.newInstance();
+ private final ExpressionFactory expressionFactory;
/*
* Constructor
@@ -507,6 +506,11 @@
this.pageInfo = compiler.getPageInfo();
this.err = compiler.getErrorDispatcher();
this.loader = compiler.getCompilationContext().getClassLoader();
+ // Get the cached EL expression factory for this context
+ expressionFactory =
+ JspFactory.getDefaultFactory().getJspApplicationContext(
+ compiler.getCompilationContext().getServletContext()).
+ getExpressionFactory();
}
public void visit(Node.JspRoot n) throws JasperException {
@@ -1166,7 +1170,7 @@
Boolean.TYPE == expectedClass ||
expectedClass.isEnum()) {
try {
- EXPRESSION_FACTORY.coerceToType(attrs.getValue(i), expectedClass);
+ expressionFactory.coerceToType(attrs.getValue(i), expectedClass);
} catch (Exception e) {
err.jspError
(n, "jsp.error.coerce_to_type",
Modified: branches/7.0.x/java/org/apache/jasper/runtime/JspApplicationContextImpl.java
===================================================================
--- branches/7.0.x/java/org/apache/jasper/runtime/JspApplicationContextImpl.java 2012-04-16 12:46:31 UTC (rev 2026)
+++ branches/7.0.x/java/org/apache/jasper/runtime/JspApplicationContextImpl.java 2012-04-18 08:24:35 UTC (rev 2027)
@@ -50,8 +50,7 @@
private final static String KEY = JspApplicationContextImpl.class.getName();
- private final static ExpressionFactory expressionFactory =
- ExpressionFactory.newInstance();
+ private final ExpressionFactory expressionFactory = ExpressionFactory.newInstance();
private final List<ELContextListener> contextListeners = new ArrayList<ELContextListener>();
Modified: branches/7.0.x/webapps/docs/changelog.xml
===================================================================
--- branches/7.0.x/webapps/docs/changelog.xml 2012-04-16 12:46:31 UTC (rev 2026)
+++ branches/7.0.x/webapps/docs/changelog.xml 2012-04-18 08:24:35 UTC (rev 2027)
@@ -15,6 +15,22 @@
</properties>
<body>
+<section name="JBoss Web 7.0.16.Final (remm)">
+ <subsection name="Jasper">
+ <changelog>
+ <fix>
+ <bug>52776</bug>: Fix cleanup after JspFragment.invoke. Sumitted by Karl von Randow. (markt)
+ </fix>
+ <fix>
+ <bug>52970</bug>: Fix enum as method invocation argument in EL. (markt)
+ </fix>
+ <fix>
+ Use per webapp expression factory. (markt)
+ </fix>
+ </changelog>
+ </subsection>
+</section>
+
<section name="JBoss Web 7.0.15.Final (remm)">
<subsection name="Catalina">
<changelog>
12 years, 8 months
JBossWeb SVN: r2026 - tags.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-04-16 08:46:31 -0400 (Mon, 16 Apr 2012)
New Revision: 2026
Added:
tags/JBOSSWEB_7_0_15_FINAL/
Log:
Web 7.0.15.
12 years, 8 months
JBossWeb SVN: r2025 - in trunk: java/org/apache/coyote/http11 and 3 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-04-16 06:24:28 -0400 (Mon, 16 Apr 2012)
New Revision: 2025
Added:
trunk/test/java/org/jboss/web/upgrade/Upgrade00ServletTest.java
Modified:
trunk/java/org/apache/catalina/connector/Response.java
trunk/java/org/apache/catalina/connector/ResponseFacade.java
trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
trunk/java/org/jboss/servlet/http/UpgradableHttpServletResponse.java
trunk/webapps/docs/changelog.xml
Log:
JBWEB-238: Add a semi hack to allow some flexibility during the upgrade.
Modified: trunk/java/org/apache/catalina/connector/Response.java
===================================================================
--- trunk/java/org/apache/catalina/connector/Response.java 2012-04-13 22:47:49 UTC (rev 2024)
+++ trunk/java/org/apache/catalina/connector/Response.java 2012-04-16 10:24:28 UTC (rev 2025)
@@ -1342,6 +1342,29 @@
}
+ public void startUpgrade() {
+
+ if (isCommitted())
+ throw new IllegalStateException
+ (sm.getString("coyoteResponse.upgrade.ise"));
+
+ if (!connector.hasIoEvents())
+ throw new IllegalStateException
+ (sm.getString("coyoteResponse.upgrade.noEvents"));
+
+ if (!request.isEventMode() || request.getAsyncContext() != null)
+ throw new IllegalStateException
+ (sm.getString("coyoteResponse.upgrade.noHttpEventServlet"));
+
+ // Ignore any call from an included servlet
+ if (included)
+ return;
+
+ request.getCoyoteRequest().action(ActionCode.UPGRADE, null);
+
+ }
+
+
public void sendUpgrade()
throws IOException {
@@ -1361,9 +1384,6 @@
if (included)
return;
- // Clear any data content that has been buffered
- resetBuffer();
-
// Output required by RFC2616. Protocol specific headers should have
// already been set.
setStatus(HttpServletResponse.SC_SWITCHING_PROTOCOLS);
Modified: trunk/java/org/apache/catalina/connector/ResponseFacade.java
===================================================================
--- trunk/java/org/apache/catalina/connector/ResponseFacade.java 2012-04-13 22:47:49 UTC (rev 2024)
+++ trunk/java/org/apache/catalina/connector/ResponseFacade.java 2012-04-16 10:24:28 UTC (rev 2025)
@@ -455,6 +455,16 @@
}
+ public void startUpgrade() {
+
+ if (isCommitted())
+ throw new IllegalStateException
+ (/*sm.getString("responseBase.reset.ise")*/);
+
+ response.startUpgrade();
+
+ }
+
public void sendUpgrade()
throws IOException {
Modified: trunk/java/org/apache/coyote/http11/Http11AprProcessor.java
===================================================================
--- trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 2012-04-13 22:47:49 UTC (rev 2024)
+++ trunk/java/org/apache/coyote/http11/Http11AprProcessor.java 2012-04-16 10:24:28 UTC (rev 2025)
@@ -1657,7 +1657,7 @@
}
int statusCode = response.getStatus();
- if ((statusCode == 101) || (statusCode == 204) || (statusCode == 205)
+ if ((statusCode == 204) || (statusCode == 205)
|| (statusCode == 304)) {
// No entity body
outputBuffer.addActiveFilter
@@ -1665,6 +1665,10 @@
entityBody = false;
contentDelimitation = true;
}
+ if (statusCode >= 100 && statusCode < 200) {
+ entityBody = false;
+ contentDelimitation = true;
+ }
MessageBytes methodMB = request.method();
if (methodMB.equals("HEAD")) {
Modified: trunk/java/org/jboss/servlet/http/UpgradableHttpServletResponse.java
===================================================================
--- trunk/java/org/jboss/servlet/http/UpgradableHttpServletResponse.java 2012-04-13 22:47:49 UTC (rev 2024)
+++ trunk/java/org/jboss/servlet/http/UpgradableHttpServletResponse.java 2012-04-16 10:24:28 UTC (rev 2025)
@@ -31,6 +31,17 @@
*/
public interface UpgradableHttpServletResponse {
+ /**
+ * Start the connection upgrade process. After calling this method,
+ * data will be available raw from the connection. Calling this method
+ * is optional if no read/write are needed during the upgrade process.
+ */
+ public void startUpgrade();
+
+ /**
+ * Send the switching protocol HTTP status and commit the response by
+ * flushing the buffer.
+ */
public void sendUpgrade()
throws IOException;
Added: trunk/test/java/org/jboss/web/upgrade/Upgrade00ServletTest.java
===================================================================
--- trunk/test/java/org/jboss/web/upgrade/Upgrade00ServletTest.java (rev 0)
+++ trunk/test/java/org/jboss/web/upgrade/Upgrade00ServletTest.java 2012-04-16 10:24:28 UTC (rev 2025)
@@ -0,0 +1,120 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2012, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+
+package org.jboss.web.upgrade;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+import javax.servlet.ServletException;
+import javax.servlet.ServletInputStream;
+import javax.servlet.ServletOutputStream;
+import javax.servlet.annotation.WebServlet;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletResponse;
+
+import org.jboss.servlet.http.HttpEvent;
+import org.jboss.servlet.http.HttpEventServlet;
+import org.jboss.servlet.http.UpgradableHttpServletResponse;
+
+@WebServlet("/upgrade00")
+public class Upgrade00ServletTest extends HttpServlet implements HttpEventServlet {
+
+ int count = 0;
+
+ public void event(HttpEvent event) throws IOException, ServletException {
+ System.out.println("[" + event.getHttpServletRequest().getSession(true).getId() + "] " + event.getType());
+ ServletInputStream is = null;
+ ServletOutputStream os = null;
+ switch (event.getType()) {
+ case BEGIN:
+ event.setTimeout(20000);
+ HttpServletResponse response = event.getHttpServletResponse();
+ if (response instanceof UpgradableHttpServletResponse) {
+ ((UpgradableHttpServletResponse) response).startUpgrade();
+ } else {
+ throw new IllegalStateException("Cannot upgrade connection");
+ }
+ is = event.getHttpServletRequest().getInputStream();
+ byte[] buf = new byte[1024];
+ int n = is.read(buf);
+ // Do something with the content
+ os = event.getHttpServletResponse().getOutputStream();
+ os.println("Read: " + n);
+ if (n > 0) {
+ os.write(buf, 0, n);
+ }
+ response.setHeader("Upgrade", "WebSocket");
+ response.setHeader("Sec-WebSocket-Protocol", "sample");
+ response.setHeader("Connection", "Upgrade");
+ ((UpgradableHttpServletResponse) response).sendUpgrade();
+ break;
+ case END:
+ break;
+ case ERROR:
+ event.close();
+ break;
+ case EVENT:
+ os = event.getHttpServletResponse().getOutputStream();
+ // Using while (true): Not checking if the connection is available to writing immediately
+ // will cause the write to be performed in blocking mode.
+ // boolean b = true;
+ // while (b) {
+ while (event.isWriteReady()) {
+ if (count % 100 == 0) {
+ os.println((count++) + " ");
+ } else {
+ os.print((count++) + " ");
+ }
+ }
+ //if (event.ready())
+ // os.flush();
+ break;
+ case READ:
+ is = event.getHttpServletRequest().getInputStream();
+ // Using while (true): Not checking if input is available will trigger a blocking
+ // read. No other event should be triggered (the current READ event will be in progress
+ // until the read timeouts, which will trigger an ERROR event due to an IOException).
+ // while (true) {
+ while (is.available() > 0) {
+ int c = is.read();
+ if (c > 0) {
+ System.out.print((char) c);
+ } else {
+ System.out.print(c);
+ break;
+ }
+ }
+ System.out.println();
+ break;
+ case TIMEOUT:
+ // This will cause a generic event to be sent to the servlet every time the connection is idle for
+ // a while.
+ event.resume();
+ break;
+ case WRITE:
+ break;
+ }
+ }
+
+}
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2012-04-13 22:47:49 UTC (rev 2024)
+++ trunk/webapps/docs/changelog.xml 2012-04-16 10:24:28 UTC (rev 2025)
@@ -17,6 +17,19 @@
<body>
<section name="JBoss Web 7.2.0.Alpha1 (remm)">
+ <subsection name="Catalina">
+ <changelog>
+ <fix>
+ <jboss-jira>AS7-4469</jboss-jira>: Rebase SSL valve used by mod_headers. (remm)
+ </fix>
+ <fix>
+ <jboss-jira>AS7-4469</jboss-jira>: Fix SSL session id attribute name (standardized in Servlet 3). (remm)
+ </fix>
+ <fix>
+ Use the thread listener bind/unbind in the background process. (remm)
+ </fix>
+ </changelog>
+ </subsection>
<subsection name="Coyote">
<changelog>
<fix>
@@ -31,15 +44,6 @@
<add>
Protocol upgrade API. (remm)
</add>
- <fix>
- <jboss-jira>AS7-4469</jboss-jira>: Rebase SSL valve used by mod_headers. (remm)
- </fix>
- <fix>
- <jboss-jira>AS7-4469</jboss-jira>: Fix SSL session id attribute name (standardized in Servlet 3). (remm)
- </fix>
- <fix>
- Use the thread listener bind/unbind in the background process. (remm)
- </fix>
</changelog>
</subsection>
<subsection name="Jasper">
12 years, 8 months
JBossWeb SVN: r2024 - in branches/7.0.x: java/org/apache/catalina/valves and 5 other directories.
by jbossweb-commits@lists.jboss.org
Author: remy.maucherat(a)jboss.com
Date: 2012-04-13 18:47:49 -0400 (Fri, 13 Apr 2012)
New Revision: 2024
Modified:
branches/7.0.x/java/org/apache/catalina/Globals.java
branches/7.0.x/java/org/apache/catalina/valves/LocalStrings.properties
branches/7.0.x/java/org/apache/catalina/valves/SSLValve.java
branches/7.0.x/java/org/apache/coyote/http11/Http11Processor.java
branches/7.0.x/java/org/apache/tomcat/util/buf/EncodingToCharset.java
branches/7.0.x/java/org/apache/tomcat/util/net/Constants.java
branches/7.0.x/java/org/apache/tomcat/util/net/SSLSupport.java
branches/7.0.x/java/org/apache/tomcat/util/net/jsse/JSSESupport.java
branches/7.0.x/webapps/docs/changelog.xml
Log:
AS7-4469: Fix SSL attributes with Servlet 3.0.
Modified: branches/7.0.x/java/org/apache/catalina/Globals.java
===================================================================
--- branches/7.0.x/java/org/apache/catalina/Globals.java 2012-04-13 22:34:05 UTC (rev 2023)
+++ branches/7.0.x/java/org/apache/catalina/Globals.java 2012-04-13 22:47:49 UTC (rev 2024)
@@ -119,7 +119,7 @@
* for this SSL connection (as an object of type java.lang.String).
*/
public static final String SSL_SESSION_ID_ATTR =
- "javax.servlet.request.ssl_session";
+ "javax.servlet.request.ssl_session_id";
/**
Modified: branches/7.0.x/java/org/apache/catalina/valves/LocalStrings.properties
===================================================================
--- branches/7.0.x/java/org/apache/catalina/valves/LocalStrings.properties 2012-04-13 22:34:05 UTC (rev 2023)
+++ branches/7.0.x/java/org/apache/catalina/valves/LocalStrings.properties 2012-04-13 22:47:49 UTC (rev 2024)
@@ -29,6 +29,10 @@
# Remote IP valve
remoteIpValve.syntax=Invalid regular expressions [{0}] provided.
+# SSL valve
+sslValve.certError=Failed to process certificate string [{0}] to create a java.security.cert.X509Certificate object
+sslValve.invalidProvider=The SSL provider specified on the connector associated with this request of [{0}] is invalid. The certificate data could not be processed.
+
# HTTP status reports
http.100=The client may continue ({0}).
http.101=The server is switching protocols according to the "Upgrade" header ({0}).
Modified: branches/7.0.x/java/org/apache/catalina/valves/SSLValve.java
===================================================================
--- branches/7.0.x/java/org/apache/catalina/valves/SSLValve.java 2012-04-13 22:34:05 UTC (rev 2023)
+++ branches/7.0.x/java/org/apache/catalina/valves/SSLValve.java 2012-04-13 22:47:49 UTC (rev 2024)
@@ -14,102 +14,116 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package org.apache.catalina.valves;
+import java.io.ByteArrayInputStream;
import java.io.IOException;
-import java.io.ByteArrayInputStream;
-
+import java.security.NoSuchProviderException;
import java.security.cert.CertificateFactory;
import java.security.cert.X509Certificate;
import javax.servlet.ServletException;
-import org.apache.catalina.valves.ValveBase;
+import org.apache.catalina.Globals;
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
-import org.apache.catalina.util.StringManager;
+import org.apache.tomcat.util.buf.EncodingToCharset;
+import org.jboss.logging.Logger;
-/*
- * Valve to fill the SSL informations in the request
- * mod_header is used to fill the headers and the valve
- * will fill the parameters of the request.
+/**
+ * When using mod_proxy_http, the client SSL information is not included in the
+ * protocol (unlike mod_jk and mod_proxy_ajp). To make the client SSL
+ * information available to Tomcat, some additional configuration is required.
+ * In httpd, mod_headers is used to add the SSL information as HTTP headers. In
+ * Tomcat, this valve is used to read the information from the HTTP headers and
+ * insert it into the request.<p>
+ *
+ * <b>Note: Ensure that the headers are always set by httpd for all requests to
+ * prevent a client spoofing SSL information by sending fake headers. </b><p>
+ *
* In httpd.conf add the following:
- * <IfModule ssl_module>
+ * <pre>
+ * <IfModule ssl_module>
* RequestHeader set SSL_CLIENT_CERT "%{SSL_CLIENT_CERT}s"
* RequestHeader set SSL_CIPHER "%{SSL_CIPHER}s"
* RequestHeader set SSL_SESSION_ID "%{SSL_SESSION_ID}s"
* RequestHeader set SSL_CIPHER_USEKEYSIZE "%{SSL_CIPHER_USEKEYSIZE}s"
- * </IfModule>
+ * </IfModule>
+ * </pre>
*
- * @author Jean-Frederic Clere
- * @version $Revision$, $Date$
+ * In server.xml, configure this valve under the Engine element in server.xml:
+ * <pre>
+ * <Engine ...>
+ * <Valve className="org.apache.catalina.valves.SSLValve" />
+ * <Host ... />
+ * </Engine>
+ * </pre>
*/
+public class SSLValve extends ValveBase {
-public class SSLValve
- extends ValveBase {
-/*
- private static final String info =
- "SSLValve/1.0";
- protected static StringManager sm =
- StringManager.getManager(Constants.Package);
- public String getInfo() {
- return (info);
+ private static Logger log = Logger.getLogger(SSLValve.class);
+
+ //------------------------------------------------------ Constructor
+ public SSLValve() {
}
- public String toString() {
- StringBuffer sb = new StringBuffer("SSLValve[");
- if (container != null)
- sb.append(container.getName());
- sb.append("]");
- return (sb.toString());
- }
- */
+
public String mygetHeader(Request request, String header) {
String strcert0 = request.getHeader(header);
- if (strcert0 == null)
+ if (strcert0 == null) {
return null;
+ }
/* mod_header writes "(null)" when the ssl variable is no filled */
- if ("(null)".equals(strcert0))
+ if ("(null)".equals(strcert0)) {
return null;
+ }
return strcert0;
- }
+ }
+
+ @Override
public void invoke(Request request, Response response)
throws IOException, ServletException {
-
/* mod_header converts the '\n' into ' ' so we have to rebuild the client certificate */
String strcert0 = mygetHeader(request, "ssl_client_cert");
if (strcert0 != null && strcert0.length()>28) {
String strcert1 = strcert0.replace(' ', '\n');
String strcert2 = strcert1.substring(28, strcert1.length()-26);
- String strcert3 = new String("-----BEGIN CERTIFICATE-----\n");
+ String strcert3 = "-----BEGIN CERTIFICATE-----\n";
String strcert4 = strcert3.concat(strcert2);
String strcerts = strcert4.concat("\n-----END CERTIFICATE-----\n");
- // ByteArrayInputStream bais = new ByteArrayInputStream(strcerts.getBytes("UTF-8"));
- ByteArrayInputStream bais = new ByteArrayInputStream(strcerts.getBytes());
+ ByteArrayInputStream bais = new ByteArrayInputStream(strcerts.getBytes(EncodingToCharset.ISO_8859_1));
X509Certificate jsseCerts[] = null;
+ String providerName = (String) request.getConnector().getProperty(
+ "clientCertProvider");
try {
- CertificateFactory cf = CertificateFactory.getInstance("X.509");
+ CertificateFactory cf;
+ if (providerName == null) {
+ cf = CertificateFactory.getInstance("X.509");
+ } else {
+ cf = CertificateFactory.getInstance("X.509", providerName);
+ }
X509Certificate cert = (X509Certificate) cf.generateCertificate(bais);
jsseCerts = new X509Certificate[1];
jsseCerts[0] = cert;
} catch (java.security.cert.CertificateException e) {
- System.out.println("SSLValve failed " + strcerts);
- System.out.println("SSLValve failed " + e);
+ log.warn(sm.getString("sslValve.certError", strcerts), e);
+ } catch (NoSuchProviderException e) {
+ log.error(sm.getString("sslValve.invalidProvider", providerName), e);
}
- request.setAttribute("javax.servlet.request.X509Certificate", jsseCerts);
+ request.setAttribute(Globals.CERTIFICATES_ATTR, jsseCerts);
}
strcert0 = mygetHeader(request, "ssl_cipher");
if (strcert0 != null) {
- request.setAttribute("javax.servlet.request.cipher_suite", strcert0);
+ request.setAttribute(Globals.CIPHER_SUITE_ATTR, strcert0);
}
strcert0 = mygetHeader(request, "ssl_session_id");
if (strcert0 != null) {
- request.setAttribute("javax.servlet.request.ssl_session", strcert0);
+ request.setAttribute(Globals.SSL_SESSION_ID_ATTR, strcert0);
}
strcert0 = mygetHeader(request, "ssl_cipher_usekeysize");
if (strcert0 != null) {
- request.setAttribute("javax.servlet.request.key_size", strcert0);
+ request.setAttribute(Globals.KEY_SIZE_ATTR, Integer.valueOf(strcert0));
}
getNext().invoke(request, response);
}
+
}
Modified: branches/7.0.x/java/org/apache/coyote/http11/Http11Processor.java
===================================================================
--- branches/7.0.x/java/org/apache/coyote/http11/Http11Processor.java 2012-04-13 22:34:05 UTC (rev 2023)
+++ branches/7.0.x/java/org/apache/coyote/http11/Http11Processor.java 2012-04-13 22:47:49 UTC (rev 2024)
@@ -1055,19 +1055,19 @@
Object sslO = sslSupport.getCipherSuite();
if (sslO != null)
request.setAttribute
- (SSLSupport.CIPHER_SUITE_KEY, sslO);
+ (org.apache.tomcat.util.net.Constants.CIPHER_SUITE_KEY, sslO);
sslO = sslSupport.getPeerCertificateChain(false);
if (sslO != null)
request.setAttribute
- (SSLSupport.CERTIFICATE_KEY, sslO);
+ (org.apache.tomcat.util.net.Constants.CERTIFICATE_KEY, sslO);
sslO = sslSupport.getKeySize();
if (sslO != null)
request.setAttribute
- (SSLSupport.KEY_SIZE_KEY, sslO);
+ (org.apache.tomcat.util.net.Constants.KEY_SIZE_KEY, sslO);
sslO = sslSupport.getSessionId();
if (sslO != null)
request.setAttribute
- (SSLSupport.SESSION_ID_KEY, sslO);
+ (org.apache.tomcat.util.net.Constants.SESSION_ID_KEY, sslO);
}
} catch (Exception e) {
log.warn(sm.getString("http11processor.socket.ssl"), e);
@@ -1144,7 +1144,7 @@
Object sslO = sslSupport.getPeerCertificateChain(true);
if( sslO != null) {
request.setAttribute
- (SSLSupport.CERTIFICATE_KEY, sslO);
+ (org.apache.tomcat.util.net.Constants.CERTIFICATE_KEY, sslO);
}
} catch (Exception e) {
log.warn(sm.getString("http11processor.socket.ssl"), e);
Modified: branches/7.0.x/java/org/apache/tomcat/util/buf/EncodingToCharset.java
===================================================================
--- branches/7.0.x/java/org/apache/tomcat/util/buf/EncodingToCharset.java 2012-04-13 22:34:05 UTC (rev 2023)
+++ branches/7.0.x/java/org/apache/tomcat/util/buf/EncodingToCharset.java 2012-04-13 22:47:49 UTC (rev 2024)
@@ -35,6 +35,9 @@
private static final Map<String, Charset> encodingToCharsetCache =
new HashMap<String, Charset>();
+ public static final Charset ISO_8859_1;
+ public static final Charset UTF_8;
+
static {
for (Charset charset: Charset.availableCharsets().values()) {
encodingToCharsetCache.put(charset.name().toUpperCase(Locale.US), charset);
@@ -42,6 +45,8 @@
encodingToCharsetCache.put(alias.toUpperCase(Locale.US), charset);
}
}
+ ISO_8859_1 = encodingToCharsetCache.get("ISO-8859-1");
+ UTF_8 = encodingToCharsetCache.get("UTF-8");
}
public static Charset toCharset(String encoding)
Modified: branches/7.0.x/java/org/apache/tomcat/util/net/Constants.java
===================================================================
--- branches/7.0.x/java/org/apache/tomcat/util/net/Constants.java 2012-04-13 22:34:05 UTC (rev 2023)
+++ branches/7.0.x/java/org/apache/tomcat/util/net/Constants.java 2012-04-13 22:47:49 UTC (rev 2024)
@@ -47,7 +47,7 @@
* The Request attribute key for the session id.
* This one is a Tomcat extension to the Servlet spec.
*/
- public static final String SESSION_ID_KEY = "javax.servlet.request.ssl_session";
+ public static final String SESSION_ID_KEY = "javax.servlet.request.ssl_session_id";
}
Modified: branches/7.0.x/java/org/apache/tomcat/util/net/SSLSupport.java
===================================================================
--- branches/7.0.x/java/org/apache/tomcat/util/net/SSLSupport.java 2012-04-13 22:34:05 UTC (rev 2023)
+++ branches/7.0.x/java/org/apache/tomcat/util/net/SSLSupport.java 2012-04-13 22:47:49 UTC (rev 2024)
@@ -27,28 +27,8 @@
*/
public interface SSLSupport {
- /**
- * The Request attribute key for the cipher suite.
- */
- public static final String CIPHER_SUITE_KEY = "javax.servlet.request.cipher_suite";
/**
- * The Request attribute key for the key size.
- */
- public static final String KEY_SIZE_KEY = "javax.servlet.request.key_size";
-
- /**
- * The Request attribute key for the client certificate chain.
- */
- public static final String CERTIFICATE_KEY = "javax.servlet.request.X509Certificate";
-
- /**
- * The Request attribute key for the session id.
- * This one is a Tomcat extension to the Servlet spec.
- */
- public static final String SESSION_ID_KEY = "javax.servlet.request.ssl_session";
-
- /**
* A mapping table to determine the number of effective bits in the key
* when using a cipher suite containing the specified cipher name. The
* underlying data came from the TLS Specification (RFC 2246), Appendix C.
Modified: branches/7.0.x/java/org/apache/tomcat/util/net/jsse/JSSESupport.java
===================================================================
--- branches/7.0.x/java/org/apache/tomcat/util/net/jsse/JSSESupport.java 2012-04-13 22:34:05 UTC (rev 2023)
+++ branches/7.0.x/java/org/apache/tomcat/util/net/jsse/JSSESupport.java 2012-04-13 22:47:49 UTC (rev 2024)
@@ -31,6 +31,7 @@
import javax.net.ssl.SSLSocket;
import javax.security.cert.X509Certificate;
+import org.apache.tomcat.util.net.Constants;
import org.apache.tomcat.util.net.SSLSupport;
/** JSSESupport
@@ -195,7 +196,7 @@
SSLSupport.CipherData c_aux[]=ciphers;
if (session == null)
return null;
- Integer keySize = (Integer) session.getValue(KEY_SIZE_KEY);
+ Integer keySize = (Integer) session.getValue(Constants.KEY_SIZE_KEY);
if (keySize == null) {
int size = 0;
String cipherSuite = session.getCipherSuite();
@@ -206,7 +207,7 @@
}
}
keySize = new Integer(size);
- session.putValue(KEY_SIZE_KEY, keySize);
+ session.putValue(Constants.KEY_SIZE_KEY, keySize);
}
return keySize;
}
Modified: branches/7.0.x/webapps/docs/changelog.xml
===================================================================
--- branches/7.0.x/webapps/docs/changelog.xml 2012-04-13 22:34:05 UTC (rev 2023)
+++ branches/7.0.x/webapps/docs/changelog.xml 2012-04-13 22:47:49 UTC (rev 2024)
@@ -15,6 +15,29 @@
</properties>
<body>
+<section name="JBoss Web 7.0.15.Final (remm)">
+ <subsection name="Catalina">
+ <changelog>
+ <fix>
+ <jboss-jira>AS7-4469</jboss-jira>: Rebase SSL valve used by mod_headers. (remm)
+ </fix>
+ <fix>
+ <jboss-jira>AS7-4469</jboss-jira>: Fix SSL session id attribute name (standardized in Servlet 3). (remm)
+ </fix>
+ <fix>
+ Use the thread listener bind/unbind in the background process. (remm)
+ </fix>
+ </changelog>
+ </subsection>
+ <subsection name="Coyote">
+ <changelog>
+ <add>
+ <jira>238</jira>: Add startUpgrade hook to allow reading and writing raw bytes during the upgrade process. (remm)
+ </add>
+ </changelog>
+ </subsection>
+</section>
+
<section name="JBoss Web 7.0.14.Final (remm)">
<subsection name="Coyote">
<changelog>
12 years, 8 months