Author: markt Date: Sat Jul 7 18:33:16 2012 New Revision: 1358613 URL: http://svn.apache.org/viewvc?rev=1358613&view=rev Log: Cannot set traffic class on a socket returned from accept(). On Java 6 it is always ignored. On Java 7 BIO ignores it, NIO throws an Exception
Removed: tomcat/trunk/res/ide-support/eclipse/start-tomcat.launch tomcat/trunk/res/ide-support/eclipse/stop-tomcat.launch Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java tomcat/trunk/webapps/docs/config/ajp.xml tomcat/trunk/webapps/docs/config/http.xml Modified: tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java?rev=1358613&r1=1358612&r2=1358613&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java (original) +++ tomcat/trunk/java/org/apache/tomcat/util/net/SocketProperties.java Sat Jul 7 18:33:16 2012 @@ -139,16 +139,6 @@ public class SocketProperties { protected Integer soTimeout = new Integer(20000); /** - * Traffic class option, value between 0 and 255 - * IPTOS_LOWCOST (0x02) - * IPTOS_RELIABILITY (0x04) - * IPTOS_THROUGHPUT (0x08) - * IPTOS_LOWDELAY (0x10) - * JVM default used if not set - */ - protected Integer soTrafficClass = null; - - /** * Performance preferences according to * http://docs.oracle.com/javase/1.5.0/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int) * All three performance attributes must be set or the JVM defaults will be @@ -207,8 +197,6 @@ public class SocketProperties { socket.setSoTimeout(soTimeout.intValue()); if (tcpNoDelay != null) socket.setTcpNoDelay(tcpNoDelay.booleanValue()); - if (soTrafficClass != null) - socket.setTrafficClass(soTrafficClass.intValue()); } public void setProperties(ServerSocket socket) throws SocketException{ @@ -271,10 +259,6 @@ public class SocketProperties { return soTimeout.intValue(); } - public int getSoTrafficClass() { - return soTrafficClass.intValue(); - } - public boolean getTcpNoDelay() { return tcpNoDelay.booleanValue(); } @@ -332,10 +316,6 @@ public class SocketProperties { this.tcpNoDelay = Boolean.valueOf(tcpNoDelay); } - public void setSoTrafficClass(int soTrafficClass) { - this.soTrafficClass = Integer.valueOf(soTrafficClass); - } - public void setSoTimeout(int soTimeout) { this.soTimeout = Integer.valueOf(soTimeout); } Modified: tomcat/trunk/webapps/docs/config/ajp.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/ajp.xml?rev=1358613&r1=1358612&r2=1358613&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/config/ajp.xml (original) +++ tomcat/trunk/webapps/docs/config/ajp.xml Sat Jul 7 18:33:16 2012 @@ -479,14 +479,6 @@ <p>This is equivalent to standard attribute <strong>connectionTimeout</strong>.</p> </attribute> - <attribute name="socket.soTrafficClass" required="false"> - <p>(byte)Value between <code>0</code> and <code>255</code> for the - traffic class on the socket. JVM default used if not set.</p> - <p><strong>Note:</strong> On some JDK versions, setting - <strong>soTrafficClass</strong> causes a problem. A work around for this - is to add the <code>-Djava.net.preferIPv4Stack=true</code> value to your - JVM options.</p> - </attribute> <attribute name="socket.performanceConnectionTime" required="false"> <p>(int)The first value for the performance settings. See <a href="http://docs.oracle.com/javase/6/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int)">Socket Performance Options</a> Modified: tomcat/trunk/webapps/docs/config/http.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/config/http.xml?rev=1358613&r1=1358612&r2=1358613&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/config/http.xml (original) +++ tomcat/trunk/webapps/docs/config/http.xml Sat Jul 7 18:33:16 2012 @@ -558,14 +558,6 @@ <p>This is equivalent to standard attribute <strong>connectionTimeout</strong>.</p> </attribute> - <attribute name="socket.soTrafficClass" required="false"> - <p>(byte)Value between <code>0</code> and <code>255</code> for the - traffic class on the socket. JVM default used if not set.</p> - <p><strong>Note:</strong> On some JDK versions, setting - <strong>soTrafficClass</strong> causes a problem. A work around for this - is to add the <code>-Djava.net.preferIPv4Stack=true</code> value to your - JVM options.</p> - </attribute> <attribute name="socket.performanceConnectionTime" required="false"> <p>(int)The first value for the performance settings. See <a href="http://docs.oracle.com/javase/6/docs/api/java/net/Socket.html#setPerformancePreferences(int,%20int,%20int)">Socket Performance Options</a> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org